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