Merge pull request #145 from hodanov/feature/repair_deprecation_error

Repair DeprecationError.
This commit is contained in:
hodanov 2024-10-01 09:53:49 +09:00 committed by GitHub
commit 592be1ddda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 9 deletions

View File

@ -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:

View File

@ -20,8 +20,8 @@
このスクリプトを実行するには最低限下記のツールが必要です:
- python: > 3.10
- modal
- python: >= 3.11
- modal: >= 0.64.155
- ModalのAPIトークン
- Hagging FaceのAPIトークン非公開のリポジトリのモデルを参照したい場合に必須

View File

@ -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,

View File

@ -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,