import{S as _l,i as yl,s as vl,e as s,k as c,w as u,t as i,M as wl,c as n,d as a,m as d,a as r,x as g,h as p,b as l,N as ns,G as t,g as h,y as _,q as y,o as v,B as w,v as bl,L as gl}from"../../../chunks/vendor-hf-doc-builder.js";import{D as Re}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as mt}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as N}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ul}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ml(Xe){let b,T,M,f,j;return f=new mt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX2dpZiUwQSUwQWRldmljZSUyMCUzRCUyMHRvcmNoLmRldmljZSglMjJjdWRhJTIyJTIwaWYlMjB0b3JjaC5jdWRhLmlzX2F2YWlsYWJsZSgpJTIwZWxzZSUyMCUyMmNwdSUyMiklMEElMEFyZXBvJTIwJTNEJTIwJTIyb3BlbmFpJTJGc2hhcC1lJTIyJTBBcGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChyZXBvJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KSUwQXBpcGUlMjAlM0QlMjBwaXBlLnRvKGRldmljZSklMEElMEFndWlkYW5jZV9zY2FsZSUyMCUzRCUyMDE1LjAlMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwc2hhcmslMjIlMEElMEFpbWFnZXMlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMHByb21wdCUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNEZ3VpZGFuY2Vfc2NhbGUlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENjQlMkMlMEElMjAlMjAlMjAlMjBmcmFtZV9zaXplJTNEMjU2JTJDJTBBKS5pbWFnZXMlMEElMEFnaWZfcGF0aCUyMCUzRCUyMGV4cG9ydF90b19naWYoaW1hZ2VzJTVCMCU1RCUyQyUyMCUyMnNoYXJrXzNkLmdpZiUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_gif

<span class="hljs-meta">&gt;&gt;&gt; </span>device = torch.device(<span class="hljs-string">&quot;cuda&quot;</span> <span class="hljs-keyword">if</span> torch.cuda.is_available() <span class="hljs-keyword">else</span> <span class="hljs-string">&quot;cpu&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>repo = <span class="hljs-string">&quot;openai/shap-e&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = DiffusionPipeline.from_pretrained(repo, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(device)

<span class="hljs-meta">&gt;&gt;&gt; </span>guidance_scale = <span class="hljs-number">15.0</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a shark&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>images = pipe(
<span class="hljs-meta">... </span>    prompt,
<span class="hljs-meta">... </span>    guidance_scale=guidance_scale,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">64</span>,
<span class="hljs-meta">... </span>    frame_size=<span class="hljs-number">256</span>,
<span class="hljs-meta">... </span>).images

<span class="hljs-meta">&gt;&gt;&gt; </span>gif_path = export_to_gif(images[<span class="hljs-number">0</span>], <span class="hljs-string">&quot;shark_3d.gif&quot;</span>)`}}),{c(){b=s("p"),T=i("Examples:"),M=c(),u(f.$$.fragment)},l(m){b=n(m,"P",{});var E=r(b);T=p(E,"Examples:"),E.forEach(a),M=d(m),g(f.$$.fragment,m)},m(m,E){h(m,b,E),t(b,T),h(m,M,E),_(f,m,E),j=!0},p:gl,i(m){j||(y(f.$$.fragment,m),j=!0)},o(m){v(f.$$.fragment,m),j=!1},d(m){m&&a(b),m&&a(M),w(f,m)}}}function El(Xe){let b,T,M,f,j;return f=new mt({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX2dpZiUyQyUyMGxvYWRfaW1hZ2UlMEElMEFkZXZpY2UlMjAlM0QlMjB0b3JjaC5kZXZpY2UoJTIyY3VkYSUyMiUyMGlmJTIwdG9yY2guY3VkYS5pc19hdmFpbGFibGUoKSUyMGVsc2UlMjAlMjJjcHUlMjIpJTBBJTBBcmVwbyUyMCUzRCUyMCUyMm9wZW5haSUyRnNoYXAtZS1pbWcyaW1nJTIyJTBBcGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChyZXBvJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KSUwQXBpcGUlMjAlM0QlMjBwaXBlLnRvKGRldmljZSklMEElMEFndWlkYW5jZV9zY2FsZSUyMCUzRCUyMDMuMCUwQWltYWdlX3VybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaGYuY28lMkZkYXRhc2V0cyUyRmRpZmZ1c2VycyUyRmRvY3MtaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZzaGFwLWUlMkZjb3JnaS5wbmclMjIlMEFpbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoaW1hZ2VfdXJsKS5jb252ZXJ0KCUyMlJHQiUyMiklMEElMEFpbWFnZXMlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMGltYWdlJTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0RndWlkYW5jZV9zY2FsZSUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q2NCUyQyUwQSUyMCUyMCUyMCUyMGZyYW1lX3NpemUlM0QyNTYlMkMlMEEpLmltYWdlcyUwQSUwQWdpZl9wYXRoJTIwJTNEJTIwZXhwb3J0X3RvX2dpZihpbWFnZXMlNUIwJTVEJTJDJTIwJTIyY29yZ2lfM2QuZ2lmJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_gif, load_image

<span class="hljs-meta">&gt;&gt;&gt; </span>device = torch.device(<span class="hljs-string">&quot;cuda&quot;</span> <span class="hljs-keyword">if</span> torch.cuda.is_available() <span class="hljs-keyword">else</span> <span class="hljs-string">&quot;cpu&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>repo = <span class="hljs-string">&quot;openai/shap-e-img2img&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = DiffusionPipeline.from_pretrained(repo, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(device)

<span class="hljs-meta">&gt;&gt;&gt; </span>guidance_scale = <span class="hljs-number">3.0</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image_url = <span class="hljs-string">&quot;https://hf.co/datasets/diffusers/docs-images/resolve/main/shap-e/corgi.png&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = load_image(image_url).convert(<span class="hljs-string">&quot;RGB&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>images = pipe(
<span class="hljs-meta">... </span>    image,
<span class="hljs-meta">... </span>    guidance_scale=guidance_scale,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">64</span>,
<span class="hljs-meta">... </span>    frame_size=<span class="hljs-number">256</span>,
<span class="hljs-meta">... </span>).images

<span class="hljs-meta">&gt;&gt;&gt; </span>gif_path = export_to_gif(images[<span class="hljs-number">0</span>], <span class="hljs-string">&quot;corgi_3d.gif&quot;</span>)`}}),{c(){b=s("p"),T=i("Examples:"),M=c(),u(f.$$.fragment)},l(m){b=n(m,"P",{});var E=r(b);T=p(E,"Examples:"),E.forEach(a),M=d(m),g(f.$$.fragment,m)},m(m,E){h(m,b,E),t(b,T),h(m,M,E),_(f,m,E),j=!0},p:gl,i(m){j||(y(f.$$.fragment,m),j=!0)},o(m){v(f.$$.fragment,m),j=!1},d(m){m&&a(b),m&&a(M),w(f,m)}}}function Ul(Xe){let b,T,M,f,j,m,E,ft,rs,sa,C,R,ut,ce,ls,gt,os,na,k,is,de,ps,cs,he,ds,hs,ra,ze,ms,la,qe,_t,fs,oa,X,us,me,gs,_s,ia,W,z,yt,fe,ys,vt,vs,pa,q,wt,ue,bt,ws,bs,Mt,Ms,Es,ge,_e,Et,ye,Us,js,Ut,jt,Js,Is,ve,Jt,we,Ts,$s,It,Tt,ks,ca,B,Q,$t,be,Zs,kt,Ss,da,L,Zt,Me,St,Ps,Gs,Pt,Ee,Gt,xs,ha,D,H,xt,Ue,Cs,Ct,Ws,ma,Qe,Bs,fa,A,O,Wt,je,Ds,Bt,As,ua,K,Vs,Le,Ys,Fs,ga,Je,_a,Z,Ns,He,Rs,Xs,Dt,zs,qs,ya,Ie,va,ee,Oe,Qn,Qs,Ke,Ln,wa,V,te,At,Te,Ls,Vt,Hs,ba,ae,Os,et,Ks,en,Ma,tt,tn,Ea,$e,Ua,at,st,Hn,ja,nt,an,Ja,ke,Ia,rt,lt,On,Ta,Y,se,Yt,Ze,sn,Ft,nn,$a,U,Se,rn,Nt,ln,on,Pe,pn,ot,cn,dn,hn,S,Ge,mn,Rt,fn,un,ne,gn,re,xe,_n,I,yn,Xt,vn,wn,zt,bn,Mn,qt,En,Un,Qt,jn,Jn,In,le,Ce,Tn,We,$n,Lt,kn,Zn,ka,F,oe,Ht,Be,Sn,Ot,Pn,Za,J,De,Gn,Kt,xn,Cn,Ae,Wn,it,Bn,Dn,An,P,Ve,Vn,ea,Yn,Fn,ie,Nn,pe,Ye,Rn,Fe,Xn,ta,zn,qn,Sa;return m=new N({}),ce=new N({}),fe=new N({}),be=new N({}),Ue=new N({}),je=new N({}),Je=new mt({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFkZXZpY2UlMjAlM0QlMjB0b3JjaC5kZXZpY2UoJTIyY3VkYSUyMiUyMGlmJTIwdG9yY2guY3VkYS5pc19hdmFpbGFibGUoKSUyMGVsc2UlMjAlMjJjcHUlMjIpJTBBJTBBcmVwbyUyMCUzRCUyMCUyMm9wZW5haSUyRnNoYXAtZSUyMiUwQXBpcGUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQocmVwbyUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byhkZXZpY2UpJTBBJTBBZ3VpZGFuY2Vfc2NhbGUlMjAlM0QlMjAxNS4wJTBBcHJvbXB0JTIwJTNEJTIwJTVCJTIyQSUyMGZpcmVjcmFja2VyJTIyJTJDJTIwJTIyQSUyMGJpcnRoZGF5JTIwY3VwY2FrZSUyMiU1RCUwQSUwQWltYWdlcyUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0RndWlkYW5jZV9zY2FsZSUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q2NCUyQyUwQSUyMCUyMCUyMCUyMGZyYW1lX3NpemUlM0QyNTYlMkMlMEEpLmltYWdlcw==",highlighted:`<span class="hljs-keyword">import</span> torch

<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

device = torch.device(<span class="hljs-string">&quot;cuda&quot;</span> <span class="hljs-keyword">if</span> torch.cuda.is_available() <span class="hljs-keyword">else</span> <span class="hljs-string">&quot;cpu&quot;</span>)

repo = <span class="hljs-string">&quot;openai/shap-e&quot;</span>
pipe = DiffusionPipeline.from_pretrained(repo, torch_dtype=torch.float16)
pipe = pipe.to(device)

guidance_scale = <span class="hljs-number">15.0</span>
prompt = [<span class="hljs-string">&quot;A firecracker&quot;</span>, <span class="hljs-string">&quot;A birthday cupcake&quot;</span>]

images = pipe(
    prompt,
    guidance_scale=guidance_scale,
    num_inference_steps=<span class="hljs-number">64</span>,
    frame_size=<span class="hljs-number">256</span>,
).images`}}),Ie=new mt({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b19naWYlMEElMEFleHBvcnRfdG9fZ2lmKGltYWdlcyU1QjAlNUQlMkMlMjAlMjJmaXJlY3JhY2tlcl8zZC5naWYlMjIpJTBBZXhwb3J0X3RvX2dpZihpbWFnZXMlNUIxJTVEJTJDJTIwJTIyY2FrZV8zZC5naWYlMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_gif

export_to_gif(images[<span class="hljs-number">0</span>], <span class="hljs-string">&quot;firecracker_3d.gif&quot;</span>)
export_to_gif(images[<span class="hljs-number">1</span>], <span class="hljs-string">&quot;cake_3d.gif&quot;</span>)`}}),Te=new N({}),$e=new mt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlX3ByaW9yJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMmthbmRpbnNreS1jb21tdW5pdHklMkZrYW5kaW5za3ktMi0xLXByaW9yJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KSUwQXBpcGVfcHJpb3IudG8oJTIyY3VkYSUyMiklMEElMEF0MmlfcGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJrYW5kaW5za3ktY29tbXVuaXR5JTJGa2FuZGluc2t5LTItMSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEF0MmlfcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBjaGVlc2VidXJnZXIlMkMlMjB3aGl0ZSUyMGJhY2tncm91bmQlMjIlMEElMEFpbWFnZV9lbWJlZHMlMkMlMjBuZWdhdGl2ZV9pbWFnZV9lbWJlZHMlMjAlM0QlMjBwaXBlX3ByaW9yKHByb21wdCUyQyUyMGd1aWRhbmNlX3NjYWxlJTNEMS4wKS50b190dXBsZSgpJTBBaW1hZ2UlMjAlM0QlMjB0MmlfcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBpbWFnZV9lbWJlZHMlM0RpbWFnZV9lbWJlZHMlMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9pbWFnZV9lbWJlZHMlM0RuZWdhdGl2ZV9pbWFnZV9lbWJlZHMlMkMlMEEpLmltYWdlcyU1QjAlNUQlMEElMEFpbWFnZS5zYXZlKCUyMmJ1cmdlci5wbmclMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-keyword">import</span> torch

