import{s as R,n as A,o as V}from"../chunks/scheduler.53228c21.js";import{S as X,i as Y,e as h,s as n,c as Z,h as O,a as g,d as a,b as l,f as S,g as x,j as B,k as q,l as D,m as i,n as H,t as k,o as I,p as C}from"../chunks/index.100fac89.js";import{C as Q}from"../chunks/CopyLLMTxtMenu.0ee1b69b.js";import{C as K}from"../chunks/CodeBlock.d30a6509.js";import{H as N,E as ee}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";function te(E){let s,M,b,G,r,$,p,y,u,L='The Intel Gaudi AI accelerator family includes <a href="https://habana.ai/products/gaudi/" rel="nofollow">Intel Gaudi 1</a>, <a href="https://habana.ai/products/gaudi2/" rel="nofollow">Intel Gaudi 2</a>, and <a href="https://habana.ai/products/gaudi3/" rel="nofollow">Intel Gaudi 3</a>. Each server is equipped with 8 devices, known as Habana Processing Units (HPUs), providing 128GB of memory on Gaudi 3, 96GB on Gaudi 2, and 32GB on the first-gen Gaudi. For more details on the underlying hardware architecture, check out the <a href="https://docs.habana.ai/en/latest/Gaudi_Overview/Gaudi_Architecture.html" rel="nofollow">Gaudi Architecture</a> overview.',T,m,z='Diffusers pipelines can take advantage of HPU acceleration, even if a pipeline hasn’t been added to <a href="https://huggingface.co/docs/optimum/main/en/habana/index" rel="nofollow">Optimum for Intel Gaudi</a> yet, with the <a href="https://docs.habana.ai/en/latest/PyTorch/PyTorch_Model_Porting/GPU_Migration_Toolkit/GPU_Migration_Toolkit.html" rel="nofollow">GPU Migration Toolkit</a>.',_,f,F="Call <code>.to(&quot;hpu&quot;)</code> on your pipeline to move it to a HPU device as shown below for Flux:",v,c,J,o,W='<p>For Gaudi-optimized diffusion pipeline implementations, we recommend using <a href="https://huggingface.co/docs/optimum/main/en/habana/index" rel="nofollow">Optimum for Intel Gaudi</a>.</p>',U,d,P,w,j;return r=new Q({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),p=new N({props:{title:"Intel Gaudi",local:"intel-gaudi",headingTag:"h1"}}),c=new K({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJibGFjay1mb3Jlc3QtbGFicyUyRkZMVVguMS1zY2huZWxsJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlbGluZS50byglMjJocHUlMjIpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZSglMjJBbiUyMGltYWdlJTIwb2YlMjBhJTIwc3F1aXJyZWwlMjBpbiUyMFBpY2Fzc28lMjBzdHlsZSUyMikuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

pipeline = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;black-forest-labs/FLUX.1-schnell&quot;</span>, torch_dtype=torch.bfloat16)
pipeline.to(<span class="hljs-string">&quot;hpu&quot;</span>)

image = pipeline(<span class="hljs-string">&quot;An image of a squirrel in Picasso style&quot;</span>).images[<span class="hljs-number">0</span>]`,wrap:!1}}),d=new ee({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/optimization/habana.md"}}),{c(){s=h("meta"),M=n(),b=h("p"),G=n(),Z(r.$$.fragment),$=n(),Z(p.$$.fragment),y=n(),u=h("p"),u.innerHTML=L,T=n(),m=h("p"),m.innerHTML=z,_=n(),f=h("p"),f.innerHTML=F,v=n(),Z(c.$$.fragment),J=n(),o=h("blockquote"),o.innerHTML=W,U=n(),Z(d.$$.fragment),P=n(),w=h("p"),this.h()},l(e){const t=O("svelte-u9bgzb",document.head);s=g(t,"META",{name:!0,content:!0}),t.forEach(a),M=l(e),b=g(e,"P",{}),S(b).forEach(a),G=l(e),x(r.$$.fragment,e),$=l(e),x(p.$$.fragment,e),y=l(e),u=g(e,"P",{"data-svelte-h":!0}),B(u)!=="svelte-17co6sl"&&(u.innerHTML=L),T=l(e),m=g(e,"P",{"data-svelte-h":!0}),B(m)!=="svelte-11utcp"&&(m.innerHTML=z),_=l(e),f=g(e,"P",{"data-svelte-h":!0}),B(f)!=="svelte-ejjfs6"&&(f.innerHTML=F),v=l(e),x(c.$$.fragment,e),J=l(e),o=g(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),B(o)!=="svelte-qb50nz"&&(o.innerHTML=W),U=l(e),x(d.$$.fragment,e),P=l(e),w=g(e,"P",{}),S(w).forEach(a),this.h()},h(){q(s,"name","hf:doc:metadata"),q(s,"content",ae),q(o,"class","tip")},m(e,t){D(document.head,s),i(e,M,t),i(e,b,t),i(e,G,t),H(r,e,t),i(e,$,t),H(p,e,t),i(e,y,t),i(e,u,t),i(e,T,t),i(e,m,t),i(e,_,t),i(e,f,t),i(e,v,t),H(c,e,t),i(e,J,t),i(e,o,t),i(e,U,t),H(d,e,t),i(e,P,t),i(e,w,t),j=!0},p:A,i(e){j||(k(r.$$.fragment,e),k(p.$$.fragment,e),k(c.$$.fragment,e),k(d.$$.fragment,e),j=!0)},o(e){I(r.$$.fragment,e),I(p.$$.fragment,e),I(c.$$.fragment,e),I(d.$$.fragment,e),j=!1},d(e){e&&(a(M),a(b),a(G),a($),a(y),a(u),a(T),a(m),a(_),a(f),a(v),a(J),a(o),a(U),a(P),a(w)),a(s),C(r,e),C(p,e),C(c,e),C(d,e)}}}const ae='{"title":"Intel Gaudi","local":"intel-gaudi","sections":[],"depth":1}';function ie(E){return V(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class pe extends X{constructor(s){super(),Y(this,s,ie,te,R,{})}}export{pe as component};
