feat(domain): add validation and encapsulation to domain models

This commit is contained in:
Limitex
2025-11-12 21:53:48 +09:00
parent c4d385be60
commit b4d197809c
20 changed files with 203 additions and 59 deletions
+5 -1
View File
@@ -11,7 +11,11 @@ class ClipTextEncodeUsecase:
self.text_encoder_repo = text_encoder_repo
def execute(
self, tokenizer: CLIPTokenizer, text_encoder: CLIPTextModel, path: str, text: str
self,
tokenizer: CLIPTokenizer,
text_encoder: CLIPTextModel,
path: str,
text: str,
) -> Conditioning:
if not text.strip():
raise ValueError("Text input is empty or whitespace only.")