Jds20001 commited on
Commit
42c0981
·
verified ·
1 Parent(s): ea17c8b

Scenario dropdown auto-fills prompt+settings on selection (no Apply click needed)

Browse files
Files changed (1) hide show
  1. app.py +9 -10
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
- id_scenario_btn.click(
651
- fn=apply_identity_scenario,
652
- inputs=[id_scenario_dd],
653
- outputs=[id_prompt, id_candid, id_nsfw, id_realism, id_guidance, id_steps, id_scenario_hint],
654
- )
655
- ex_scenario_btn.click(
656
- fn=apply_explicit_scenario,
657
- inputs=[ex_scenario_dd],
658
- outputs=[ex_prompt, ex_strength, ex_nsfw, ex_realism, ex_guidance, ex_steps, ex_scenario_hint],
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(