NERDDISCO commited on
Commit
b33db7a
路
1 Parent(s): 624a22c

Model cards: tags for the traits and one table of facts per card (CPU / WebGPU first sound, real time, download; parameters, voices); stacked full width on small screens

Browse files
Files changed (2) hide show
  1. index.html +16 -6
  2. style.css +18 -13
index.html CHANGED
@@ -45,13 +45,23 @@
45
  <header class="top">
46
  <h1 id="mtitle">kale-tts-1-nano</h1>
47
  <div class="models" role="radiogroup" aria-label="Model">
48
- <button class="mcard" role="radio" aria-checked="true" tabindex="0" data-m="kale-tts-1-nano" aria-labelledby="n-nano" aria-describedby="f-nano t-nano g-nano">
49
- <span class="mrow"><span class="mname" id="n-nano">kale-tts-1-<b>nano</b></span><span class="mfacts" id="f-nano"><span class="fact p">7.5M</span><span class="sr"> parameters, </span><span class="sep" aria-hidden="true">路</span><span class="fact s"><span class="sr">on the </span><span class="lbl">CPU</span> 14.8 MB</span><span class="sr">, </span></span></span>
50
- <span class="mrow2"><span class="mtraits" id="t-nano"><span class="mstate" aria-hidden="true"></span><span>tiniest<span class="sr">,</span></span><span class="sep" aria-hidden="true">路</span><span>fastest</span></span><span class="fact g" id="g-nano"><span class="sr">, on WebGPU </span><span class="lbl" aria-hidden="true">GPU</span> 30.6 MB</span></span>
 
 
 
 
 
51
  </button>
52
- <button class="mcard" role="radio" aria-checked="false" tabindex="-1" data-m="kale-tts-1-tiny" aria-labelledby="n-tiny" aria-describedby="f-tiny t-tiny g-tiny">
53
- <span class="mrow"><span class="mname" id="n-tiny">kale-tts-1-<b>tiny</b></span><span class="mfacts" id="f-tiny"><span class="fact p">45.7M</span><span class="sr"> parameters, </span><span class="sep" aria-hidden="true">路</span><span class="fact s"><span class="sr">on the </span><span class="lbl">CPU</span> 79.9 MB</span><span class="sr">, </span></span></span>
54
- <span class="mrow2"><span class="mtraits" id="t-tiny"><span class="mstate" aria-hidden="true"></span><span>clearer<span class="sr">,</span></span><span class="sep" aria-hidden="true">路</span><span>more expressive</span></span><span class="fact g" id="g-tiny"><span class="sr">, on WebGPU </span><span class="lbl" aria-hidden="true">GPU</span> 183.2 MB</span></span>
 
 
 
 
 
55
  </button>
56
  </div>
57
  <span class="sr" role="progressbar" id="mprogress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-label="Downloading the model" hidden></span>
 
45
  <header class="top">
46
  <h1 id="mtitle">kale-tts-1-nano</h1>
47
  <div class="models" role="radiogroup" aria-label="Model">
48
+ <button class="mcard" role="radio" aria-checked="true" tabindex="0" data-m="kale-tts-1-nano" aria-labelledby="n-nano" aria-describedby="t-nano d-nano">
49
+ <span class="mname" id="n-nano">kale-tts-1-<b>nano</b></span>
50
+ <span class="mtraits" id="t-nano"><span class="mstate" aria-hidden="true"></span><span class="tag">tiniest</span><span class="sr">, </span><span class="tag">fastest</span></span>
51
+ <span class="spec" aria-hidden="true">
52
+ <span class="sh"><span title="Measured in Chrome on an Apple M5 Max">M5 Max</span><span>first sound</span><span>real time</span><span>download</span></span>
53
+ <span class="sb"><span class="rl">CPU</span><span>35 ms</span><span>86脳</span><span>14.8 MB</span><span class="rl">WebGPU</span><span>25 ms</span><span>128脳</span><span>30.6 MB</span><span class="ft"><b>7.5M</b> parameters</span><span class="ft"><b>10</b> voices</span></span>
54
+ </span>
55
+ <span class="sr" id="d-nano">7.5M parameters, 10 voices. On the CPU: first sound 35 ms, 86 times real time, 14.8 MB download. On WebGPU: first sound 25 ms, 128 times real time, 30.6 MB download. Measured in Chrome on an Apple M5 Max.</span>
56
  </button>
