Buckets:

rtrm's picture
download
raw
20.2 kB
<meta charset="utf-8" /><meta http-equiv="content-security-policy" content=""><meta name="hf:doc:metadata" content="{&quot;local&quot;:&quot;token-merging&quot;,&quot;sections&quot;:[{&quot;local&quot;:&quot;using-tome&quot;,&quot;title&quot;:&quot;Using ToMe&quot;},{&quot;local&quot;:&quot;benchmarking-tomesd-with-stablediffusionpipeline&quot;,&quot;sections&quot;:[{&quot;local&quot;:&quot;a100&quot;,&quot;title&quot;:&quot;A100&quot;},{&quot;local&quot;:&quot;v100&quot;,&quot;title&quot;:&quot;V100&quot;}],&quot;title&quot;:&quot;Benchmarking `tomesd` with `StableDiffusionPipeline`&quot;},{&quot;local&quot;:&quot;quality&quot;,&quot;title&quot;:&quot;Quality&quot;}],&quot;title&quot;:&quot;Token Merging&quot;}" data-svelte="svelte-1phssyn">
<link rel="modulepreload" href="/docs/diffusers/v0.19.3/en/_app/assets/pages/__layout.svelte-hf-doc-builder.css">
<link rel="modulepreload" href="/docs/diffusers/v0.19.3/en/_app/start-hf-doc-builder.js">
<link rel="modulepreload" href="/docs/diffusers/v0.19.3/en/_app/chunks/vendor-hf-doc-builder.js">
<link rel="modulepreload" href="/docs/diffusers/v0.19.3/en/_app/chunks/paths-hf-doc-builder.js">
<link rel="modulepreload" href="/docs/diffusers/v0.19.3/en/_app/pages/__layout.svelte-hf-doc-builder.js">
<link rel="modulepreload" href="/docs/diffusers/v0.19.3/en/_app/pages/optimization/tome.mdx-hf-doc-builder.js">
<link rel="modulepreload" href="/docs/diffusers/v0.19.3/en/_app/chunks/IconCopyLink-hf-doc-builder.js">
<link rel="modulepreload" href="/docs/diffusers/v0.19.3/en/_app/chunks/CodeBlock-hf-doc-builder.js">
<h1 class="relative group"><a id="token-merging" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#token-merging"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
<span>Token Merging
</span></h1>
<p>Token Merging (introduced in <a href="https://arxiv.org/abs/2210.09461" rel="nofollow">Token Merging: Your ViT But Faster</a>) works by merging the redundant tokens / patches progressively in the forward pass of a Transformer-based network. It can speed up the inference latency of the underlying network.</p>
<p>After Token Merging (ToMe) was released, the authors released <a href="https://arxiv.org/abs/2303.17604" rel="nofollow">Token Merging for Fast Stable Diffusion</a>, which introduced a version of ToMe which is more compatible with Stable Diffusion. We can use ToMe to gracefully speed up the inference latency of a <a href="/docs/diffusers/v0.19.3/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. This doc discusses how to apply ToMe to the <a href="/docs/diffusers/v0.19.3/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline">StableDiffusionPipeline</a>, the expected speedups, and the qualitative aspects of using ToMe on the <a href="/docs/diffusers/v0.19.3/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline">StableDiffusionPipeline</a>. </p>
<h2 class="relative group"><a id="using-tome" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#using-tome"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
<span>Using ToMe
</span></h2>
<p>The authors of ToMe released a convenient Python library called <a href="https://github.com/dbolya/tomesd" rel="nofollow"><code>tomesd</code></a> that lets us apply ToMe to a <a href="/docs/diffusers/v0.19.3/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a> like so:</p>
<div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg>
<div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div>
Copied</div></button></div>
<pre><!-- HTML_TAG_START -->from diffusers import StableDiffusionPipeline
import tomesd
pipeline = StableDiffusionPipeline.from_pretrained(
&quot;runwayml/stable-diffusion-v1-5&quot;, torch_dtype=torch.float16
).to(&quot;cuda&quot;)
<span class="hljs-addition">+ tomesd.apply_patch(pipeline, ratio=0.5)</span>
image = pipeline(&quot;a photo of an astronaut riding a horse on mars&quot;).images[0]<!-- HTML_TAG_END --></pre></div>
<p>And that’s it! </p>
<p><code>tomesd.apply_patch()</code> exposes <a href="https://github.com/dbolya/tomesd#usage" rel="nofollow">a number of arguments</a> to let us strike a balance between the pipeline inference speed and the quality of the generated tokens. Amongst those arguments, the most important one is <code>ratio</code>. <code>ratio</code> controls the number of tokens that will be merged during the forward pass. For more details on <code>tomesd</code>, please refer to the original repository <a href="https://github.com/dbolya/tomesd" rel="nofollow">https://github.com/dbolya/tomesd</a> and <a href="https://arxiv.org/abs/2303.17604" rel="nofollow">the paper</a>. </p>
<h2 class="relative group"><a id="benchmarking-tomesd-with-stablediffusionpipeline" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#benchmarking-tomesd-with-stablediffusionpipeline"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
<span>Benchmarking <code>tomesd</code> with <code>StableDiffusionPipeline</code></span></h2>
<p>We benchmarked the impact of using <code>tomesd</code> on <a href="/docs/diffusers/v0.19.3/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline">StableDiffusionPipeline</a> along with <a href="https://huggingface.co/docs/diffusers/optimization/xformers" rel="nofollow">xformers</a> across different image resolutions. We used A100 and V100 as our test GPU devices with the following development environment (with Python 3.8.5):</p>
<div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg>
<div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div>
Copied</div></button></div>
<pre><!-- HTML_TAG_START -->- `diffusers` version: 0.15.1
- Python version: 3.8.16
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Huggingface_hub version: 0.13.2
- Transformers version: 4.27.2
- Accelerate version: 0.18.0
- xFormers version: 0.0.16
- tomesd version: 0.1.2<!-- HTML_TAG_END --></pre></div>
<p>We used this script for benchmarking: <a href="https://gist.github.com/sayakpaul/27aec6bca7eb7b0e0aa4112205850335" rel="nofollow">https://gist.github.com/sayakpaul/27aec6bca7eb7b0e0aa4112205850335</a>. Following are our findings: </p>
<h3 class="relative group"><a id="a100" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#a100"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
<span>A100
</span></h3>
<table><thead><tr><th>Resolution</th>
<th>Batch size</th>
<th>Vanilla</th>
<th>ToMe</th>
<th>ToMe + xFormers</th>
<th>ToMe speedup (%)</th>
<th>ToMe + xFormers speedup (%)</th></tr></thead>
<tbody><tr><td>512</td>
<td>10</td>
<td>6.88</td>
<td>5.26</td>
<td>4.69</td>
<td>23.54651163</td>
<td>31.83139535</td></tr>
<tr><td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td></tr>
<tr><td>768</td>
<td>10</td>
<td>OOM</td>
<td>14.71</td>
<td>11</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>8</td>
<td>OOM</td>
<td>11.56</td>
<td>8.84</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>4</td>
<td>OOM</td>
<td>5.98</td>
<td>4.66</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>2</td>
<td>4.99</td>
<td>3.24</td>
<td>3.1</td>
<td>35.07014028</td>
<td>37.8757515</td></tr>
<tr><td></td>
<td>1</td>
<td>3.29</td>
<td>2.24</td>
<td>2.03</td>
<td>31.91489362</td>
<td>38.29787234</td></tr>
<tr><td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td></tr>
<tr><td>1024</td>
<td>10</td>
<td>OOM</td>
<td>OOM</td>
<td>OOM</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>8</td>
<td>OOM</td>
<td>OOM</td>
<td>OOM</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>4</td>
<td>OOM</td>
<td>12.51</td>
<td>9.09</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>2</td>
<td>OOM</td>
<td>6.52</td>
<td>4.96</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>1</td>
<td>6.4</td>
<td>3.61</td>
<td>2.81</td>
<td>43.59375</td>
<td>56.09375</td></tr></tbody></table>
<p><strong><em>The timings reported here are in seconds. Speedups are calculated over the <code>Vanilla</code> timings.</em></strong></p>
<h3 class="relative group"><a id="v100" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#v100"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
<span>V100
</span></h3>
<table><thead><tr><th>Resolution</th>
<th>Batch size</th>
<th>Vanilla</th>
<th>ToMe</th>
<th>ToMe + xFormers</th>
<th>ToMe speedup (%)</th>
<th>ToMe + xFormers speedup (%)</th></tr></thead>
<tbody><tr><td>512</td>
<td>10</td>
<td>OOM</td>
<td>10.03</td>
<td>9.29</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>8</td>
<td>OOM</td>
<td>8.05</td>
<td>7.47</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>4</td>
<td>5.7</td>
<td>4.3</td>
<td>3.98</td>
<td>24.56140351</td>
<td>30.1754386</td></tr>
<tr><td></td>
<td>2</td>
<td>3.14</td>
<td>2.43</td>
<td>2.27</td>
<td>22.61146497</td>
<td>27.70700637</td></tr>
<tr><td></td>
<td>1</td>
<td>1.88</td>
<td>1.57</td>
<td>1.57</td>
<td>16.4893617</td>
<td>16.4893617</td></tr>
<tr><td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td></tr>
<tr><td>768</td>
<td>10</td>
<td>OOM</td>
<td>OOM</td>
<td>23.67</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>8</td>
<td>OOM</td>
<td>OOM</td>
<td>18.81</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>4</td>
<td>OOM</td>
<td>11.81</td>
<td>9.7</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>2</td>
<td>OOM</td>
<td>6.27</td>
<td>5.2</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>1</td>
<td>5.43</td>
<td>3.38</td>
<td>2.82</td>
<td>37.75322284</td>
<td>48.06629834</td></tr>
<tr><td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td></tr>
<tr><td>1024</td>
<td>10</td>
<td>OOM</td>
<td>OOM</td>
<td>OOM</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>8</td>
<td>OOM</td>
<td>OOM</td>
<td>OOM</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>4</td>
<td>OOM</td>
<td>OOM</td>
<td>19.35</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>2</td>
<td>OOM</td>
<td>13</td>
<td>10.78</td>
<td></td>
<td></td></tr>
<tr><td></td>
<td>1</td>
<td>OOM</td>
<td>6.66</td>
<td>5.54</td>
<td></td>
<td></td></tr></tbody></table>
<p>As seen in the tables above, the speedup with <code>tomesd</code> becomes more pronounced for larger image resolutions. It is also interesting to note that with <code>tomesd</code>, it becomes possible to run the pipeline on a higher resolution, like 1024x1024. </p>
<p>It might be possible to speed up inference even further with <a href="https://huggingface.co/docs/diffusers/optimization/torch2.0" rel="nofollow"><code>torch.compile()</code></a>. </p>
<h2 class="relative group"><a id="quality" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#quality"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
<span>Quality
</span></h2>
<p>As reported in <a href="https://arxiv.org/abs/2303.17604" rel="nofollow">the paper</a>, ToMe can preserve the quality of the generated images to a great extent while speeding up inference. By increasing the <code>ratio</code>, it is possible to further speed up inference, but that might come at the cost of a deterioration in the image quality. </p>
<p>To test the quality of the generated samples using our setup, we sampled a few prompts from the “Parti Prompts” (introduced in <a href="https://parti.research.google/" rel="nofollow">Parti</a>) and performed inference with the <a href="/docs/diffusers/v0.19.3/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline">StableDiffusionPipeline</a> in the following settings:</p>
<ul><li>Vanilla <a href="/docs/diffusers/v0.19.3/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline">StableDiffusionPipeline</a></li>
<li><a href="/docs/diffusers/v0.19.3/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline">StableDiffusionPipeline</a> + ToMe</li>
<li><a href="/docs/diffusers/v0.19.3/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline">StableDiffusionPipeline</a> + ToMe + xformers</li></ul>
<p>We didn’t notice any significant decrease in the quality of the generated samples. Here are samples: </p>
<p><img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/tome/tome_samples.png" alt="tome-samples"></p>
<p>You can check out the generated samples <a href="https://wandb.ai/sayakpaul/tomesd-results/runs/23j4bj3i?workspace=" rel="nofollow">here</a>. We used <a href="https://gist.github.com/sayakpaul/8cac98d7f22399085a060992f411ecbd" rel="nofollow">this script</a> for conducting this experiment.</p>
<script type="module" data-hydrate="1mmi0fv">
import { start } from "/docs/diffusers/v0.19.3/en/_app/start-hf-doc-builder.js";
start({
target: document.querySelector('[data-hydrate="1mmi0fv"]').parentNode,
paths: {"base":"/docs/diffusers/v0.19.3/en","assets":"/docs/diffusers/v0.19.3/en"},
session: {},
route: false,
spa: false,
trailing_slash: "never",
hydrate: {
status: 200,
error: null,
nodes: [
import("/docs/diffusers/v0.19.3/en/_app/pages/__layout.svelte-hf-doc-builder.js"),
import("/docs/diffusers/v0.19.3/en/_app/pages/optimization/tome.mdx-hf-doc-builder.js")
],
params: {}
}
});
</script>

Xet Storage Details

Size:
20.2 kB
·
Xet hash:
989a9ec920b11c21ebc06544e42570cb503e8a7ff9f34f8d1f9715ffa44f5c34

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.