Husr commited on
Commit
8f553ed
·
1 Parent(s): 286e141

Move header/status into floating debug panel

Browse files
Files changed (1) hide show
  1. app.py +38 -14
app.py CHANGED
@@ -677,25 +677,33 @@ with gr.Blocks(title="Z-Image + LoRA") as demo:
677
  compile_status = "pending"
678
 
679
  gr.Markdown(
680
- f"""<div align="center">
681
 
682
  # Z-Image Generation (No SD fallback)
683
 
684
- Model: `{MODEL_PATH}` | {pipe_status}
685
- GPU: `{GPU_SUMMARY}` | dtype: `{MODEL_DTYPE_LABEL}`
686
- Attention: `{attention_status}` | AoTI: `{aoti_status}` | torch.compile: `{compile_status}`
687
- {lora_status}
688
-
689
  </div>"""
690
  )
691
- if attention_backend_error or aoti_error:
692
- with gr.Accordion("Runtime details (debug)", open=False):
693
- details: List[str] = []
694
- if attention_backend_error:
695
- details.append(f"**Attention backend error**\n```\n{attention_backend_error}\n```")
696
- if aoti_error:
697
- details.append(f"**AoTI error**\n```\n{aoti_error}\n```")
698
- gr.Markdown("\n\n".join(details))
 
 
 
 
 
 
 
 
 
 
 
 
 
699
 
700
  with gr.Row():
701
  with gr.Column(scale=1):
@@ -807,6 +815,22 @@ Attention: `{attention_status}` | AoTI: `{aoti_status}` | torch.compile: `{compi
807
 
808
  css = """
809
  .fillable{max-width: 1230px !important}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
810
  """
811
 
812
  if __name__ == "__main__":
 
677
  compile_status = "pending"
678
 
679
  gr.Markdown(
680
+ """<div align="center">
681
 
682
  # Z-Image Generation (No SD fallback)
683
 
 
 
 
 
 
684
  </div>"""
685
  )
686
+
687
+ status_md = (
688
+ f"Model: `{MODEL_PATH}` | {pipe_status} \n"
689
+ f"GPU: `{GPU_SUMMARY}` | dtype: `{MODEL_DTYPE_LABEL}` \n"
690
+ f"Attention: `{attention_status}` \n"
691
+ f"AoTI: `{aoti_status}` \n"
692
+ f"torch.compile: `{compile_status}` \n"
693
+ f"{lora_status}"
694
+ )
695
+
696
+ details_md_blocks: List[str] = []
697
+ if attention_backend_error:
698
+ details_md_blocks.append(f"**Attention backend error**\n```\n{attention_backend_error}\n```")
699
+ if aoti_error:
700
+ details_md_blocks.append(f"**AoTI error**\n```\n{aoti_error}\n```")
701
+
702
+ with gr.Column(elem_id="floating_status_panel"):
703
+ with gr.Accordion("Status / Debug", open=False):
704
+ gr.Markdown(status_md)
705
+ if details_md_blocks:
706
+ gr.Markdown("\n\n".join(details_md_blocks))
707
 
708
  with gr.Row():
709
  with gr.Column(scale=1):
 
815
 
816
  css = """
817
  .fillable{max-width: 1230px !important}
818
+
819
+ #floating_status_panel{
820
+ position: fixed !important;
821
+ right: 16px;
822
+ bottom: 16px;
823
+ width: min(420px, 92vw);
824
+ max-height: 70vh;
825
+ overflow: auto;
826
+ z-index: 1000;
827
+ background: rgba(255,255,255,0.9);
828
+ border: 1px solid rgba(0,0,0,0.12);
829
+ border-radius: 12px;
830
+ box-shadow: 0 10px 30px rgba(0,0,0,0.18);
831
+ padding: 8px 10px;
832
+ backdrop-filter: blur(8px);
833
+ }
834
  """
835
 
836
  if __name__ == "__main__":