pipe_prior = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;kandinsky-community/kandinsky-2-1-prior&quot;</span>, torch_dtype=torch.float16)
pipe_prior.to(<span class="hljs-string">&quot;cuda&quot;</span>)

t2i_pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;kandinsky-community/kandinsky-2-1&quot;</span>, torch_dtype=torch.float16)
t2i_pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;A cheeseburger, white background&quot;</span>

image_embeds, negative_image_embeds = pipe_prior(prompt, guidance_scale=<span class="hljs-number">1.0</span>).to_tuple()
image = t2i_pipe(
    prompt,
    image_embeds=image_embeds,
    negative_image_embeds=negative_image_embeds,
).images[<span class="hljs-number">0</span>]

image.save(<span class="hljs-string">&quot;burger.png&quot;</span>)`}}),ke=new mt({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b19naWYlMEElMEFyZXBvJTIwJTNEJTIwJTIyb3BlbmFpJTJGc2hhcC1lLWltZzJpbWclMjIlMEFwaXBlJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKHJlcG8lMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZSUyMCUzRCUyMHBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFndWlkYW5jZV9zY2FsZSUyMCUzRCUyMDMuMCUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbiglMjJidXJnZXIucG5nJTIyKS5yZXNpemUoKDI1NiUyQyUyMDI1NikpJTBBJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBpbWFnZSUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNEZ3VpZGFuY2Vfc2NhbGUlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENjQlMkMlMEElMjAlMjAlMjAlMjBmcmFtZV9zaXplJTNEMjU2JTJDJTBBKS5pbWFnZXMlMEElMEFnaWZfcGF0aCUyMCUzRCUyMGV4cG9ydF90b19naWYoaW1hZ2VzJTVCMCU1RCUyQyUyMCUyMmJ1cmdlcl8zZC5naWYlMjIp",highlighted:`<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_gif

