rahul7star commited on
Commit
79e5760
·
verified ·
1 Parent(s): e2d7c62

Update app_lora1.py

Browse files
Files changed (1) hide show
  1. app_lora1.py +1 -55
app_lora1.py CHANGED
@@ -181,7 +181,7 @@ with gr.Blocks(
181
 
182
  gr.Markdown(
183
  """
184
- # 🎨 Z-Image-Turbo
185
  **Runtime LoRA · Safe Mode · Full-Width UI**
186
  """
187
  )
@@ -308,60 +308,6 @@ with gr.Blocks(
308
  outputs=[final_image, gallery, logs_box],
309
  )
310
 
311
- demo.launch()
312
-
313
- demo.launch()
314
 
315
- # with gr.Blocks(title="Z-Image-Turbo (LoRA Safe)") as demo:
316
- # gr.Markdown("# 🎨 Z-Image-Turbo — Runtime LoRA (SAFE MODE)")
317
-
318
- # with gr.Row():
319
- # with gr.Column(scale=1):
320
- # prompt = gr.Textbox(label="Prompt", value="boat in ocean")
321
- # height = gr.Slider(256, 2048, value=1024, step=8, label="Height")
322
- # width = gr.Slider(256, 2048, value=1024, step=8, label="Width")
323
- # steps = gr.Slider(1, 50, value=20, step=1, label="Inference Steps")
324
- # guidance = gr.Slider(0, 10, value=0.0, step=0.5, label="Guidance Scale")
325
- # seed = gr.Number(value=42, label="Seed")
326
- # run_btn = gr.Button("🚀 Generate")
327
-
328
- # with gr.Column(scale=1):
329
- # final_image = gr.Image(label="Final Image")
330
- # gallery = gr.Gallery(label="Steps", columns=4, height=256)
331
-
332
- # gr.Markdown("## 🧩 LoRA Controls")
333
-
334
- # with gr.Row():
335
- # lora_repo = gr.Textbox(label="LoRA Repo", value=DEFAULT_LORA_REPO)
336
- # lora_dropdown = gr.Dropdown(label="LoRA File", choices=[])
337
- # refresh_btn = gr.Button("🔄 Refresh")
338
-
339
- # logs_box = gr.Textbox(label="Logs", lines=18)
340
-
341
- # # ---- Callbacks ----
342
-
343
- # def refresh_loras(repo):
344
- # files = list_loras_from_repo(repo)
345
- # return gr.update(choices=files, value=files[0] if files else None)
346
-
347
- # refresh_btn.click(refresh_loras, inputs=[lora_repo], outputs=[lora_dropdown])
348
-
349
- # def select_lora(lora_file, repo):
350
- # global CURRENT_LORA_FILE, CURRENT_LORA_REPO
351
- # CURRENT_LORA_FILE = lora_file
352
- # CURRENT_LORA_REPO = repo
353
- # return f"🧩 Selected LoRA: {lora_file}"
354
-
355
- # lora_dropdown.change(
356
- # select_lora,
357
- # inputs=[lora_dropdown, lora_repo],
358
- # outputs=[logs_box],
359
- # )
360
-
361
- # run_btn.click(
362
- # generate_image,
363
- # inputs=[prompt, height, width, steps, seed, guidance],
364
- # outputs=[final_image, gallery, logs_box],
365
- # )
366
 
367
  demo.launch()
 
181
 
182
  gr.Markdown(
183
  """
184
+ # 🎨 Z-Image-Turbo LORA
185
  **Runtime LoRA · Safe Mode · Full-Width UI**
186
  """
187
  )
 
308
  outputs=[final_image, gallery, logs_box],
309
  )
310
 
 
 
 
311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
 
313
  demo.launch()