Update app.py
Browse files
app.py
CHANGED
@@ -332,6 +332,7 @@ def run_lora(prompt, cfg_scale, steps, selected_indices, lora_scale_1, lora_scal
|
|
332 |
appends.append(trigger_word)
|
333 |
prompt_mash = " ".join(prepends + [prompt] + appends)
|
334 |
print("Prompt Mash: ", prompt_mash)
|
|
|
335 |
# Unload previous LoRA weights
|
336 |
with calculateDuration("Unloading LoRA"):
|
337 |
pipe.unload_lora_weights()
|
@@ -359,13 +360,14 @@ def run_lora(prompt, cfg_scale, steps, selected_indices, lora_scale_1, lora_scal
|
|
359 |
|
360 |
print("Loaded LoRAs:", lora_names)
|
361 |
print("Adapter weights:", lora_weights)
|
362 |
-
|
|
|
363 |
pipe.set_adapters(lora_names, adapter_weights=lora_weights)
|
364 |
|
365 |
with calculateDuration("Randomizing seed"):
|
366 |
if randomize_seed:
|
367 |
seed = random.randint(0, MAX_SEED)
|
368 |
-
|
369 |
|
370 |
image_generator = generate_image(prompt_mash, steps, seed, cfg_scale, width, height, progress)
|
371 |
|
@@ -375,7 +377,7 @@ def run_lora(prompt, cfg_scale, steps, selected_indices, lora_scale_1, lora_scal
|
|
375 |
final_image = image
|
376 |
progress_bar = f'<div class="progress-container"><div class="progress-bar" style="--current: {step_counter}; --total: {steps};"></div></div>'
|
377 |
yield image, seed, gr.update(value=progress_bar, visible=True)
|
378 |
-
|
379 |
|
380 |
run_lora.zerogpu = True
|
381 |
|
@@ -460,7 +462,7 @@ css = '''
|
|
460 |
|
461 |
with gr.Blocks(css=css, delete_cache=(240, 240)) as app:
|
462 |
title = gr.HTML(
|
463 |
-
"""<h1><img src="Keltezaa/Celebrity_LoRa_Mix" alt=" "> Celebrity LoRa Mix</h1><br><span style="
|
464 |
margin-top: -25px !important;
|
465 |
display: block;
|
466 |
margin-left: 37px;
|
|
|
332 |
appends.append(trigger_word)
|
333 |
prompt_mash = " ".join(prepends + [prompt] + appends)
|
334 |
print("Prompt Mash: ", prompt_mash)
|
335 |
+
print("----Seed----:", seed)
|
336 |
# Unload previous LoRA weights
|
337 |
with calculateDuration("Unloading LoRA"):
|
338 |
pipe.unload_lora_weights()
|
|
|
360 |
|
361 |
print("Loaded LoRAs:", lora_names)
|
362 |
print("Adapter weights:", lora_weights)
|
363 |
+
print("Seed:", seed)
|
364 |
+
|
365 |
pipe.set_adapters(lora_names, adapter_weights=lora_weights)
|
366 |
|
367 |
with calculateDuration("Randomizing seed"):
|
368 |
if randomize_seed:
|
369 |
seed = random.randint(0, MAX_SEED)
|
370 |
+
|
371 |
|
372 |
image_generator = generate_image(prompt_mash, steps, seed, cfg_scale, width, height, progress)
|
373 |
|
|
|
377 |
final_image = image
|
378 |
progress_bar = f'<div class="progress-container"><div class="progress-bar" style="--current: {step_counter}; --total: {steps};"></div></div>'
|
379 |
yield image, seed, gr.update(value=progress_bar, visible=True)
|
380 |
+
print("Seed:", seed)
|
381 |
|
382 |
run_lora.zerogpu = True
|
383 |
|
|
|
462 |
|
463 |
with gr.Blocks(css=css, delete_cache=(240, 240)) as app:
|
464 |
title = gr.HTML(
|
465 |
+
"""<h1><img src="https://huggingface.co/spaces/Keltezaa/Celebrity_LoRa_Mix/blob/main/solo-traveller_16875043.png" alt=" "> Celebrity LoRa Mix</h1><br><span style="
|
466 |
margin-top: -25px !important;
|
467 |
display: block;
|
468 |
margin-left: 37px;
|