Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,8 +20,8 @@ vae_path = "stabilityai/sd-vae-ft-mse"
|
|
| 20 |
# 모델 및 VAE를 로드합니다.
|
| 21 |
pipes = {}
|
| 22 |
for name, path in model_paths.items():
|
| 23 |
-
pipe = StableDiffusionPipeline.from_pretrained(path, torch_dtype=torch.float16)
|
| 24 |
-
pipe.vae = StableDiffusionPipeline.from_pretrained(vae_path).vae
|
| 25 |
pipes[name] = pipe
|
| 26 |
|
| 27 |
def generate_image(prompt, negative_prompt, model_name, steps, sampler, cfg_scale, width, height, seed):
|
|
|
|
| 20 |
# 모델 및 VAE를 로드합니다.
|
| 21 |
pipes = {}
|
| 22 |
for name, path in model_paths.items():
|
| 23 |
+
pipe = StableDiffusionPipeline.from_pretrained(path, torch_dtype=torch.float16, low_cpu_mem_usage=True)
|
| 24 |
+
pipe.vae = StableDiffusionPipeline.from_pretrained(vae_path, low_cpu_mem_usage=True).vae
|
| 25 |
pipes[name] = pipe
|
| 26 |
|
| 27 |
def generate_image(prompt, negative_prompt, model_name, steps, sampler, cfg_scale, width, height, seed):
|