Spaces:
Sleeping
Sleeping
Commit
•
e6d0ada
1
Parent(s):
ad8076c
Update app.py
Browse files
app.py
CHANGED
@@ -59,8 +59,13 @@ original_pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-
|
|
59 |
|
60 |
def merge_and_run(prompt, negative_prompt, shuffled_items, lora_1_scale=0.5, lora_2_scale=0.5, progress=gr.Progress(track_tqdm=True)):
|
61 |
print(shuffled_items)
|
|
|
|
|
|
|
62 |
pipe = copy.deepcopy(original_pipe)
|
63 |
-
pipe.to("cuda")
|
|
|
|
|
64 |
pipe.load_lora_weights(shuffled_items[0]['state_dict'])
|
65 |
pipe.fuse_lora(lora_1_scale)
|
66 |
pipe.load_lora_weights(shuffled_items[1]['state_dict'])
|
|
|
59 |
|
60 |
def merge_and_run(prompt, negative_prompt, shuffled_items, lora_1_scale=0.5, lora_2_scale=0.5, progress=gr.Progress(track_tqdm=True)):
|
61 |
print(shuffled_items)
|
62 |
+
state_dict_1 = copy.deepcopy(shuffled_items[0]['state_dict'])
|
63 |
+
state_dict_2 = copy.deepcopy(shuffled_items[1]['state_dict'])
|
64 |
+
|
65 |
pipe = copy.deepcopy(original_pipe)
|
66 |
+
pipe.to("cuda")
|
67 |
+
|
68 |
+
|
69 |
pipe.load_lora_weights(shuffled_items[0]['state_dict'])
|
70 |
pipe.fuse_lora(lora_1_scale)
|
71 |
pipe.load_lora_weights(shuffled_items[1]['state_dict'])
|