Merge pull request #145 from hodanov/feature/repair_deprecation_error
Repair DeprecationError.
This commit is contained in:
commit
592be1ddda
@ -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:
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
|
||||
このスクリプトを実行するには最低限下記のツールが必要です:
|
||||
|
||||
- python: > 3.10
|
||||
- modal
|
||||
- python: >= 3.11
|
||||
- modal: >= 0.64.155
|
||||
- ModalのAPIトークン
|
||||
- Hagging FaceのAPIトークン(非公開のリポジトリのモデルを参照したい場合に必須)
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user