Commit
·
f0e89fe
1
Parent(s):
818277f
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,7 +59,6 @@ def run_lora(prompt, negative, weight, selected_state):
|
|
| 59 |
if last_lora != repo_name:
|
| 60 |
if last_merged:
|
| 61 |
pipe = copy.deepcopy(original_pipe)
|
| 62 |
-
pipe.to(device)
|
| 63 |
else:
|
| 64 |
pipe.unload_lora_weights()
|
| 65 |
is_compatible = sdxl_loras[selected_state.index][5]
|
|
@@ -83,12 +82,7 @@ def run_lora(prompt, negative, weight, selected_state):
|
|
| 83 |
pipe.unet,
|
| 84 |
for_inference=True,
|
| 85 |
)
|
| 86 |
-
#lora_model.to(device)
|
| 87 |
lora_model.apply_to(pipe.text_encoder, pipe.unet) #is apply too all you need?
|
| 88 |
-
#lora_model.to(device)
|
| 89 |
-
#lora_model.merge_to(
|
| 90 |
-
# pipe.text_encoder, pipe.unet, weights_sd, torch.float16, "cuda"
|
| 91 |
-
#)
|
| 92 |
pipe.to(device)
|
| 93 |
last_merged = True
|
| 94 |
|
|
|
|
| 59 |
if last_lora != repo_name:
|
| 60 |
if last_merged:
|
| 61 |
pipe = copy.deepcopy(original_pipe)
|
|
|
|
| 62 |
else:
|
| 63 |
pipe.unload_lora_weights()
|
| 64 |
is_compatible = sdxl_loras[selected_state.index][5]
|
|
|
|
| 82 |
pipe.unet,
|
| 83 |
for_inference=True,
|
| 84 |
)
|
|
|
|
| 85 |
lora_model.apply_to(pipe.text_encoder, pipe.unet) #is apply too all you need?
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
pipe.to(device)
|
| 87 |
last_merged = True
|
| 88 |
|