Hermes Bot commited on
Commit
2660a46
·
1 Parent(s): a69ebc6

Define _run_with_meta helper for global gallery handling

Browse files
Files changed (1) hide show
  1. ui/events/run_handlers.py +6 -0
ui/events/run_handlers.py CHANGED
@@ -93,6 +93,12 @@ def create_run_event(prefix: str, task_type: str, ui_components: dict):
93
 
94
  return ui_dict
95
 
 
 
 
 
 
 
96
  run_btn = ui_components.get(f'run_{prefix}') or ui_components.get(f'{prefix}_run_button')
97
  res_gal = ui_components.get(f'result_{prefix}') or ui_components.get(f'{prefix}_output_gallery')
98
  if run_btn and res_gal:
 
93
 
94
  return ui_dict
95
 
96
+ # Helper to run generation and return only the image paths (metadata handled separately in Gallery)
97
+ def _run_with_meta(*args, progress=gr.Progress(track_tqdm=True)):
98
+ ui_dict = create_ui_inputs_dict(*args)
99
+ results = generate_image_wrapper(ui_dict, progress)
100
+ return results
101
+
102
  run_btn = ui_components.get(f'run_{prefix}') or ui_components.get(f'{prefix}_run_button')
103
  res_gal = ui_components.get(f'result_{prefix}') or ui_components.get(f'{prefix}_output_gallery')
104
  if run_btn and res_gal: