Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from diffusers import DiffusionPipeline
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
model_id = "AIuser3842/ponyturbov6"
|
| 5 |
+
pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
| 6 |
+
|
| 7 |
+
pipe.load_lora_weights("EX4L/fruitsalad1", weight_name="Fruits-000039.safetensors", adapter_name="fruitbasket")
|
| 8 |
+
pipe.load_lora_weights("EX4L/Lora", weight_name="Xyzu.safetensors", adapter_name="minimalist-style")
|
| 9 |
+
|
| 10 |
+
pipe.set_adapters(["fruitbasket", "minimalist-style"], adapter_weights=[0.7, 0.5])
|
| 11 |
+
|
| 12 |
+
pipe.fuse_lora()
|
| 13 |
+
|
| 14 |
+
pipe.save_pretrained("./multi_lora_fused_model")
|