Spaces:
Running on Zero
Running on Zero
Add browser WebGPU runtime option
Browse files
README.md
CHANGED
|
@@ -26,10 +26,18 @@ Live text-to-waveform inference for both Inflect v2 release models:
|
|
| 26 |
- [Inflect-Micro-v2](https://huggingface.co/owensong/Inflect-Micro-v2): 9.36M parameters
|
| 27 |
- [Inflect-Nano-v2](https://huggingface.co/owensong/Inflect-Nano-v2): 3.96M parameters
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
Every result is synthesized live from text. There is no reference audio,
|
| 30 |
prerecorded fallback, or inference-time teacher model. Use the Compare tab to
|
| 31 |
run the same text, speed, variation, and seed through both checkpoints.
|
| 32 |
|
| 33 |
Long input is split automatically at sentence and punctuation boundaries, then
|
| 34 |
assembled into one downloadable WAV. ZeroGPU still applies a per-generation
|
| 35 |
-
time limit, so submit book-length or document-length text in smaller sections
|
|
|
|
|
|
| 26 |
- [Inflect-Micro-v2](https://huggingface.co/owensong/Inflect-Micro-v2): 9.36M parameters
|
| 27 |
- [Inflect-Nano-v2](https://huggingface.co/owensong/Inflect-Nano-v2): 3.96M parameters
|
| 28 |
|
| 29 |
+
Choose the runtime that fits your device:
|
| 30 |
+
|
| 31 |
+
- **ZeroGPU:** server-side generation in this Space, with no local model download.
|
| 32 |
+
- **[Browser WebGPU](https://huggingface.co/spaces/owensong/Inflect-Web):**
|
| 33 |
+
private, queue-free on-device inference with optional streaming and a WASM
|
| 34 |
+
compatibility fallback.
|
| 35 |
+
|
| 36 |
Every result is synthesized live from text. There is no reference audio,
|
| 37 |
prerecorded fallback, or inference-time teacher model. Use the Compare tab to
|
| 38 |
run the same text, speed, variation, and seed through both checkpoints.
|
| 39 |
|
| 40 |
Long input is split automatically at sentence and punctuation boundaries, then
|
| 41 |
assembled into one downloadable WAV. ZeroGPU still applies a per-generation
|
| 42 |
+
time limit, so submit book-length or document-length text in smaller sections,
|
| 43 |
+
or use Browser WebGPU for inference without a server quota.
|
app.py
CHANGED
|
@@ -296,6 +296,18 @@ body,.gradio-container,.gradio-container button,.gradio-container input,.gradio-
|
|
| 296 |
.links a{color:var(--muted)!important;text-decoration:none}.links a:hover{color:var(--ink)!important}
|
| 297 |
.hero h1{max-width:1040px;margin:15px 0 8px;color:var(--ink);font:650 clamp(40px,4.5vw,56px)/.96 Inter,ui-sans-serif,sans-serif;letter-spacing:-.055em}
|
| 298 |
.hero>p{max-width:1000px;margin:0;color:var(--muted)!important;font-size:13px;line-height:1.48}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 299 |
.model-facts{display:flex;align-items:stretch;margin-top:13px;border-top:1px solid var(--line)}
|
| 300 |
.model-fact{flex:1;padding:8px 24px 0 0;color:var(--muted)!important;font-size:11px;line-height:1.3}
|
| 301 |
.model-fact+.model-fact{padding-left:20px;border-left:1px solid var(--line)}
|
|
@@ -334,6 +346,7 @@ footer{display:none!important}
|
|
| 334 |
html,body{overflow-x:hidden!important}.gradio-container{width:100%!important;min-width:0!important;padding:0 14px 38px!important}
|
| 335 |
.hero{padding-top:22px}.hero-top{align-items:flex-start;flex-direction:column;gap:12px}.links{gap:14px;font-size:11px}
|
| 336 |
.hero h1{margin-top:18px;font-size:42px}.model-facts{display:grid;grid-template-columns:1fr 1fr}.model-fact{padding:11px 10px 9px 0}.model-fact+.model-fact{padding-left:10px}.model-fact:nth-child(3){padding-left:0;border-left:0;border-top:1px solid var(--line)}.model-fact:nth-child(4){border-top:1px solid var(--line)}
|
|
|
|
| 337 |
.workbench{min-width:0!important;padding-top:18px!important}.control-row,.action-row,.comparison .row{flex-direction:column!important;min-width:0!important}
|
| 338 |
.control-row>*,.action-row>*,.comparison .row>*{width:100%!important;min-width:0!important}.gradio-container .wrap,.gradio-container .form,.gradio-container .block{min-width:0!important}
|
| 339 |
}
|
|
@@ -351,8 +364,9 @@ with gr.Blocks(title="Inflect v2 · local speech playground") as demo:
|
|
| 351 |
gr.HTML("""
|
| 352 |
<header class="hero">
|
| 353 |
<div class="hero-top">
|
| 354 |
-
<span class="eyebrow">Inflect v2 ·
|
| 355 |
<nav class="links">
|
|
|
|
| 356 |
<a href="https://huggingface.co/owensong/Inflect-Micro-v2">Micro model</a>
|
| 357 |
<a href="https://huggingface.co/owensong/Inflect-Nano-v2">Nano model</a>
|
| 358 |
<a href="https://github.com/owenawsong/Inflect">GitHub</a>
|
|
@@ -360,13 +374,33 @@ with gr.Blocks(title="Inflect v2 · local speech playground") as demo:
|
|
| 360 |
</div>
|
| 361 |
<h1>Small models.<br>Complete speech.</h1>
|
| 362 |
<p>Generate 24 kHz English speech with the published Inflect-Micro-v2 and Inflect-Nano-v2 checkpoints. The full text-to-waveform path runs here: no reference clip, external vocoder, hosted teacher, or prerecorded result.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 363 |
<div class="model-facts">
|
| 364 |
<div class="model-fact"><strong>9.36M · Micro</strong>quality-first model</div>
|
| 365 |
<div class="model-fact"><strong>3.96M · Nano</strong>footprint-first model</div>
|
| 366 |
<div class="model-fact"><strong>24 kHz WAV</strong>complete waveform output</div>
|
| 367 |
<div class="model-fact"><strong>Local stack</strong>text normalization through audio</div>
|
| 368 |
</div>
|
| 369 |
-
<p class="zerogpu-note"><strong>
|
| 370 |
</header>
|
| 371 |
""", elem_classes="hero-wrap")
|
| 372 |
with gr.Column(elem_classes="workbench"):
|
|
|
|
| 296 |
.links a{color:var(--muted)!important;text-decoration:none}.links a:hover{color:var(--ink)!important}
|
| 297 |
.hero h1{max-width:1040px;margin:15px 0 8px;color:var(--ink);font:650 clamp(40px,4.5vw,56px)/.96 Inter,ui-sans-serif,sans-serif;letter-spacing:-.055em}
|
| 298 |
.hero>p{max-width:1000px;margin:0;color:var(--muted)!important;font-size:13px;line-height:1.48}
|
| 299 |
+
.runtime-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:15px 0 2px;max-width:1080px}
|
| 300 |
+
.runtime-card{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;min-height:78px;padding:13px 15px;border:1px solid var(--line);border-radius:3px;background:var(--panel-2);color:var(--ink)!important;text-decoration:none!important;transition:border-color .16s ease,background .16s ease,transform .16s ease}
|
| 301 |
+
.runtime-card:hover{border-color:#527aa6;background:#1b242d;transform:translateY(-1px)}
|
| 302 |
+
.runtime-card.active{border-color:#356ea8;background:var(--signal-soft)}
|
| 303 |
+
.runtime-icon{display:grid;place-items:center;width:38px;height:38px;border:1px solid #3a4540;border-radius:50%;color:var(--muted)!important;font-size:17px}
|
| 304 |
+
.runtime-card.active .runtime-icon{border-color:#356ea8;background:#17385e;color:#fff!important}
|
| 305 |
+
.runtime-copy{min-width:0}
|
| 306 |
+
.runtime-kicker{display:block;margin-bottom:3px;color:var(--signal)!important;font:750 9px/1.1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.13em;text-transform:uppercase}
|
| 307 |
+
.runtime-title{display:block;color:var(--ink)!important;font-size:15px;line-height:1.2;font-weight:800}
|
| 308 |
+
.runtime-description{display:block;margin-top:3px;color:var(--muted)!important;font-size:11px;line-height:1.35}
|
| 309 |
+
.runtime-state{align-self:center;padding:5px 7px;border:1px solid #3f4a44;border-radius:2px;color:var(--muted)!important;font:750 9px/1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
|
| 310 |
+
.runtime-card.active .runtime-state{border-color:#356ea8;color:#dceaff!important}
|
| 311 |
.model-facts{display:flex;align-items:stretch;margin-top:13px;border-top:1px solid var(--line)}
|
| 312 |
.model-fact{flex:1;padding:8px 24px 0 0;color:var(--muted)!important;font-size:11px;line-height:1.3}
|
| 313 |
.model-fact+.model-fact{padding-left:20px;border-left:1px solid var(--line)}
|
|
|
|
| 346 |
html,body{overflow-x:hidden!important}.gradio-container{width:100%!important;min-width:0!important;padding:0 14px 38px!important}
|
| 347 |
.hero{padding-top:22px}.hero-top{align-items:flex-start;flex-direction:column;gap:12px}.links{gap:14px;font-size:11px}
|
| 348 |
.hero h1{margin-top:18px;font-size:42px}.model-facts{display:grid;grid-template-columns:1fr 1fr}.model-fact{padding:11px 10px 9px 0}.model-fact+.model-fact{padding-left:10px}.model-fact:nth-child(3){padding-left:0;border-left:0;border-top:1px solid var(--line)}.model-fact:nth-child(4){border-top:1px solid var(--line)}
|
| 349 |
+
.runtime-picker{grid-template-columns:1fr}.runtime-card{grid-template-columns:auto minmax(0,1fr);padding:13px}.runtime-state{grid-column:2;justify-self:start;margin-top:-5px}
|
| 350 |
.workbench{min-width:0!important;padding-top:18px!important}.control-row,.action-row,.comparison .row{flex-direction:column!important;min-width:0!important}
|
| 351 |
.control-row>*,.action-row>*,.comparison .row>*{width:100%!important;min-width:0!important}.gradio-container .wrap,.gradio-container .form,.gradio-container .block{min-width:0!important}
|
| 352 |
}
|
|
|
|
| 364 |
gr.HTML("""
|
| 365 |
<header class="hero">
|
| 366 |
<div class="hero-top">
|
| 367 |
+
<span class="eyebrow">Inflect v2 · choose where inference runs</span>
|
| 368 |
<nav class="links">
|
| 369 |
+
<a href="https://huggingface.co/spaces/owensong/Inflect-Web" target="_blank" rel="noopener">Browser WebGPU ↗</a>
|
| 370 |
<a href="https://huggingface.co/owensong/Inflect-Micro-v2">Micro model</a>
|
| 371 |
<a href="https://huggingface.co/owensong/Inflect-Nano-v2">Nano model</a>
|
| 372 |
<a href="https://github.com/owenawsong/Inflect">GitHub</a>
|
|
|
|
| 374 |
</div>
|
| 375 |
<h1>Small models.<br>Complete speech.</h1>
|
| 376 |
<p>Generate 24 kHz English speech with the published Inflect-Micro-v2 and Inflect-Nano-v2 checkpoints. The full text-to-waveform path runs here: no reference clip, external vocoder, hosted teacher, or prerecorded result.</p>
|
| 377 |
+
<div class="runtime-picker" role="navigation" aria-label="Inference runtime">
|
| 378 |
+
<div class="runtime-card active" aria-current="page">
|
| 379 |
+
<span class="runtime-icon" aria-hidden="true">◆</span>
|
| 380 |
+
<span class="runtime-copy">
|
| 381 |
+
<span class="runtime-kicker">Server inference</span>
|
| 382 |
+
<span class="runtime-title">ZeroGPU</span>
|
| 383 |
+
<span class="runtime-description">Runs here on Hugging Face. No model download or compatible GPU required.</span>
|
| 384 |
+
</span>
|
| 385 |
+
<span class="runtime-state">Current mode</span>
|
| 386 |
+
</div>
|
| 387 |
+
<a class="runtime-card" href="https://huggingface.co/spaces/owensong/Inflect-Web" target="_blank" rel="noopener">
|
| 388 |
+
<span class="runtime-icon" aria-hidden="true">◉</span>
|
| 389 |
+
<span class="runtime-copy">
|
| 390 |
+
<span class="runtime-kicker">On-device inference</span>
|
| 391 |
+
<span class="runtime-title">Browser WebGPU</span>
|
| 392 |
+
<span class="runtime-description">No queue or quota. Optional streaming, WebGPU acceleration, and WASM fallback.</span>
|
| 393 |
+
</span>
|
| 394 |
+
<span class="runtime-state">Open ↗</span>
|
| 395 |
+
</a>
|
| 396 |
+
</div>
|
| 397 |
<div class="model-facts">
|
| 398 |
<div class="model-fact"><strong>9.36M · Micro</strong>quality-first model</div>
|
| 399 |
<div class="model-fact"><strong>3.96M · Nano</strong>footprint-first model</div>
|
| 400 |
<div class="model-fact"><strong>24 kHz WAV</strong>complete waveform output</div>
|
| 401 |
<div class="model-fact"><strong>Local stack</strong>text normalization through audio</div>
|
| 402 |
</div>
|
| 403 |
+
<p class="zerogpu-note"><strong>Using ZeroGPU:</strong> each generation has a time limit. For private, queue-free synthesis that runs on your own hardware, choose <a href="https://huggingface.co/spaces/owensong/Inflect-Web" target="_blank" rel="noopener">Browser WebGPU</a> above.</p>
|
| 404 |
</header>
|
| 405 |
""", elem_classes="hero-wrap")
|
| 406 |
with gr.Column(elem_classes="workbench"):
|