Spaces:
Running on Zero
Running on Zero
Upload folder using huggingface_hub
Browse files- configs_3b/main.yaml +12 -2
- upsampler_theme.py +0 -54
configs_3b/main.yaml
CHANGED
|
@@ -51,8 +51,18 @@ vae:
|
|
| 51 |
split_size: 4
|
| 52 |
memory_device: same
|
| 53 |
memory_limit:
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
checkpoint: ./ckpts/ema_vae.pth
|
| 57 |
scaling_factor: 0.9152
|
| 58 |
compile: False
|
|
|
|
| 51 |
split_size: 4
|
| 52 |
memory_device: same
|
| 53 |
memory_limit:
|
| 54 |
+
# CHANGED FROM UPSTREAM (Upsampler): 0.5 -> 0.15 GiB.
|
| 55 |
+
#
|
| 56 |
+
# This is the VAE's own decode-splitting threshold: a conv whose input would
|
| 57 |
+
# exceed it is split and run in pieces. At the upstream 0.5 the decoder still
|
| 58 |
+
# asks for buffers large enough to send ZeroGPU's caching allocator down the
|
| 59 |
+
# NVML path that dies with "NVML_SUCCESS == r INTERNAL ASSERT FAILED", which
|
| 60 |
+
# is the same class of failure wan-2-2-5b-video solved by keeping the decode
|
| 61 |
+
# tiled and sliced. Smaller splits mean more convs but no single large
|
| 62 |
+
# contiguous allocation. Output is unaffected: the splitting carries the
|
| 63 |
+
# overlap cache between pieces, so it is exact rather than approximate.
|
| 64 |
+
conv_max_mem: 0.15
|
| 65 |
+
norm_max_mem: 0.15
|
| 66 |
checkpoint: ./ckpts/ema_vae.pth
|
| 67 |
scaling_factor: 0.9152
|
| 68 |
compile: False
|
upsampler_theme.py
DELETED
|
@@ -1,54 +0,0 @@
|
|
| 1 |
-
"""Shared Upsampler look-and-feel for every Upsampler/* HF Space.
|
| 2 |
-
|
| 3 |
-
`create_and_push.py` uploads this file alongside each Space's app.py, so every
|
| 4 |
-
Space imports the exact same theme, CSS, header, and footer. Keep this the
|
| 5 |
-
single source of truth (v3 recipe): Soft indigo/purple theme, gradient primary
|
| 6 |
-
button, Gradio's own footer hidden, 1000px max width, minimal header/footer.
|
| 7 |
-
"""
|
| 8 |
-
|
| 9 |
-
import gradio as gr
|
| 10 |
-
|
| 11 |
-
UPSAMPLER_THEME = gr.themes.Soft(
|
| 12 |
-
primary_hue=gr.themes.colors.indigo,
|
| 13 |
-
secondary_hue=gr.themes.colors.purple,
|
| 14 |
-
neutral_hue=gr.themes.colors.slate,
|
| 15 |
-
font=[gr.themes.GoogleFont("Inter"), "system-ui", "sans-serif"],
|
| 16 |
-
).set(
|
| 17 |
-
button_primary_background_fill="linear-gradient(90deg, #6366f1 0%, #a855f7 100%)",
|
| 18 |
-
button_primary_background_fill_hover="linear-gradient(90deg, #4f46e5 0%, #9333ea 100%)",
|
| 19 |
-
button_primary_text_color="#ffffff",
|
| 20 |
-
button_primary_border_color="*primary_500",
|
| 21 |
-
)
|
| 22 |
-
|
| 23 |
-
# Hide Gradio's built-in footer and keep the app narrow and centered.
|
| 24 |
-
UPSAMPLER_CSS = """
|
| 25 |
-
footer { display: none !important; }
|
| 26 |
-
.gradio-container { max-width: 1000px !important; margin: 0 auto !important; }
|
| 27 |
-
#usp-header h1 { font-size: 1.7rem; font-weight: 700; margin: 0 0 .25rem; }
|
| 28 |
-
#usp-header p { opacity: .6; margin: 0; }
|
| 29 |
-
#usp-footer { opacity: .5; font-size: .85rem; margin-top: 1.25rem; }
|
| 30 |
-
#usp-footer a { text-decoration: none; }
|
| 31 |
-
"""
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
def header_html(title: str, subtitle: str) -> str:
|
| 35 |
-
return f"""<div id="usp-header">
|
| 36 |
-
<h1>{title}</h1>
|
| 37 |
-
<p>{subtitle}</p>
|
| 38 |
-
</div>"""
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
_LINK_STYLE = "color:#8b7cf6;font-weight:600;text-decoration:none"
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
def footer_html(description: str, tool_url: str, tool_anchor: str) -> str:
|
| 45 |
-
"""SEO footer (v4 recipe): a short paragraph describing what the model
|
| 46 |
-
does (unique per Space, keyword-bearing) plus the Upsampler attribution
|
| 47 |
-
with a deep link to the matching /free-* tool on upsampler.com. No model
|
| 48 |
-
credit/license line (the README frontmatter carries the license). Spaces
|
| 49 |
-
target model-name queries; the site pages keep the intent queries
|
| 50 |
-
("free X no signup"), so the two never compete."""
|
| 51 |
-
return f"""<div id="usp-footer">
|
| 52 |
-
<p style="margin:0 0 10px">{description}</p>
|
| 53 |
-
<p style="margin:0">Maintained by <a href="https://upsampler.com" target="_blank" rel="noopener" style="{_LINK_STYLE}">Upsampler</a>. Check out the <a href="{tool_url}" target="_blank" rel="noopener" style="{_LINK_STYLE}">{tool_anchor}</a>, no sign-up required.</p>
|
| 54 |
-
</div>"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|