Spaces:
Sleeping
Sleeping
feat(ui): add style-mode compute-cost warning callout
Browse filesStyle Transfer is meaningfully heavier than other modes: it runs DWPose
on the entire source clip and concatenates the pose latents into the
diffusion attention sequence, so even Fast preset commonly hits ZeroGPU's
per-call duration cap on free/anonymous tier — and a failed run still
consumes the user's daily Pro quota.
Surface this as an amber-accented inline callout inside the Style tab so
users on the Space don't burn quota learning this empirically. Recommends
HF Pro, resolution <= 1024x576, and source video <= 8s for reliable runs.
UI-only change, scoped to the style mode panel. No effect on other modes.
app.py
CHANGED
|
@@ -293,6 +293,19 @@ _CUSTOM_CSS = """
|
|
| 293 |
.aio-tipbar strong { color: #E6E8EB; font-weight: 500; }
|
| 294 |
.aio-tipbar .aio-heart { color: #E55B6E; }
|
| 295 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 296 |
/* === Drawer === */
|
| 297 |
.aio-shell { position: relative; }
|
| 298 |
.aio-drawer {
|
|
@@ -652,6 +665,16 @@ def _render_one_mode(name: str) -> dict:
|
|
| 652 |
handles["first_frame"] = gr.Image(label="First frame", type="filepath")
|
| 653 |
handles["last_frame"] = gr.Image(label="Last frame", type="filepath")
|
| 654 |
elif name == "style":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 655 |
handles["image"] = gr.Image(label="Style reference", type="filepath")
|
| 656 |
handles["input_video"] = gr.Video(label="Source video")
|
| 657 |
|
|
|
|
| 293 |
.aio-tipbar strong { color: #E6E8EB; font-weight: 500; }
|
| 294 |
.aio-tipbar .aio-heart { color: #E55B6E; }
|
| 295 |
|
| 296 |
+
.aio-mode-warning {
|
| 297 |
+
margin: 4px 0 10px 0 !important;
|
| 298 |
+
padding: 10px 14px !important;
|
| 299 |
+
font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
|
| 300 |
+
font-size: 12px !important;
|
| 301 |
+
line-height: 1.55 !important;
|
| 302 |
+
color: #D4C18B !important;
|
| 303 |
+
background: rgba(224, 164, 88, 0.08) !important;
|
| 304 |
+
border-left: 3px solid #E0A458 !important;
|
| 305 |
+
border-radius: 4px !important;
|
| 306 |
+
}
|
| 307 |
+
.aio-mode-warning strong { color: #E0A458 !important; font-weight: 500 !important; }
|
| 308 |
+
|
| 309 |
/* === Drawer === */
|
| 310 |
.aio-shell { position: relative; }
|
| 311 |
.aio-drawer {
|
|
|
|
| 665 |
handles["first_frame"] = gr.Image(label="First frame", type="filepath")
|
| 666 |
handles["last_frame"] = gr.Image(label="Last frame", type="filepath")
|
| 667 |
elif name == "style":
|
| 668 |
+
gr.Markdown(
|
| 669 |
+
"**Heads up — Style Transfer is the heaviest mode.** "
|
| 670 |
+
"It runs the source video through pose detection AND adds "
|
| 671 |
+
"every frame as conditioning, so even the Fast preset can "
|
| 672 |
+
"blow the per-call GPU budget on free/anonymous tier. "
|
| 673 |
+
"**A failed run still consumes daily quota.** "
|
| 674 |
+
"For reliable runs: HF Pro account, resolution ≤ 1024×576, "
|
| 675 |
+
"source video ≤ 8 s.",
|
| 676 |
+
elem_classes=["aio-mode-warning"],
|
| 677 |
+
)
|
| 678 |
handles["image"] = gr.Image(label="Style reference", type="filepath")
|
| 679 |
handles["input_video"] = gr.Video(label="Source video")
|
| 680 |
|