Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
ffede06
1
Parent(s):
a1a833d
Update app.py
Browse files
app.py
CHANGED
@@ -96,15 +96,15 @@ def merge_and_run(prompt, negative_prompt, shuffled_items, lora_1_scale=0.5, lor
|
|
96 |
repo_id_2 = shuffled_items[1]['repo']
|
97 |
print("Loading state dicts...")
|
98 |
start_time = time()
|
99 |
-
state_dict_1 =
|
100 |
-
state_dict_2 =
|
101 |
state_dict_time = time() - start_time
|
102 |
print(f"State Dict time: {state_dict_time}")
|
103 |
#pipe = copy.deepcopy(original_pipe)
|
104 |
start_time = time()
|
105 |
-
pipe =
|
106 |
pickle_time = time() - start_time
|
107 |
-
print(f"
|
108 |
pipe.to("cuda")
|
109 |
start_time = time()
|
110 |
print("Loading LoRA weights...")
|
|
|
96 |
repo_id_2 = shuffled_items[1]['repo']
|
97 |
print("Loading state dicts...")
|
98 |
start_time = time()
|
99 |
+
state_dict_1 = copy.deepcopy(state_dicts[repo_id_1]["state_dict"])
|
100 |
+
state_dict_2 = copy.deepcopy(state_dicts[repo_id_2]["state_dict"])
|
101 |
state_dict_time = time() - start_time
|
102 |
print(f"State Dict time: {state_dict_time}")
|
103 |
#pipe = copy.deepcopy(original_pipe)
|
104 |
start_time = time()
|
105 |
+
pipe.unet = copy.deepcopy(original_pipe.unet)
|
106 |
pickle_time = time() - start_time
|
107 |
+
print(f"copy time: {pickle_time}")
|
108 |
pipe.to("cuda")
|
109 |
start_time = time()
|
110 |
print("Loading LoRA weights...")
|