raubatz commited on
Commit
19856bb
Β·
verified Β·
1 Parent(s): e0aa465

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -13
app.py CHANGED
@@ -30,7 +30,7 @@ from lora_registry import (
30
  update_weight_sliders,
31
  add_custom_lora,
32
  )
33
- from logging_utils import log_inference
34
  from image_utils import (
35
  fix_orientation,
36
  compute_canvas_dimensions,
@@ -116,8 +116,6 @@ def on_gallery_select(evt: gr.SelectData, gallery_value):
116
  return None
117
  return item[0] if isinstance(item, (list, tuple)) else item
118
 
119
- # 2do
120
- # remove logging completely
121
 
122
 
123
  # ── GPU step (shared by single, batch, and bulk) ─────────────────────────────
@@ -190,9 +188,6 @@ def _infer_gpu(
190
  return image, seed, width, height
191
 
192
 
193
-
194
- # ── Single / batch infer (generator β†’ streams into gr.Gallery) ───────────────
195
-
196
  # ── Single / batch infer (generator β†’ streams into gr.Gallery) ───────────────
197
 
198
  def infer(
@@ -369,17 +364,13 @@ with gr.Blocks() as demo:
369
  dynamic_loras_state = gr.State({})
370
  selected_output_state = gr.State(None)
371
 
372
- # 2do
373
- # once logging is remove, adapt this
374
-
375
  with gr.Column(elem_id="col-container"):
376
- _logging_badge = "🟒 On" if ENABLE_LOGGING else "πŸ”΄ Off"
377
-
378
- gr.Markdown("# **FLUX.2-Klein-LoRA-Studio**", elem_id="main-title")
379
  gr.Markdown(
380
  f"Apply one or more [LoRA](https://huggingface.co/models?other=base_model:adapter:black-forest-labs/FLUX.2-klein-9B) "
381
  f"adapters using [FLUX.2-Klein-{MODEL_VARIANT}]({MODEL_REPO}). "
382
- f"**Model:** `{MODEL_VARIANT}` Β· **Logging:** {_logging_badge}"
383
  )
384
 
385
  with gr.Tabs() as main_tabs:
@@ -972,3 +963,4 @@ if __name__ == "__main__":
972
  # Gradio 6.0: theme and css go on launch(), not Blocks()
973
  demo.queue().launch(css=css, theme=orange_red_theme,
974
  mcp_server=True, ssr_mode=False, show_error=True)
 
 
30
  update_weight_sliders,
31
  add_custom_lora,
32
  )
33
+
34
  from image_utils import (
35
  fix_orientation,
36
  compute_canvas_dimensions,
 
116
  return None
117
  return item[0] if isinstance(item, (list, tuple)) else item
118
 
 
 
119
 
120
 
121
  # ── GPU step (shared by single, batch, and bulk) ─────────────────────────────
 
188
  return image, seed, width, height
189
 
190
 
 
 
 
191
  # ── Single / batch infer (generator β†’ streams into gr.Gallery) ───────────────
192
 
193
  def infer(
 
364
  dynamic_loras_state = gr.State({})
365
  selected_output_state = gr.State(None)
366
 
 
 
 
367
  with gr.Column(elem_id="col-container"):
368
+
369
+ gr.Markdown("# **flux2klein lora playground**", elem_id="main-title")
 
370
  gr.Markdown(
371
  f"Apply one or more [LoRA](https://huggingface.co/models?other=base_model:adapter:black-forest-labs/FLUX.2-klein-9B) "
372
  f"adapters using [FLUX.2-Klein-{MODEL_VARIANT}]({MODEL_REPO}). "
373
+ f"**Model:** `{MODEL_VARIANT}` "
374
  )
375
 
376
  with gr.Tabs() as main_tabs:
 
963
  # Gradio 6.0: theme and css go on launch(), not Blocks()
964
  demo.queue().launch(css=css, theme=orange_red_theme,
965
  mcp_server=True, ssr_mode=False, show_error=True)
966
+