Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ def load_pipeline(model_id: str):
|
|
| 40 |
base_model = "CompVis/stable-diffusion-v1-4"
|
| 41 |
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch_dtype)
|
| 42 |
# Load the LoRA weights into the U-Net.
|
| 43 |
-
pipe.unet = PeftModel.from_pretrained(pipe.unet,
|
| 44 |
|
| 45 |
else:
|
| 46 |
pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
|
|
|
|
| 40 |
base_model = "CompVis/stable-diffusion-v1-4"
|
| 41 |
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch_dtype)
|
| 42 |
# Load the LoRA weights into the U-Net.
|
| 43 |
+
pipe.unet = PeftModel.from_pretrained(pipe.unet, model_id, torch_dtype=torch_dtype)
|
| 44 |
|
| 45 |
else:
|
| 46 |
pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
|