Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,9 +41,9 @@ def infer(
|
|
| 41 |
|
| 42 |
if model == "Ramzes":
|
| 43 |
pipe = StableDiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch_dtype)
|
| 44 |
-
|
| 45 |
-
pipe.load_lora_weights("Bordoglor/
|
| 46 |
-
pipe.text_encoder = PeftModel.from_pretrained(pipe.text_encoder, "Bordoglor/
|
| 47 |
else:
|
| 48 |
pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch_dtype)
|
| 49 |
pipe = pipe.to(device)
|
|
|
|
| 41 |
|
| 42 |
if model == "Ramzes":
|
| 43 |
pipe = StableDiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch_dtype)
|
| 44 |
+
pipe.unet = PeftModel.from_pretrained(pipe.unet, "Bordoglor/Ramzes_adapter_sd_v1.5", subfolder="unet")
|
| 45 |
+
#pipe.load_lora_weights("Bordoglor/Ramzes_adapter_sd_v1.5", subfolder="unet")
|
| 46 |
+
pipe.text_encoder = PeftModel.from_pretrained(pipe.text_encoder, "Bordoglor/Ramzes_adapter_sd_v1.5", subfolder="text_encoder")
|
| 47 |
else:
|
| 48 |
pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch_dtype)
|
| 49 |
pipe = pipe.to(device)
|