diff --git a/Makefile b/Makefile index 8ae5f00..e244e6e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ app: cd ./app && modal deploy __main__.py img_by_sd15_txt2img: - cd ./cmd && modal run sd15_txt2img.py \ + cd ./cmd && modal run txt2img_handler.py::main \ + --version "sd15" \ --prompt "a photograph of an astronaut riding a horse" \ --n-prompt "" \ --height 512 \ @@ -27,7 +28,8 @@ img_by_sd15_img2img: --base-image-url "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png" img_by_sdxl_txt2img: - cd ./cmd && modal run sdxl_txt2img.py \ + cd ./cmd && modal run txt2img_handler.py::main \ + --version "sdxl" \ --prompt "A dog is running on the grass" \ --n-prompt "" \ --height 1024 \ diff --git a/cmd/domain.py b/cmd/domain.py index 32a2318..6ef862b 100644 --- a/cmd/domain.py +++ b/cmd/domain.py @@ -39,10 +39,6 @@ class Prompts: msg = "prompt should not be empty." raise ValueError(msg) - if n_prompt == "": - msg = "n_prompt should not be empty." - raise ValueError(msg) - if height <= 0: msg = "height should be positive." raise ValueError(msg)