diff --git a/README.md b/README.md index 8e6ec7c..01ac866 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ This is a Diffusers-based script for running Stable Diffusion on [Modal](https:/ The app requires the following to run: -- python: > 3.10 -- modal +- python: >= 3.11 +- modal: >= 0.64.155 - A token for Modal. The `modal` is the Python library. In order to install that: diff --git a/README_ja.md b/README_ja.md index a9f9b9c..b538b2f 100644 --- a/README_ja.md +++ b/README_ja.md @@ -20,8 +20,8 @@ このスクリプトを実行するには最低限下記のツールが必要です: -- python: > 3.10 -- modal +- python: >= 3.11 +- modal: >= 0.64.155 - ModalのAPIトークン - Hagging FaceのAPIトークン(非公開のリポジトリのモデルを参照したい場合に必須) diff --git a/cmd/sd15_txt2img.py b/cmd/sd15_txt2img.py index 647a603..960b023 100644 --- a/cmd/sd15_txt2img.py +++ b/cmd/sd15_txt2img.py @@ -1,9 +1,10 @@ import time + import modal import util app = modal.App("run-stable-diffusion-cli") -app.run_inference = modal.Function.from_name("stable-diffusion-cli", "SD15.run_txt2img_inference") +run_inference = modal.Function.from_name("stable-diffusion-cli", "SDXLTxt2Img.run_inference") @app.local_entrypoint() @@ -31,7 +32,7 @@ def main( if seed == -1: seed_generated = util.generate_seed() start_time = time.time() - images = app.run_inference.remote( + images = run_inference.remote( prompt=prompt, n_prompt=n_prompt, height=height, diff --git a/cmd/sdxl_txt2img.py b/cmd/sdxl_txt2img.py index bfb1c49..1528c75 100644 --- a/cmd/sdxl_txt2img.py +++ b/cmd/sdxl_txt2img.py @@ -3,8 +3,8 @@ import time import modal import util -app = modal.Stub("run-stable-diffusion-cli") -app.run_inference = modal.Function.from_name("stable-diffusion-cli", "SDXLTxt2Img.run_inference") +app = modal.App("run-stable-diffusion-cli") +run_inference = modal.Function.from_name("stable-diffusion-cli", "SDXLTxt2Img.run_inference") @app.local_entrypoint() @@ -30,7 +30,7 @@ def main( if seed == -1: seed_generated = util.generate_seed() start_time = time.time() - images = app.run_inference.remote( + images = run_inference.remote( prompt=prompt, n_prompt=n_prompt, height=height,