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:
 | 
					The app requires the following to run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- python: > 3.10
 | 
					- python: >= 3.11
 | 
				
			||||||
- modal
 | 
					- modal: >= 0.64.155
 | 
				
			||||||
- A token for Modal.
 | 
					- A token for Modal.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The `modal` is the Python library. In order to install that:
 | 
					The `modal` is the Python library. In order to install that:
 | 
				
			||||||
 | 
				
			|||||||
@ -20,8 +20,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
このスクリプトを実行するには最低限下記のツールが必要です:
 | 
					このスクリプトを実行するには最低限下記のツールが必要です:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- python: > 3.10
 | 
					- python: >= 3.11
 | 
				
			||||||
- modal
 | 
					- modal: >= 0.64.155
 | 
				
			||||||
- ModalのAPIトークン
 | 
					- ModalのAPIトークン
 | 
				
			||||||
- Hagging FaceのAPIトークン(非公開のリポジトリのモデルを参照したい場合に必須)
 | 
					- Hagging FaceのAPIトークン(非公開のリポジトリのモデルを参照したい場合に必須)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,10 @@
 | 
				
			|||||||
import time
 | 
					import time
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import modal
 | 
					import modal
 | 
				
			||||||
import util
 | 
					import util
 | 
				
			||||||
 | 
					
 | 
				
			||||||
app = modal.App("run-stable-diffusion-cli")
 | 
					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()
 | 
					@app.local_entrypoint()
 | 
				
			||||||
@ -31,7 +32,7 @@ def main(
 | 
				
			|||||||
        if seed == -1:
 | 
					        if seed == -1:
 | 
				
			||||||
            seed_generated = util.generate_seed()
 | 
					            seed_generated = util.generate_seed()
 | 
				
			||||||
        start_time = time.time()
 | 
					        start_time = time.time()
 | 
				
			||||||
        images = app.run_inference.remote(
 | 
					        images = run_inference.remote(
 | 
				
			||||||
            prompt=prompt,
 | 
					            prompt=prompt,
 | 
				
			||||||
            n_prompt=n_prompt,
 | 
					            n_prompt=n_prompt,
 | 
				
			||||||
            height=height,
 | 
					            height=height,
 | 
				
			||||||
 | 
				
			|||||||
@ -3,8 +3,8 @@ import time
 | 
				
			|||||||
import modal
 | 
					import modal
 | 
				
			||||||
import util
 | 
					import util
 | 
				
			||||||
 | 
					
 | 
				
			||||||
app = modal.Stub("run-stable-diffusion-cli")
 | 
					app = modal.App("run-stable-diffusion-cli")
 | 
				
			||||||
app.run_inference = modal.Function.from_name("stable-diffusion-cli", "SDXLTxt2Img.run_inference")
 | 
					run_inference = modal.Function.from_name("stable-diffusion-cli", "SDXLTxt2Img.run_inference")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@app.local_entrypoint()
 | 
					@app.local_entrypoint()
 | 
				
			||||||
@ -30,7 +30,7 @@ def main(
 | 
				
			|||||||
        if seed == -1:
 | 
					        if seed == -1:
 | 
				
			||||||
            seed_generated = util.generate_seed()
 | 
					            seed_generated = util.generate_seed()
 | 
				
			||||||
        start_time = time.time()
 | 
					        start_time = time.time()
 | 
				
			||||||
        images = app.run_inference.remote(
 | 
					        images = run_inference.remote(
 | 
				
			||||||
            prompt=prompt,
 | 
					            prompt=prompt,
 | 
				
			||||||
            n_prompt=n_prompt,
 | 
					            n_prompt=n_prompt,
 | 
				
			||||||
            height=height,
 | 
					            height=height,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user