Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -233,6 +233,7 @@ def merge_incompatible_lora(full_path_lora, lora_scale):
|
|
| 233 |
)
|
| 234 |
del weights_sd
|
| 235 |
del lora_model
|
|
|
|
| 236 |
@spaces.GPU(duration=80)
|
| 237 |
def generate_image(prompt, negative, face_emb, face_image, face_kps, image_strength, guidance_scale, face_strength, depth_control_scale, repo_name, loaded_state_dict, lora_scale, sdxl_loras, selected_state_index, st):
|
| 238 |
print(loaded_state_dict)
|
|
@@ -367,6 +368,8 @@ def run_lora(face_image, prompt, negative, lora_scale, selected_state, face_stre
|
|
| 367 |
image = generate_image(prompt, negative, face_emb, face_image, face_kps, image_strength, guidance_scale, face_strength, depth_control_scale, repo_name, full_path_lora, lora_scale, sdxl_loras, selected_state_index, st)
|
| 368 |
return (face_image, image), gr.update(visible=True)
|
| 369 |
|
|
|
|
|
|
|
| 370 |
def shuffle_gallery(sdxl_loras):
|
| 371 |
random.shuffle(sdxl_loras)
|
| 372 |
return [(item["image"], item["title"]) for item in sdxl_loras], sdxl_loras
|
|
|
|
| 233 |
)
|
| 234 |
del weights_sd
|
| 235 |
del lora_model
|
| 236 |
+
|
| 237 |
@spaces.GPU(duration=80)
|
| 238 |
def generate_image(prompt, negative, face_emb, face_image, face_kps, image_strength, guidance_scale, face_strength, depth_control_scale, repo_name, loaded_state_dict, lora_scale, sdxl_loras, selected_state_index, st):
|
| 239 |
print(loaded_state_dict)
|
|
|
|
| 368 |
image = generate_image(prompt, negative, face_emb, face_image, face_kps, image_strength, guidance_scale, face_strength, depth_control_scale, repo_name, full_path_lora, lora_scale, sdxl_loras, selected_state_index, st)
|
| 369 |
return (face_image, image), gr.update(visible=True)
|
| 370 |
|
| 371 |
+
run_lora.zerogpu = True
|
| 372 |
+
|
| 373 |
def shuffle_gallery(sdxl_loras):
|
| 374 |
random.shuffle(sdxl_loras)
|
| 375 |
return [(item["image"], item["title"]) for item in sdxl_loras], sdxl_loras
|