repo = <span class="hljs-string">&quot;openai/shap-e-img2img&quot;</span>
pipe = DiffusionPipeline.from_pretrained(repo, torch_dtype=torch.float16)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

guidance_scale = <span class="hljs-number">3.0</span>
image = Image.<span class="hljs-built_in">open</span>(<span class="hljs-string">&quot;burger.png&quot;</span>).resize((<span class="hljs-number">256</span>, <span class="hljs-number">256</span>))

images = pipe(
    image,
    guidance_scale=guidance_scale,
    num_inference_steps=<span class="hljs-number">64</span>,
    frame_size=<span class="hljs-number">256</span>,
).images

gif_path = export_to_gif(images[<span class="hljs-number">0</span>], <span class="hljs-string">&quot;burger_3d.gif&quot;</span>)`}}),Ze=new N({}),Se=new Re({props:{name:"class diffusers.ShapEPipeline",anchor:"diffusers.ShapEPipeline",parameters:[{name:"prior",val:": PriorTransformer"},{name:"text_encoder",val:": CLIPTextModelWithProjection"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"scheduler",val:": HeunDiscreteScheduler"},{name:"renderer",val:": ShapERenderer"}],parametersDescription:[{anchor:"diffusers.ShapEPipeline.prior",description:`<strong>prior</strong> (<a href="/docs/diffusers/v0.18.0/en/api/models/prior_transformer#diffusers.PriorTransformer">PriorTransformer</a>) &#x2014;
The canonincal unCLIP prior to approximate the image embedding from the text embedding.`,name:"prior"},{anchor:"diffusers.ShapEPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModelWithProjection</code>) &#x2014;
Frozen text-encoder.`,name:"text_encoder"},{anchor:"diffusers.ShapEPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.ShapEPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.18.0/en/api/schedulers/heun#diffusers.HeunDiscreteScheduler">HeunDiscreteScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>prior</code> to generate image embedding.`,name:"scheduler"},{anchor:"diffusers.ShapEPipeline.renderer",description:`<strong>renderer</strong> (<code>ShapERenderer</code>) &#x2014;
Shap-E renderer projects the generated latents into parameters of a MLP that&#x2019;s used to create 3D objects
with the NeRF rendering method`,name:"renderer"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/shap_e/pipeline_shap_e.py#L81"}}),Ge=new Re({props:{name:"__call__",anchor:"diffusers.ShapEPipeline.__call__",parameters:[{name:"prompt",val:": str"},{name:"num_images_per_prompt",val:": int = 1"},{name:"num_inference_steps",val:": int = 25"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"guidance_scale",val:": float = 4.0"},{name:"frame_size",val:": int = 64"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.ShapEPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide the image generation.`,name:"prompt"},{anchor:"diffusers.ShapEPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.ShapEPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 25) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.ShapEPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.ShapEPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.ShapEPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.ShapEPipeline.__call__.frame_size",description:`<strong>frame_size</strong> (<code>int</code>, <em>optional</em>, default to 64) &#x2014;
the width and height of each image frame of the generated 3d output`,name:"frame_size"},{anchor:"diffusers.ShapEPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pt&quot;</code>) &#x2014;
The output format of the generate image. Choose between: <code>&quot;np&quot;</code> (<code>np.array</code>) or <code>&quot;pt&quot;</code>
(<code>torch.Tensor</code>).`,name:"output_type"},{anchor:"diffusers.ShapEPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/v0.18.0/en/api/outputs#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/shap_e/pipeline_shap_e.py#L246",returnType:`
<p><code>ShapEPipelineOutput</code> or <code>tuple</code></p>
`}}),ne=new ul({props:{anchor:"diffusers.ShapEPipeline.__call__.example",$$slots:{default:[Ml]},$$scope:{ctx:Xe}}}),xe=new Re({props:{name:"enable_model_cpu_offload",anchor:"diffusers.ShapEPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/shap_e/pipeline_shap_e.py#L151"}}),Ce=new Re({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.ShapEPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/shap_e/pipeline_shap_e.py#L133"}}),Be=new N({}),De=new Re({props:{name:"class diffusers.ShapEImg2ImgPipeline",anchor:"diffusers.ShapEImg2ImgPipeline",parameters:[{name:"prior",val:": PriorTransformer"},{name:"image_encoder",val:": CLIPVisionModel"},{name:"image_processor",val:": CLIPImageProcessor"},{name:"scheduler",val:": HeunDiscreteScheduler"},{name:"renderer",val:": ShapERenderer"}],parametersDescription:[{anchor:"diffusers.ShapEImg2ImgPipeline.prior",description:`<strong>prior</strong> (<a href="/docs/diffusers/v0.18.0/en/api/models/prior_transformer#diffusers.PriorTransformer">PriorTransformer</a>) &#x2014;
The canonincal unCLIP prior to approximate the image embedding from the text embedding.`,name:"prior"},{anchor:"diffusers.ShapEImg2ImgPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModelWithProjection</code>) &#x2014;
Frozen text-encoder.`,name:"text_encoder"},{anchor:"diffusers.ShapEImg2ImgPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.ShapEImg2ImgPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.18.0/en/api/schedulers/heun#diffusers.HeunDiscreteScheduler">HeunDiscreteScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>prior</code> to generate image embedding.`,name:"scheduler"},{anchor:"diffusers.ShapEImg2ImgPipeline.renderer",description:`<strong>renderer</strong> (<code>ShapERenderer</code>) &#x2014;
Shap-E renderer projects the generated latents into parameters of a MLP that&#x2019;s used to create 3D objects
with the NeRF rendering method`,name:"renderer"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/shap_e/pipeline_shap_e_img2img.py#L81"}}),Ve=new Re({props:{name:"__call__",anchor:"diffusers.ShapEImg2ImgPipeline.__call__",parameters:[{name:"image",val:": typing.Union[PIL.Image.Image, typing.List[PIL.Image.Image]]"},{name:"num_images_per_prompt",val:": int = 1"},{name:"num_inference_steps",val:": int = 25"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"guidance_scale",val:": float = 4.0"},{name:"frame_size",val:": int = 64"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.ShapEImg2ImgPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide the image generation.`,name:"prompt"},{anchor:"diffusers.ShapEImg2ImgPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.ShapEImg2ImgPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.ShapEImg2ImgPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.ShapEImg2ImgPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.ShapEImg2ImgPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.ShapEImg2ImgPipeline.__call__.frame_size",description:`<strong>frame_size</strong> (<code>int</code>, <em>optional</em>, default to 64) &#x2014;
the width and height of each image frame of the generated 3d output`,name:"frame_size"},{anchor:"diffusers.ShapEImg2ImgPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pt&quot;</code>) &#x2014;
The output format of the generate image. Choose between: <code>&quot;np&quot;</code> (<code>np.array</code>) or <code>&quot;pt&quot;</code>
(<code>torch.Tensor</code>).`,name:"output_type"},{anchor:"diffusers.ShapEImg2ImgPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/v0.18.0/en/api/outputs#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/shap_e/pipeline_shap_e_img2img.py#L199",returnType:`
<p><code>ShapEPipelineOutput</code> or <code>tuple</code></p>
`}}),ie=new ul({props:{anchor:"diffusers.ShapEImg2ImgPipeline.__call__.example",$$slots:{default:[El]},$$scope:{ctx:Xe}}}),Ye=new Re({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.ShapEImg2ImgPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/shap_e/pipeline_shap_e_img2img.py#L133"}}),{c(){b=s("meta"),T=c(),M=s("h1"),f=s("a"),j=s("span"),u(m.$$.fragment),E=c(),ft=s("span"),rs=i("Shap-E"),sa=c(),C=s("h2"),R=s("a"),ut=s("span"),u(ce.$$.fragment),ls=c(),gt=s("span"),os=i("Overview"),na=c(),k=s("p"),is=i("The Shap-E model was proposed in "),de=s("a"),ps=i("Shap-E: Generating Conditional 3D Implicit Functions"),cs=i(" by Alex Nichol and Heewon Jun from "),he=s("a"),ds=i("OpenAI"),hs=i("."),ra=c(),ze=s("p"),ms=i("The abstract of the paper is the following:"),la=c(),qe=s("p"),_t=s("em"),fs=i("We present Shap-E, a conditional generative model for 3D assets. Unlike recent work on 3D generative models which produce a single output representation, Shap-E directly generates the parameters of implicit functions that can be rendered as both textured meshes and neural radiance fields. We train Shap-E in two stages: first, we train an encoder that deterministically maps 3D assets into the parameters of an implicit function; second, we train a conditional diffusion model on outputs of the encoder. When trained on a large dataset of paired 3D and text data, our resulting models are capable of generating complex and diverse 3D assets in a matter of seconds. When compared to Point-E, an explicit generative model over point clouds, Shap-E converges faster and reaches comparable or better sample quality despite modeling a higher-dimensional, multi-representation output space."),oa=c(),X=s("p"),us=i("The original codebase can be found "),me=s("a"),gs=i("here"),_s=i("."),ia=c(),W=s("h2"),z=s("a"),yt=s("span"),u(fe.$$.fragment),ys=c(),vt=s("span"),vs=i("Available Pipelines:"),pa=c(),q=s("table"),wt=s("thead"),ue=s("tr"),bt=s("th"),ws=i("Pipeline"),bs=c(),Mt=s("th"),Ms=i("Tasks"),Es=c(),ge=s("tbody"),_e=s("tr"),Et=s("td"),ye=s("a"),Us=i("pipeline_shap_e.py"),js=c(),Ut=s("td"),jt=s("em"),Js=i("Text-to-Image Generation"),Is=c(),ve=s("tr"),Jt=s("td"),we=s("a"),Ts=i("pipeline_shap_e_img2img.py"),$s=c(),It=s("td"),Tt=s("em"),ks=i("Image-to-Image Generation"),ca=c(),B=s("h2"),Q=s("a"),$t=s("span"),u(be.$$.fragment),Zs=c(),kt=s("span"),Ss=i("Available checkpoints"),da=c(),L=s("ul"),Zt=s("li"),Me=s("a"),St=s("code"),Ps=i("openai/shap-e"),Gs=c(),Pt=s("li"),Ee=s("a"),Gt=s("code"),xs=i("openai/shap-e-img2img"),ha=c(),D=s("h2"),H=s("a"),xt=s("span"),u(Ue.$$.fragment),Cs=c(),Ct=s("span"),Ws=i("Usage Examples"),ma=c(),Qe=s("p"),Bs=i("In the following, we will walk you through some examples of how to use Shap-E pipelines to create 3D objects in gif format."),fa=c(),A=s("h3"),O=s("a"),Wt=s("span"),u(je.$$.fragment),Ds=c(),Bt=s("span"),As=i("Text-to-3D image generation"),ua=c(),K=s("p"),Vs=i("We can use "),Le=s("a"),Ys=i("ShapEPipeline"),Fs=i(" to create 3D object based on a text prompt. In this example, we will make a birthday cupcake for :firecracker: diffusers library\u2019s 1 year birthday. The workflow to use the Shap-E text-to-image pipeline is same as how you would use other text-to-image pipelines in diffusers."),ga=c(),u(Je.$$.fragment),_a=c(),Z=s("p"),Ns=i("The output of "),He=s("a"),Rs=i("ShapEPipeline"),Xs=i(" is a list of lists of images frames. Each list of frames can be used to create a 3D object. Let\u2019s use the "),Dt=s("code"),zs=i("export_to_gif"),qs=i(" utility function in diffusers to make a 3D cupcake!"),ya=c(),u(Ie.$$.fragment),va=c(),ee=s("p"),Oe=s("img"),Qs=c(),Ke=s("img"),wa=c(),V=s("h3"),te=s("a"),At=s("span"),u(Te.$$.fragment),Ls=c(),Vt=s("span"),Hs=i("Image-to-Image generation"),ba=c(),ae=s("p"),Os=i("You can use "),et=s("a"),Ks=i("ShapEImg2ImgPipeline"),en=i(" along with other text-to-image pipelines in diffusers and turn your 2D generation into 3D."),Ma=c(),tt=s("p"),tn=i("In this example, We will first genrate a cheeseburger with a simple prompt \u201CA cheeseburger, white background\u201D"),Ea=c(),u($e.$$.fragment),Ua=c(),at=s("p"),st=s("img"),ja=c(),nt=s("p"),an=i("we will then use the Shap-E image-to-image pipeline to turn it into a 3D cheeseburger :)"),Ja=c(),u(ke.$$.fragment),Ia=c(),rt=s("p"),lt=s("img"),Ta=c(),Y=s("h2"),se=s("a"),Yt=s("span"),u(Ze.$$.fragment),sn=c(),Ft=s("span"),nn=i("ShapEPipeline"),$a=c(),U=s("div"),u(Se.$$.fragment),rn=c(),Nt=s("p"),ln=i("Pipeline for generating latent representation of a 3D asset and rendering with NeRF method with Shap-E"),on=c(),Pe=s("p"),pn=i("This model inherits from "),ot=s("a"),cn=i("DiffusionPipeline"),dn=i(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),hn=c(),S=s("div"),u(Ge.$$.fragment),mn=c(),Rt=s("p"),fn=i("Function invoked when calling the pipeline for generation."),un=c(),u(ne.$$.fragment),gn=c(),re=s("div"),u(xe.$$.fragment),_n=c(),I=s("p"),yn=i(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Xt=s("code"),vn=i("enable_sequential_cpu_offload"),wn=i(", this method moves one whole model at a time to the GPU when its "),zt=s("code"),bn=i("forward"),Mn=i(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),qt=s("code"),En=i("enable_sequential_cpu_offload"),Un=i(", but performance is much better due to the iterative execution of the "),Qt=s("code"),jn=i("unet"),Jn=i("."),In=c(),le=s("div"),u(Ce.$$.fragment),Tn=c(),We=s("p"),$n=i(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, the pipeline\u2019s
models have their state dicts saved to CPU and then are moved to a `),Lt=s("code"),kn=i("torch.device('meta') and loaded to GPU only when their specific submodule has its "),Zn=i("forward` method called."),ka=c(),F=s("h2"),oe=s("a"),Ht=s("span"),u(Be.$$.fragment),Sn=c(),Ot=s("span"),Pn=i("ShapEImg2ImgPipeline"),Za=c(),J=s("div"),u(De.$$.fragment),Gn=c(),Kt=s("p"),xn=i("Pipeline for generating latent representation of a 3D asset and rendering with NeRF method with Shap-E"),Cn=c(),Ae=s("p"),Wn=i("This model inherits from "),it=s("a"),Bn=i("DiffusionPipeline"),Dn=i(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),An=c(),P=s("div"),u(Ve.$$.fragment),Vn=c(),ea=s("p"),Yn=i("Function invoked when calling the pipeline for generation."),Fn=c(),u(ie.$$.fragment),Nn=c(),pe=s("div"),u(Ye.$$.fragment),Rn=c(),Fe=s("p"),Xn=i(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, the pipeline\u2019s
models have their state dicts saved to CPU and then are moved to a `),ta=s("code"),zn=i("torch.device('meta') and loaded to GPU only when their specific submodule has its "),qn=i("forward` method called."),this.h()},l(e){const o=wl('[data-svelte="svelte-1phssyn"]',document.head);b=n(o,"META",{name:!0,content:!0}),o.forEach(a),T=d(e),M=n(e,"H1",{class:!0});var Ne=r(M);f=n(Ne,"A",{id:!0,class:!0,href:!0});var aa=r(f);j=n(aa,"SPAN",{});var Kn=r(j);g(m.$$.fragment,Kn),Kn.forEach(a),aa.forEach(a),E=d(Ne),ft=n(Ne,"SPAN",{});var er=r(ft);rs=p(er,"Shap-E"),er.forEach(a),Ne.forEach(a),sa=d(e),C=n(e,"H2",{class:!0});var Pa=r(C);R=n(Pa,"A",{id:!0,class:!0,href:!0});var tr=r(R);ut=n(tr,"SPAN",{});var ar=r(ut);g(ce.$$.fragment,ar),ar.forEach(a),tr.forEach(a),ls=d(Pa),gt=n(Pa,"SPAN",{});var sr=r(gt);os=p(sr,"Overview"),sr.forEach(a),Pa.forEach(a),na=d(e),k=n(e,"P",{});var pt=r(k);is=p(pt,"The Shap-E model was proposed in "),de=n(pt,"A",{href:!0,rel:!0});var nr=r(de);ps=p(nr,"Shap-E: Generating Conditional 3D Implicit Functions"),nr.forEach(a),cs=p(pt," by Alex Nichol and Heewon Jun from "),he=n(pt,"A",{href:!0,rel:!0});var rr=r(he);ds=p(rr,"OpenAI"),rr.forEach(a),hs=p(pt,"."),pt.forEach(a),ra=d(e),ze=n(e,"P",{});var lr=r(ze);ms=p(lr,"The abstract of the paper is the following:"),lr.forEach(a),la=d(e),qe=n(e,"P",{});var or=r(qe);_t=n(or,"EM",{});var ir=r(_t);fs=p(ir,"We present Shap-E, a conditional generative model for 3D assets. Unlike recent work on 3D generative models which produce a single output representation, Shap-E directly generates the parameters of implicit functions that can be rendered as both textured meshes and neural radiance fields. We train Shap-E in two stages: first, we train an encoder that deterministically maps 3D assets into the parameters of an implicit function; second, we train a conditional diffusion model on outputs of the encoder. When trained on a large dataset of paired 3D and text data, our resulting models are capable of generating complex and diverse 3D assets in a matter of seconds. When compared to Point-E, an explicit generative model over point clouds, Shap-E converges faster and reaches comparable or better sample quality despite modeling a higher-dimensional, multi-representation output space."),ir.forEach(a),or.forEach(a),oa=d(e),X=n(e,"P",{});var Ga=r(X);us=p(Ga,"The original codebase can be found "),me=n(Ga,"A",{href:!0,rel:!0});var pr=r(me);gs=p(pr,"here"),pr.forEach(a),_s=p(Ga,"."),Ga.forEach(a),ia=d(e),W=n(e,"H2",{class:!0});var xa=r(W);z=n(xa,"A",{id:!0,class:!0,href:!0});var cr=r(z);yt=n(cr,"SPAN",{});var dr=r(yt);g(fe.$$.fragment,dr),dr.forEach(a),cr.forEach(a),ys=d(xa),vt=n(xa,"SPAN",{});var hr=r(vt);vs=p(hr,"Available Pipelines:"),hr.forEach(a),xa.forEach(a),pa=d(e),q=n(e,"TABLE",{});var Ca=r(q);wt=n(Ca,"THEAD",{});var mr=r(wt);ue=n(mr,"TR",{});var Wa=r(ue);bt=n(Wa,"TH",{});var fr=r(bt);ws=p(fr,"Pipeline"),fr.forEach(a),bs=d(Wa),Mt=n(Wa,"TH",{});var ur=r(Mt);Ms=p(ur,"Tasks"),ur.forEach(a),Wa.forEach(a),mr.forEach(a),Es=d(Ca),ge=n(Ca,"TBODY",{});var Ba=r(ge);_e=n(Ba,"TR",{});var Da=r(_e);Et=n(Da,"TD",{});var gr=r(Et);ye=n(gr,"A",{href:!0,rel:!0});var _r=r(ye);Us=p(_r,"pipeline_shap_e.py"),_r.forEach(a),gr.forEach(a),js=d(Da),Ut=n(Da,"TD",{});var yr=r(Ut);jt=n(yr,"EM",{});var vr=r(jt);Js=p(vr,"Text-to-Image Generation"),vr.forEach(a),yr.forEach(a),Da.forEach(a),Is=d(Ba),ve=n(Ba,"TR",{});var Aa=r(ve);Jt=n(Aa,"TD",{});var wr=r(Jt);we=n(wr,"A",{href:!0,rel:!0});var br=r(we);Ts=p(br,"pipeline_shap_e_img2img.py"),br.forEach(a),wr.forEach(a),$s=d(Aa),It=n(Aa,"TD",{});var Mr=r(It);Tt=n(Mr,"EM",{});var Er=r(Tt);ks=p(Er,"Image-to-Image Generation"),Er.forEach(a),Mr.forEach(a),Aa.forEach(a),Ba.forEach(a),Ca.forEach(a),ca=d(e),B=n(e,"H2",{class:!0});var Va=r(B);Q=n(Va,"A",{id:!0,class:!0,href:!0});var Ur=r(Q);$t=n(Ur,"SPAN",{});var jr=r($t);g(be.$$.fragment,jr),jr.forEach(a),Ur.forEach(a),Zs=d(Va),kt=n(Va,"SPAN",{});var Jr=r(kt);Ss=p(Jr,"Available checkpoints"),Jr.forEach(a),Va.forEach(a),da=d(e),L=n(e,"UL",{});var Ya=r(L);Zt=n(Ya,"LI",{});var Ir=r(Zt);Me=n(Ir,"A",{href:!0,rel:!0});var Tr=r(Me);St=n(Tr,"CODE",{});var $r=r(St);Ps=p($r,"openai/shap-e"),$r.forEach(a),Tr.forEach(a),Ir.forEach(a),Gs=d(Ya),Pt=n(Ya,"LI",{});var kr=r(Pt);Ee=n(kr,"A",{href:!0,rel:!0});var Zr=r(Ee);Gt=n(Zr,"CODE",{});var Sr=r(Gt);xs=p(Sr,"openai/shap-e-img2img"),Sr.forEach(a),Zr.forEach(a),kr.forEach(a),Ya.forEach(a),ha=d(e),D=n(e,"H2",{class:!0});var Fa=r(D);H=n(Fa,"A",{id:!0,class:!0,href:!0});var Pr=r(H);xt=n(Pr,"SPAN",{});var Gr=r(xt);g(Ue.$$.fragment,Gr),Gr.forEach(a),Pr.forEach(a),Cs=d(Fa),Ct=n(Fa,"SPAN",{});var xr=r(Ct);Ws=p(xr,"Usage Examples"),xr.forEach(a),Fa.forEach(a),ma=d(e),Qe=n(e,"P",{});var Cr=r(Qe);Bs=p(Cr,"In the following, we will walk you through some examples of how to use Shap-E pipelines to create 3D objects in gif format."),Cr.forEach(a),fa=d(e),A=n(e,"H3",{class:!0});var Na=r(A);O=n(Na,"A",{id:!0,class:!0,href:!0});var Wr=r(O);Wt=n(Wr,"SPAN",{});var Br=r(Wt);g(je.$$.fragment,Br),Br.forEach(a),Wr.forEach(a),Ds=d(Na),Bt=n(Na,"SPAN",{});var Dr=r(Bt);As=p(Dr,"Text-to-3D image generation"),Dr.forEach(a),Na.forEach(a),ua=d(e),K=n(e,"P",{});var Ra=r(K);Vs=p(Ra,"We can use "),Le=n(Ra,"A",{href:!0});var Ar=r(Le);Ys=p(Ar,"ShapEPipeline"),Ar.forEach(a),Fs=p(Ra," to create 3D object based on a text prompt. In this example, we will make a birthday cupcake for :firecracker: diffusers library\u2019s 1 year birthday. The workflow to use the Shap-E text-to-image pipeline is same as how you would use other text-to-image pipelines in diffusers."),Ra.forEach(a),ga=d(e),g(Je.$$.fragment,e),_a=d(e),Z=n(e,"P",{});var ct=r(Z);Ns=p(ct,"The output of "),He=n(ct,"A",{href:!0});var Vr=r(He);Rs=p(Vr,"ShapEPipeline"),Vr.forEach(a),Xs=p(ct," is a list of lists of images frames. Each list of frames can be used to create a 3D object. Let\u2019s use the "),Dt=n(ct,"CODE",{});var Yr=r(Dt);zs=p(Yr,"export_to_gif"),Yr.forEach(a),qs=p(ct," utility function in diffusers to make a 3D cupcake!"),ct.forEach(a),ya=d(e),g(Ie.$$.fragment,e),va=d(e),ee=n(e,"P",{});var Xa=r(ee);Oe=n(Xa,"IMG",{src:!0,alt:!0}),Qs=d(Xa),Ke=n(Xa,"IMG",{src:!0,alt:!0}),Xa.forEach(a),wa=d(e),V=n(e,"H3",{class:!0});var za=r(V);te=n(za,"A",{id:!0,class:!0,href:!0});var Fr=r(te);At=n(Fr,"SPAN",{});var Nr=r(At);g(Te.$$.fragment,Nr),Nr.forEach(a),Fr.forEach(a),Ls=d(za),Vt=n(za,"SPAN",{});var Rr=r(Vt);Hs=p(Rr,"Image-to-Image generation"),Rr.forEach(a),za.forEach(a),ba=d(e),ae=n(e,"P",{});var qa=r(ae);Os=p(qa,"You can use "),et=n(qa,"A",{href:!0});var Xr=r(et);Ks=p(Xr,"ShapEImg2ImgPipeline"),Xr.forEach(a),en=p(qa," along with other text-to-image pipelines in diffusers and turn your 2D generation into 3D."),qa.forEach(a),Ma=d(e),tt=n(e,"P",{});var zr=r(tt);tn=p(zr,"In this example, We will first genrate a cheeseburger with a simple prompt \u201CA cheeseburger, white background\u201D"),zr.forEach(a),Ea=d(e),g($e.$$.fragment,e),Ua=d(e),at=n(e,"P",{});var qr=r(at);st=n(qr,"IMG",{src:!0,alt:!0}),qr.forEach(a),ja=d(e),nt=n(e,"P",{});var Qr=r(nt);an=p(Qr,"we will then use the Shap-E image-to-image pipeline to turn it into a 3D cheeseburger :)"),Qr.forEach(a),Ja=d(e),g(ke.$$.fragment,e),Ia=d(e),rt=n(e,"P",{});var Lr=r(rt);lt=n(Lr,"IMG",{src:!0,alt:!0}),Lr.forEach(a),Ta=d(e),Y=n(e,"H2",{class:!0});var Qa=r(Y);se=n(Qa,"A",{id:!0,class:!0,href:!0});var Hr=r(se);Yt=n(Hr,"SPAN",{});var Or=r(Yt);g(Ze.$$.fragment,Or),Or.forEach(a),Hr.forEach(a),sn=d(Qa),Ft=n(Qa,"SPAN",{});var Kr=r(Ft);nn=p(Kr,"ShapEPipeline"),Kr.forEach(a),Qa.forEach(a),$a=d(e),U=n(e,"DIV",{class:!0});var $=r(U);g(Se.$$.fragment,$),rn=d($),Nt=n($,"P",{});var el=r(Nt);ln=p(el,"Pipeline for generating latent representation of a 3D asset and rendering with NeRF method with Shap-E"),el.forEach(a),on=d($),Pe=n($,"P",{});var La=r(Pe);pn=p(La,"This model inherits from "),ot=n(La,"A",{href:!0});var tl=r(ot);cn=p(tl,"DiffusionPipeline"),tl.forEach(a),dn=p(La,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),La.forEach(a),hn=d($),S=n($,"DIV",{class:!0});var dt=r(S);g(Ge.$$.fragment,dt),mn=d(dt),Rt=n(dt,"P",{});var al=r(Rt);fn=p(al,"Function invoked when calling the pipeline for generation."),al.forEach(a),un=d(dt),g(ne.$$.fragment,dt),dt.forEach(a),gn=d($),re=n($,"DIV",{class:!0});var Ha=r(re);g(xe.$$.fragment,Ha),_n=d(Ha),I=n(Ha,"P",{});var G=r(I);yn=p(G,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Xt=n(G,"CODE",{});var sl=r(Xt);vn=p(sl,"enable_sequential_cpu_offload"),sl.forEach(a),wn=p(G,", this method moves one whole model at a time to the GPU when its "),zt=n(G,"CODE",{});var nl=r(zt);bn=p(nl,"forward"),nl.forEach(a),Mn=p(G,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),qt=n(G,"CODE",{});var rl=r(qt);En=p(rl,"enable_sequential_cpu_offload"),rl.forEach(a),Un=p(G,", but performance is much better due to the iterative execution of the "),Qt=n(G,"CODE",{});var ll=r(Qt);jn=p(ll,"unet"),ll.forEach(a),Jn=p(G,"."),G.forEach(a),Ha.forEach(a),In=d($),le=n($,"DIV",{class:!0});var Oa=r(le);g(Ce.$$.fragment,Oa),Tn=d(Oa),We=n(Oa,"P",{});var Ka=r(We);$n=p(Ka,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, the pipeline\u2019s
models have their state dicts saved to CPU and then are moved to a `),Lt=n(Ka,"CODE",{});var ol=r(Lt);kn=p(ol,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),ol.forEach(a),Zn=p(Ka,"forward` method called."),Ka.forEach(a),Oa.forEach(a),$.forEach(a),ka=d(e),F=n(e,"H2",{class:!0});var es=r(F);oe=n(es,"A",{id:!0,class:!0,href:!0});var il=r(oe);Ht=n(il,"SPAN",{});var pl=r(Ht);g(Be.$$.fragment,pl),pl.forEach(a),il.forEach(a),Sn=d(es),Ot=n(es,"SPAN",{});var cl=r(Ot);Pn=p(cl,"ShapEImg2ImgPipeline"),cl.forEach(a),es.forEach(a),Za=d(e),J=n(e,"DIV",{class:!0});var x=r(J);g(De.$$.fragment,x),Gn=d(x),Kt=n(x,"P",{});var dl=r(Kt);xn=p(dl,"Pipeline for generating latent representation of a 3D asset and rendering with NeRF method with Shap-E"),dl.forEach(a),Cn=d(x),Ae=n(x,"P",{});var ts=r(Ae);Wn=p(ts,"This model inherits from "),it=n(ts,"A",{href:!0});var hl=r(it);Bn=p(hl,"DiffusionPipeline"),hl.forEach(a),Dn=p(ts,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),ts.forEach(a),An=d(x),P=n(x,"DIV",{class:!0});var ht=r(P);g(Ve.$$.fragment,ht),Vn=d(ht),ea=n(ht,"P",{});var ml=r(ea);Yn=p(ml,"Function invoked when calling the pipeline for generation."),ml.forEach(a),Fn=d(ht),g(ie.$$.fragment,ht),ht.forEach(a),Nn=d(x),pe=n(x,"DIV",{class:!0});var as=r(pe);g(Ye.$$.fragment,as),Rn=d(as),Fe=n(as,"P",{});var ss=r(Fe);Xn=p(ss,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, the pipeline\u2019s
models have their state dicts saved to CPU and then are moved to a `),ta=n(ss,"CODE",{});var fl=r(ta);zn=p(fl,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),fl.forEach(a),qn=p(ss,"forward` method called."),ss.forEach(a),as.forEach(a),x.forEach(a),this.h()},h(){l(b,"name","hf:doc:metadata"),l(b,"content",JSON.stringify(jl)),l(f,"id","shape"),l(f,"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"),l(f,"href","#shape"),l(M,"class","relative group"),l(R,"id","overview"),l(R,"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"),l(R,"href","#overview"),l(C,"class","relative group"),l(de,"href","https://arxiv.org/abs/2305.02463"),l(de,"rel","nofollow"),l(he,"href","https://github.com/openai"),l(he,"rel","nofollow"),l(me,"href","https://github.com/openai/shap-e"),l(me,"rel","nofollow"),l(z,"id","available-pipelines"),l(z,"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"),l(z,"href","#available-pipelines"),l(W,"class","relative group"),l(ye,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/shap_e/pipeline_shap_e.py"),l(ye,"rel","nofollow"),l(we,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/shap_e/pipeline_shap_e_img2img.py"),l(we,"rel","nofollow"),l(Q,"id","available-checkpoints"),l(Q,"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"),l(Q,"href","#available-checkpoints"),l(B,"class","relative group"),l(Me,"href","https://huggingface.co/openai/shap-e"),l(Me,"rel","nofollow"),l(Ee,"href","https://huggingface.co/openai/shap-e-img2img"),l(Ee,"rel","nofollow"),l(H,"id","usage-examples"),l(H,"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"),l(H,"href","#usage-examples"),l(D,"class","relative group"),l(O,"id","textto3d-image-generation"),l(O,"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"),l(O,"href","#textto3d-image-generation"),l(A,"class","relative group"),l(Le,"href","/docs/diffusers/v0.18.0/en/api/pipelines/shap_e#diffusers.ShapEPipeline"),l(He,"href","/docs/diffusers/v0.18.0/en/api/pipelines/shap_e#diffusers.ShapEPipeline"),ns(Oe.src,Qn="https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/shap_e/firecracker_out.gif")||l(Oe,"src",Qn),l(Oe,"alt","img"),ns(Ke.src,Ln="https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/shap_e/cake_out.gif")||l(Ke,"src",Ln),l(Ke,"alt","img"),l(te,"id","imagetoimage-generation"),l(te,"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"),l(te,"href","#imagetoimage-generation"),l(V,"class","relative group"),l(et,"href","/docs/diffusers/v0.18.0/en/api/pipelines/shap_e#diffusers.ShapEImg2ImgPipeline"),ns(st.src,Hn="https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/shap_e/burger_in.png")||l(st,"src",Hn),l(st,"alt","img"),ns(lt.src,On="https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/shap_e/burger_out.gif")||l(lt,"src",On),l(lt,"alt","img"),l(se,"id","diffusers.ShapEPipeline"),l(se,"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"),l(se,"href","#diffusers.ShapEPipeline"),l(Y,"class","relative group"),l(ot,"href","/docs/diffusers/v0.18.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),l(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(oe,"id","diffusers.ShapEImg2ImgPipeline"),l(oe,"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"),l(oe,"href","#diffusers.ShapEImg2ImgPipeline"),l(F,"class","relative group"),l(it,"href","/docs/diffusers/v0.18.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),l(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,o){t(document.head,b),h(e,T,o),h(e,M,o),t(M,f),t(f,j),_(m,j,null),t(M,E),t(M,ft),t(ft,rs),h(e,sa,o),h(e,C,o),t(C,R),t(R,ut),_(ce,ut,null),t(C,ls),t(C,gt),t(gt,os),h(e,na,o),h(e,k,o),t(k,is),t(k,de),t(de,ps),t(k,cs),t(k,he),t(he,ds),t(k,hs),h(e,ra,o),h(e,ze,o),t(ze,ms),h(e,la,o),h(e,qe,o),t(qe,_t),t(_t,fs),h(e,oa,o),h(e,X,o),t(X,us),t(X,me),t(me,gs),t(X,_s),h(e,ia,o),h(e,W,o),t(W,z),t(z,yt),_(fe,yt,null),t(W,ys),t(W,vt),t(vt,vs),h(e,pa,o),h(e,q,o),t(q,wt),t(wt,ue),t(ue,bt),t(bt,ws),t(ue,bs),t(ue,Mt),t(Mt,Ms),t(q,Es),t(q,ge),t(ge,_e),t(_e,Et),t(Et,ye),t(ye,Us),t(_e,js),t(_e,Ut),t(Ut,jt),t(jt,Js),t(ge,Is),t(ge,ve),t(ve,Jt),t(Jt,we),t(we,Ts),t(ve,$s),t(ve,It),t(It,Tt),t(Tt,ks),h(e,ca,o),h(e,B,o),t(B,Q),t(Q,$t),_(be,$t,null),t(B,Zs),t(B,kt),t(kt,Ss),h(e,da,o),h(e,L,o),t(L,Zt),t(Zt,Me),t(Me,St),t(St,Ps),t(L,Gs),t(L,Pt),t(Pt,Ee),t(Ee,Gt),t(Gt,xs),h(e,ha,o),h(e,D,o),t(D,H),t(H,xt),_(Ue,xt,null),t(D,Cs),t(D,Ct),t(Ct,Ws),h(e,ma,o),h(e,Qe,o),t(Qe,Bs),h(e,fa,o),h(e,A,o),t(A,O),t(O,Wt),_(je,Wt,null),t(A,Ds),t(A,Bt),t(Bt,As),h(e,ua,o),h(e,K,o),t(K,Vs),t(K,Le),t(Le,Ys),t(K,Fs),h(e,ga,o),_(Je,e,o),h(e,_a,o),h(e,Z,o),t(Z,Ns),t(Z,He),t(He,Rs),t(Z,Xs),t(Z,Dt),t(Dt,zs),t(Z,qs),h(e,ya,o),_(Ie,e,o),h(e,va,o),h(e,ee,o),t(ee,Oe),t(ee,Qs),t(ee,Ke),h(e,wa,o),h(e,V,o),t(V,te),t(te,At),_(Te,At,null),t(V,Ls),t(V,Vt),t(Vt,Hs),h(e,ba,o),h(e,ae,o),t(ae,Os),t(ae,et),t(et,Ks),t(ae,en),h(e,Ma,o),h(e,tt,o),t(tt,tn),h(e,Ea,o),_($e,e,o),h(e,Ua,o),h(e,at,o),t(at,st),h(e,ja,o),h(e,nt,o),t(nt,an),h(e,Ja,o),_(ke,e,o),h(e,Ia,o),h(e,rt,o),t(rt,lt),h(e,Ta,o),h(e,Y,o),t(Y,se),t(se,Yt),_(Ze,Yt,null),t(Y,sn),t(Y,Ft),t(Ft,nn),h(e,$a,o),h(e,U,o),_(Se,U,null),t(U,rn),t(U,Nt),t(Nt,ln),t(U,on),t(U,Pe),t(Pe,pn),t(Pe,ot),t(ot,cn),t(Pe,dn),t(U,hn),t(U,S),_(Ge,S,null),t(S,mn),t(S,Rt),t(Rt,fn),t(S,un),_(ne,S,null),t(U,gn),t(U,re),_(xe,re,null),t(re,_n),t(re,I),t(I,yn),t(I,Xt),t(Xt,vn),t(I,wn),t(I,zt),t(zt,bn),t(I,Mn),t(I,qt),t(qt,En),t(I,Un),t(I,Qt),t(Qt,jn),t(I,Jn),t(U,In),t(U,le),_(Ce,le,null),t(le,Tn),t(le,We),t(We,$n),t(We,Lt),t(Lt,kn),t(We,Zn),h(e,ka,o),h(e,F,o),t(F,oe),t(oe,Ht),_(Be,Ht,null),t(F,Sn),t(F,Ot),t(Ot,Pn),h(e,Za,o),h(e,J,o),_(De,J,null),t(J,Gn),t(J,Kt),t(Kt,xn),t(J,Cn),t(J,Ae),t(Ae,Wn),t(Ae,it),t(it,Bn),t(Ae,Dn),t(J,An),t(J,P),_(Ve,P,null),t(P,Vn),t(P,ea),t(ea,Yn),t(P,Fn),_(ie,P,null),t(J,Nn),t(J,pe),_(Ye,pe,null),t(pe,Rn),t(pe,Fe),t(Fe,Xn),t(Fe,ta),t(ta,zn),t(Fe,qn),Sa=!0},p(e,[o]){const Ne={};o&2&&(Ne.$$scope={dirty:o,ctx:e}),ne.$set(Ne);const aa={};o&2&&(aa.$$scope={dirty:o,ctx:e}),ie.$set(aa)},i(e){Sa||(y(m.$$.fragment,e),y(ce.$$.fragment,e),y(fe.$$.fragment,e),y(be.$$.fragment,e),y(Ue.$$.fragment,e),y(je.$$.fragment,e),y(Je.$$.fragment,e),y(Ie.$$.fragment,e),y(Te.$$.fragment,e),y($e.$$.fragment,e),y(ke.$$.fragment,e),y(Ze.$$.fragment,e),y(Se.$$.fragment,e),y(Ge.$$.fragment,e),y(ne.$$.fragment,e),y(xe.$$.fragment,e),y(Ce.$$.fragment,e),y(Be.$$.fragment,e),y(De.$$.fragment,e),y(Ve.$$.fragment,e),y(ie.$$.fragment,e),y(Ye.$$.fragment,e),Sa=!0)},o(e){v(m.$$.fragment,e),v(ce.$$.fragment,e),v(fe.$$.fragment,e),v(be.$$.fragment,e),v(Ue.$$.fragment,e),v(je.$$.fragment,e),v(Je.$$.fragment,e),v(Ie.$$.fragment,e),v(Te.$$.fragment,e),v($e.$$.fragment,e),v(ke.$$.fragment,e),v(Ze.$$.fragment,e),v(Se.$$.fragment,e),v(Ge.$$.fragment,e),v(ne.$$.fragment,e),v(xe.$$.fragment,e),v(Ce.$$.fragment,e),v(Be.$$.fragment,e),v(De.$$.fragment,e),v(Ve.$$.fragment,e),v(ie.$$.fragment,e),v(Ye.$$.fragment,e),Sa=!1},d(e){a(b),e&&a(T),e&&a(M),w(m),e&&a(sa),e&&a(C),w(ce),e&&a(na),e&&a(k),e&&a(ra),e&&a(ze),e&&a(la),e&&a(qe),e&&a(oa),e&&a(X),e&&a(ia),e&&a(W),w(fe),e&&a(pa),e&&a(q),e&&a(ca),e&&a(B),w(be),e&&a(da),e&&a(L),e&&a(ha),e&&a(D),w(Ue),e&&a(ma),e&&a(Qe),e&&a(fa),e&&a(A),w(je),e&&a(ua),e&&a(K),e&&a(ga),w(Je,e),e&&a(_a),e&&a(Z),e&&a(ya),w(Ie,e),e&&a(va),e&&a(ee),e&&a(wa),e&&a(V),w(Te),e&&a(ba),e&&a(ae),e&&a(Ma),e&&a(tt),e&&a(Ea),w($e,e),e&&a(Ua),e&&a(at),e&&a(ja),e&&a(nt),e&&a(Ja),w(ke,e),e&&a(Ia),e&&a(rt),e&&a(Ta),e&&a(Y),w(Ze),e&&a($a),e&&a(U),w(Se),w(Ge),w(ne),w(xe),w(Ce),e&&a(ka),e&&a(F),w(Be),e&&a(Za),e&&a(J),w(De),w(Ve),w(ie),w(Ye)}}}const jl={local:"shape",sections:[{local:"overview",title:"Overview"},{local:"available-pipelines",title:"Available Pipelines:"},{local:"available-checkpoints",title:"Available checkpoints "},{local:"usage-examples",sections:[{local:"textto3d-image-generation",title:"Text-to-3D image generation "},{local:"imagetoimage-generation",title:"Image-to-Image generation"}],title:"Usage Examples"},{local:"diffusers.ShapEPipeline",title:"ShapEPipeline"},{local:"diffusers.ShapEImg2ImgPipeline",title:"ShapEImg2ImgPipeline"}],title:"Shap-E"};function Jl(Xe){return bl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sl extends _l{constructor(b){super();yl(this,b,Jl,Ul,vl,{})}}export{Sl as default,jl as metadata};
