Spaces:
Running on Zero
Running on Zero
feat(ui): add universal 'HF Spaces tip' callout above Generate
Browse filesSome setting combinations (Cinematic preset + high resolution + long output)
target local hardware and can exceed ZeroGPU's per-call duration cap on
HF Spaces, aborting mid-run and burning the user's daily quota with
nothing to show for it. Surface this as a low-key gray callout above the
Generate button in every mode panel — last visual cue before the user
commits to a run.
Visual hierarchy:
- amber strip on style-mode inputs: 'this mode is intrinsically heavy'
- gray strip above Generate (all modes): 'these COMBOS can blow the cap'
The two coexist on the style tab — different scopes, complementary.
app.py
CHANGED
|
@@ -306,6 +306,19 @@ _CUSTOM_CSS = """
|
|
| 306 |
}
|
| 307 |
.aio-mode-warning strong { color: #E0A458 !important; font-weight: 500 !important; }
|
| 308 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
/* === Drawer === */
|
| 310 |
.aio-shell { position: relative; }
|
| 311 |
.aio-drawer {
|
|
@@ -709,6 +722,15 @@ def _render_one_mode(name: str) -> dict:
|
|
| 709 |
handles["lora"] = ui.lora_chrome(name)
|
| 710 |
handles["negative_prompt"] = gr.Textbox(label="Negative prompt", lines=2)
|
| 711 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 712 |
handles["generate_btn"] = gr.Button("▶ Generate", variant="primary", size="lg")
|
| 713 |
|
| 714 |
# Live frames-display update when seconds/fps change
|
|
|
|
| 306 |
}
|
| 307 |
.aio-mode-warning strong { color: #E0A458 !important; font-weight: 500 !important; }
|
| 308 |
|
| 309 |
+
.aio-hf-tip {
|
| 310 |
+
margin: 12px 0 8px 0 !important;
|
| 311 |
+
padding: 9px 14px !important;
|
| 312 |
+
font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
|
| 313 |
+
font-size: 11.5px !important;
|
| 314 |
+
line-height: 1.5 !important;
|
| 315 |
+
color: #9CA8B5 !important;
|
| 316 |
+
background: rgba(124, 134, 147, 0.06) !important;
|
| 317 |
+
border-left: 3px solid #5C6671 !important;
|
| 318 |
+
border-radius: 4px !important;
|
| 319 |
+
}
|
| 320 |
+
.aio-hf-tip strong { color: #C8D0DA !important; font-weight: 500 !important; }
|
| 321 |
+
|
| 322 |
/* === Drawer === */
|
| 323 |
.aio-shell { position: relative; }
|
| 324 |
.aio-drawer {
|
|
|
|
| 722 |
handles["lora"] = ui.lora_chrome(name)
|
| 723 |
handles["negative_prompt"] = gr.Textbox(label="Negative prompt", lines=2)
|
| 724 |
|
| 725 |
+
gr.Markdown(
|
| 726 |
+
"**Tip for HF Spaces users:** Heavier configurations "
|
| 727 |
+
"(Cinematic preset, high resolution, long videos) target local "
|
| 728 |
+
"hardware and may abort mid-run on Spaces — burning quota with "
|
| 729 |
+
"no output. Stay at Fast/Balanced + ≤ 1024×576 + ≤ 6 s output "
|
| 730 |
+
"for safe Spaces runs.",
|
| 731 |
+
elem_classes=["aio-hf-tip"],
|
| 732 |
+
)
|
| 733 |
+
|
| 734 |
handles["generate_btn"] = gr.Button("▶ Generate", variant="primary", size="lg")
|
| 735 |
|
| 736 |
# Live frames-display update when seconds/fps change
|