feat(domain): add validation and encapsulation to domain models
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user