import{s as W,n as A,o as R}from"../chunks/scheduler.8c3d61f6.js";import{S,i as V,g as h,s as l,r as j,A as X,h as d,f as a,c as s,j as L,u as Z,x as P,k as B,y as Y,a as i,v as H,d as k,t as I,w as x}from"../chunks/index.da70eac4.js";import{C as O}from"../chunks/CodeBlock.a9c4becf.js";import{H as D,E as Q}from"../chunks/getInferenceSnippets.cb466318.js";function K(C){let n,g,b,M,r,G,p,q='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.',y,u,E='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>.',_,c,z="Call <code>.to(&quot;hpu&quot;)</code> on your pipeline to move it to a HPU device as shown below for Flux:",T,m,$,o,F='<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>',v,f,J,w,U;return r=new D({props:{title:"Intel Gaudi",local:"intel-gaudi",headingTag:"h1"}}),m=new O({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}}),f=new Q({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/optimization/habana.md"}}),{c(){n=h("meta"),g=l(),b=h("p"),M=l(),j(r.$$.fragment),G=l(),p=h("p"),p.innerHTML=q,y=l(),u=h("p"),u.innerHTML=E,_=l(),c=h("p"),c.innerHTML=z,T=l(),j(m.$$.fragment),$=l(),o=h("blockquote"),o.innerHTML=F,v=l(),j(f.$$.fragment),J=l(),w=h("p"),this.h()},l(e){const t=X("svelte-u9bgzb",document.head);n=d(t,"META",{name:!0,content:!0}),t.forEach(a),g=s(e),b=d(e,"P",{}),L(b).forEach(a),M=s(e),Z(r.$$.fragment,e),G=s(e),p=d(e,"P",{"data-svelte-h":!0}),P(p)!=="svelte-17co6sl"&&(p.innerHTML=q),y=s(e),u=d(e,"P",{"data-svelte-h":!0}),P(u)!=="svelte-11utcp"&&(u.innerHTML=E),_=s(e),c=d(e,"P",{"data-svelte-h":!0}),P(c)!=="svelte-ejjfs6"&&(c.innerHTML=z),T=s(e),Z(m.$$.fragment,e),$=s(e),o=d(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),P(o)!=="svelte-qb50nz"&&(o.innerHTML=F),v=s(e),Z(f.$$.fragment,e),J=s(e),w=d(e,"P",{}),L(w).forEach(a),this.h()},h(){B(n,"name","hf:doc:metadata"),B(n,"content",N),B(o,"class","tip")},m(e,t){Y(document.head,n),i(e,g,t),i(e,b,t),i(e,M,t),H(r,e,t),i(e,G,t),i(e,p,t),i(e,y,t),i(e,u,t),i(e,_,t),i(e,c,t),i(e,T,t),H(m,e,t),i(e,$,t),i(e,o,t),i(e,v,t),H(f,e,t),i(e,J,t),i(e,w,t),U=!0},p:A,i(e){U||(k(r.$$.fragment,e),k(m.$$.fragment,e),k(f.$$.fragment,e),U=!0)},o(e){I(r.$$.fragment,e),I(m.$$.fragment,e),I(f.$$.fragment,e),U=!1},d(e){e&&(a(g),a(b),a(M),a(G),a(p),a(y),a(u),a(_),a(c),a(T),a($),a(o),a(v),a(J),a(w)),a(n),x(r,e),x(m,e),x(f,e)}}}const N='{"title":"Intel Gaudi","local":"intel-gaudi","sections":[],"depth":1}';function ee(C){return R(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class le extends S{constructor(n){super(),V(this,n,ee,K,W,{})}}export{le as component};