57
+ <button class="mcard" role="radio" aria-checked="false" tabindex="-1" data-m="kale-tts-1-tiny" aria-labelledby="n-tiny" aria-describedby="t-tiny d-tiny">
58
+ <span class="mname" id="n-tiny">kale-tts-1-<b>tiny</b></span>
59
+ <span class="mtraits" id="t-tiny"><span class="mstate" aria-hidden="true"></span><span class="tag">clearer</span><span class="sr">, </span><span class="tag">more expressive</span></span>
60
+ <span class="spec" aria-hidden="true">
61
+ <span class="sh"><span title="Measured in Chrome on an Apple M5 Max">M5 Max</span><span>first sound</span><span>real time</span><span>download</span></span>
62
+ <span class="sb"><span class="rl">CPU</span><span>63 ms</span><span>50脳</span><span>79.9 MB</span><span class="rl">WebGPU</span><span>61 ms</span><span>53脳</span><span>183.2 MB</span><span class="ft"><b>45.7M</b> parameters</span><span class="ft"><b>10</b> voices</span></span>
63
+ </span>
64
+ <span class="sr" id="d-tiny">45.7M parameters, 10 voices. On the CPU: first sound 63 ms, 50 times real time, 79.9 MB download. On WebGPU: first sound 61 ms, 53 times real time, 183.2 MB download. Measured in Chrome on an Apple M5 Max.</span>
65
  </button>
66
  </div>
67
  <span class="sr" role="progressbar" id="mprogress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-label="Downloading the model" hidden></span>
style.css CHANGED
@@ -43,28 +43,33 @@ button,textarea{font:inherit;color:inherit}
43
  .models{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:var(--break)}
44
  /* text edge: the 1px border is part of the 15px side padding of the cards, the composer and the keys, so their text starts at x=64
45
  with the stats'; don't round these to 16 */
46
- .mcard{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;gap:4px;height:56px;padding:0 15px;border-radius:var(--r);text-align:left;cursor:pointer;
47
  color:var(--muted);background:var(--surface);border:1px solid var(--line);transition:border-color .2s,background .2s,color .2s}
48
  /* while the other model loads, this one can't be picked */
49
  .mcard:not([aria-disabled="true"]):hover{border-color:var(--line-strong)}.mcard[aria-disabled="true"]{cursor:default}
50
  .mcard[aria-checked="true"]{background:var(--surface-2);border-color:var(--line-sel);color:var(--ink)}
51
- .mrow{display:flex;align-items:center;justify-content:space-between;gap:8px;height:22px}
52
  .mname{font-size:16px;line-height:22px;font-weight:600;white-space:nowrap}.mname b{font-weight:800}
53
- .mfacts,.mtraits{display:flex;gap:8px}
54
- /* parameters, size and traits: plain grey text (the card alone carries the pick); parameters and size of fixed width, so switching
55
- models moves nothing */
56
- .fact,.sep,.mtraits>span{flex:none;font-size:12px;font-weight:500;color:var(--muted);font-variant-numeric:tabular-nums}
57
- .mfacts{line-height:22px}.mtraits{height:18px;line-height:18px}
58
- /* loading: the card says where it is in its traits row, and a 2px bar along its bottom edge fills with the download */
59
- .mstate{display:none}.mcard.busy .mtraits>span{display:none}.mcard.busy .mtraits>.mstate{display:block;color:var(--soft)}
60
  .mcard.failed .mtraits>.mstate{color:var(--ink)}
61
  .mcard.busy:not(.failed)::before,.mcard.busy:not(.failed)::after{content:"";position:absolute;left:0;bottom:0;height:2px;pointer-events:none}
62
  .mcard.busy:not(.failed)::before{right:0;background:var(--line)}
63
  .mcard.busy:not(.failed)::after{width:calc(var(--p,0) * 100%);background:var(--soft);transition:width .2s linear}
