Scenario dropdown auto-fills prompt+settings on selection (no Apply click needed)
Browse files
app.py
CHANGED
|
@@ -647,16 +647,15 @@ FLUX.1-dev has weaker safety training, so the NSFW LoRAs actually work here. Bes
|
|
| 647 |
)
|
| 648 |
|
| 649 |
# --- Quick Start scenario events ---
|
| 650 |
-
|
| 651 |
-
|
| 652 |
-
|
| 653 |
-
|
| 654 |
-
)
|
| 655 |
-
|
| 656 |
-
|
| 657 |
-
|
| 658 |
-
|
| 659 |
-
)
|
| 660 |
|
| 661 |
# --- Identity tab events ---
|
| 662 |
id_gen_btn.click(
|
|
|
|
| 647 |
)
|
| 648 |
|
| 649 |
# --- Quick Start scenario events ---
|
| 650 |
+
# Selecting a scenario auto-fills the prompt + all settings (no Apply click needed);
|
| 651 |
+
# the Apply button stays as a redundant option.
|
| 652 |
+
id_scenario_outputs = [id_prompt, id_candid, id_nsfw, id_realism, id_guidance, id_steps, id_scenario_hint]
|
| 653 |
+
id_scenario_dd.change(fn=apply_identity_scenario, inputs=[id_scenario_dd], outputs=id_scenario_outputs)
|
| 654 |
+
id_scenario_btn.click(fn=apply_identity_scenario, inputs=[id_scenario_dd], outputs=id_scenario_outputs)
|
| 655 |
+
|
| 656 |
+
ex_scenario_outputs = [ex_prompt, ex_strength, ex_nsfw, ex_realism, ex_guidance, ex_steps, ex_scenario_hint]
|
| 657 |
+
ex_scenario_dd.change(fn=apply_explicit_scenario, inputs=[ex_scenario_dd], outputs=ex_scenario_outputs)
|
| 658 |
+
ex_scenario_btn.click(fn=apply_explicit_scenario, inputs=[ex_scenario_dd], outputs=ex_scenario_outputs)
|
|
|
|
| 659 |
|
| 660 |
# --- Identity tab events ---
|
| 661 |
id_gen_btn.click(
|