64
- .fact.p{width:36px;text-align:right}
65
- /* the download per backend: the CPU (int8) file on the first row, the WebGPU (float32) file under it, right-aligned */
66
- .mrow2{display:flex;align-items:center;justify-content:space-between;gap:8px}
67
- .fact.s,.fact.g{text-align:right}.fact .lbl{color:var(--dim)}
 
 
 
 
 
 
 
 
68
  /* read by screen readers only */
69
  .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
70
 
 
43
  .models{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:var(--break)}
44
  /* text edge: the 1px border is part of the 15px side padding of the cards, the composer and the keys, so their text starts at x=64
45
  with the stats'; don't round these to 16 */
46
+ .mcard{position:relative;overflow:hidden;display:flex;flex-direction:column;min-width:0;padding:11px 15px 15px;border-radius:var(--r);text-align:left;cursor:pointer;
47
  color:var(--muted);background:var(--surface);border:1px solid var(--line);transition:border-color .2s,background .2s,color .2s}
48
  /* while the other model loads, this one can't be picked */
49
  .mcard:not([aria-disabled="true"]):hover{border-color:var(--line-strong)}.mcard[aria-disabled="true"]{cursor:default}
50
  .mcard[aria-checked="true"]{background:var(--surface-2);border-color:var(--line-sel);color:var(--ink)}
 
51
  .mname{font-size:16px;line-height:22px;font-weight:600;white-space:nowrap}.mname b{font-weight:800}
52
+ /* the traits as tags under the name, on a row of their own so both cards' tables start at the same height */
53
+ .mtraits{display:flex;flex-wrap:wrap;gap:6px;min-height:22px;margin-top:6px}
54
+ .tag{display:inline-flex;align-items:center;height:22px;padding:0 8px;border:1px solid var(--line-strong);border-radius:var(--r-sm);font-size:12px;font-weight:500;line-height:1;color:var(--soft);white-space:nowrap}
55
+ /* loading: the card says where it is in place of its tags, and a 2px bar along its bottom edge fills with the download */
56
+ .mstate{display:none;font-size:12px;font-weight:500;line-height:22px}.mcard.busy .mtraits>:not(.mstate){display:none}.mcard.busy .mtraits>.mstate{display:block;color:var(--soft)}
 
 
57
  .mcard.failed .mtraits>.mstate{color:var(--ink)}
58
  .mcard.busy:not(.failed)::before,.mcard.busy:not(.failed)::after{content:"";position:absolute;left:0;bottom:0;height:2px;pointer-events:none}
59
  .mcard.busy:not(.failed)::before{right:0;background:var(--line)}
60
  .mcard.busy:not(.failed)::after{width:calc(var(--p,0) * 100%);background:var(--soft);transition:width .2s linear}
61
+ /* the facts: one table, the same cells in the same places on both cards, so each number sits beside its counterpart. Columns: the
62
+ backend, then first sound, real time and download; the last row is parameters and voices. Each cell is its own box (1px gaps) */
63
+ .spec{display:block;margin-top:12px;font-variant-numeric:tabular-nums}
64
+ /* fixed shares of the card's width, so both cards' columns line up; sized for the 296px desktop card (183.2 MB, WebGPU) */
65
+ .sh,.sb{display:grid;grid-template-columns:minmax(64px,.8fr) minmax(66px,1fr) minmax(58px,.7fr) minmax(70px,1fr)}
66
+ .sh{padding-bottom:4px;font-size:11px;line-height:16px;color:var(--dim)}.sh>span{padding:0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
67
+ .sb{gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden}
68
+ .sb>span{padding:4px 6px;font-size:13px;font-weight:500;line-height:20px;white-space:nowrap;color:var(--muted);background:var(--surface);transition:background .2s,color .2s}
69
+ .mcard[aria-checked="true"] .sb>span{background:var(--surface-2);color:var(--ink)}
70
+ .sb>.rl,.mcard[aria-checked="true"] .sb>.rl{font-size:12px;color:var(--dim)}
71
+ .sb>.ft{grid-column:1/3;font-size:12px;color:var(--dim)}.sb>.ft+.ft{grid-column:3/5}
72
+ .sb>.ft b{font-size:13px;font-weight:500;color:var(--muted)}.mcard[aria-checked="true"] .sb>.ft b{color:var(--ink)}
73
  /* read by screen readers only */
74
  .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
75