import{s as Se,o as Qe,n as We}from"../chunks/scheduler.8c3d61f6.js";import{S as Fe,i as Xe,g as u,s as n,r as o,A as Ye,h as p,f as s,c as a,j as S,u as f,x as b,k as Q,y as $,a as i,v as d,d as m,t as c,w as g}from"../chunks/index.da70eac4.js";import{T as Re}from"../chunks/Tip.6f698f24.js";import{D as ie}from"../chunks/Docstring.367be9ed.js";import{C as Ee}from"../chunks/CodeBlock.a9c4becf.js";import{H as ne,E as Ke}from"../chunks/getInferenceSnippets.cb466318.js";function et(F){let r,v="To check a specific pipeline or model output, refer to its corresponding API documentation.";return{c(){r=u("p"),r.textContent=v},l(l){r=p(l,"P",{"data-svelte-h":!0}),b(r)!=="svelte-60gd7d"&&(r.textContent=v)},m(l,w){i(l,r,w)},p:We,d(l){l&&s(r)}}}function tt(F){let r,v=`You can’t unpack a <code>BaseOutput</code> directly. Use the <a href="/docs/diffusers/main/en/api/outputs#diffusers.utils.BaseOutput.to_tuple">to_tuple()</a> method to convert it to a tuple
first.`;return{c(){r=u("p"),r.innerHTML=v},l(l){r=p(l,"P",{"data-svelte-h":!0}),b(r)!=="svelte-140uywr"&&(r.innerHTML=v)},m(l,w){i(l,r,w)},p:We,d(l){l&&s(r)}}}function st(F){let r,v,l,w,O,ae,C,Ue='All model outputs are subclasses of <a href="/docs/diffusers/main/en/api/outputs#diffusers.utils.BaseOutput">BaseOutput</a>, data structures containing all the information returned by the model. The outputs can also be used as tuples or dictionaries.',re,M,ze="For example:",ue,H,pe,B,De='The <code>outputs</code> object is a <a href="/docs/diffusers/main/en/api/pipelines/dit#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> which means it has an image attribute.',le,k,je="You can access each attribute as you normally would or with a keyword lookup, and if that attribute is not returned by the model, you will get <code>None</code>:",oe,V,fe,E,Je=`When considering the <code>outputs</code> object as a tuple, it only considers the attributes that don’t have <code>None</code> values.
For instance, retrieving an image by indexing into it returns the tuple <code>(outputs.images)</code>:`,de,U,me,T,ce,z,ge,h,D,Oe,X,Ae=`Base class for all model outputs as dataclass. Has a <code>__getitem__</code> that allows indexing by integer or slice (like a
tuple) or strings (like a dictionary) that will ignore the <code>None</code> attributes. Otherwise behaves like a regular
Python dictionary.`,Ce,I,Me,L,j,He,Y,Ne="Convert self to a tuple containing all the attributes/keys that are not <code>None</code>.",$e,J,he,_,A,Be,K,Ze="Output class for image pipelines.",be,N,ye,P,Z,ke,ee,qe="Output class for audio pipelines.",ve,q,_e,x,G,Ve,te,Ge="Output class for joint image-text pipelines.",Pe,R,xe,se,we;return O=new ne({props:{title:"Outputs",local:"outputs",headingTag:"h1"}}),H=new Ee({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERESU1QaXBlbGluZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwRERJTVBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZkZHBtLWNpZmFyMTAtMzIlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMHBpcGVsaW5lKCk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDIMPipeline

pipeline = DDIMPipeline.from_pretrained(<span class="hljs-string">&quot;google/ddpm-cifar10-32&quot;</span>)
outputs = pipeline()`,wrap:!1}}),V=new Ee({props:{code:"b3V0cHV0cy5pbWFnZXMlMEFvdXRwdXRzJTVCJTIyaW1hZ2VzJTIyJTVE",highlighted:`outputs.images
outputs[<span class="hljs-string">&quot;images&quot;</span>]`,wrap:!1}}),U=new Ee({props:{code:"b3V0cHV0cyU1QiUzQTElNUQ=",highlighted:'outputs[:<span class="hljs-number">1</span>]',wrap:!1}}),T=new Re({props:{$$slots:{default:[et]},$$scope:{ctx:F}}}),z=new ne({props:{title:"BaseOutput",local:"diffusers.utils.BaseOutput",headingTag:"h2"}}),D=new ie({props:{name:"class diffusers.utils.BaseOutput",anchor:"diffusers.utils.BaseOutput",parameters:"",source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/utils/outputs.py#L40"}}),I=new Re({props:{warning:!0,$$slots:{default:[tt]},$$scope:{ctx:F}}}),j=new ie({props:{name:"to_tuple",anchor:"diffusers.utils.BaseOutput.to_tuple",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/utils/outputs.py#L134"}}),J=new ne({props:{title:"ImagePipelineOutput",local:"diffusers.ImagePipelineOutput",headingTag:"h2"}}),A=new ie({props:{name:"class diffusers.ImagePipelineOutput",anchor:"diffusers.ImagePipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"}],parametersDescription:[{anchor:"diffusers.ImagePipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L118"}}),N=new ne({props:{title:"AudioPipelineOutput",local:"diffusers.AudioPipelineOutput",headingTag:"h2"}}),Z=new ie({props:{name:"class diffusers.AudioPipelineOutput",anchor:"diffusers.AudioPipelineOutput",parameters:[{name:"audios",val:": ndarray"}],parametersDescription:[{anchor:"diffusers.AudioPipelineOutput.audios",description:`<strong>audios</strong> (<code>np.ndarray</code>) &#x2014;
List of denoised audio samples of a NumPy array of shape <code>(batch_size, num_channels, sample_rate)</code>.`,name:"audios"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L132"}}),q=new ne({props:{title:"ImageTextPipelineOutput",local:"diffusers.ImageTextPipelineOutput",headingTag:"h2"}}),G=new ie({props:{name:"class diffusers.ImageTextPipelineOutput",anchor:"diffusers.ImageTextPipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray, NoneType]"},{name:"text",val:": typing.Union[typing.List[str], typing.List[typing.List[str]], NoneType]"}],parametersDescription:[{anchor:"diffusers.ImageTextPipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"},{anchor:"diffusers.ImageTextPipelineOutput.text",description:`<strong>text</strong> (<code>List[str]</code> or <code>List[List[str]]</code>) &#x2014;
List of generated text strings of length <code>batch_size</code> or a list of list of strings whose outer list has
length <code>batch_size</code>.`,name:"text"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L48"}}),R=new Ke({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/outputs.md"}}),{c(){r=u("meta"),v=n(),l=u("p"),w=n(),o(O.$$.fragment),ae=n(),C=u("p"),C.innerHTML=Ue,re=n(),M=u("p"),M.textContent=ze,ue=n(),o(H.$$.fragment),pe=n(),B=u("p"),B.innerHTML=De,le=n(),k=u("p"),k.innerHTML=je,oe=n(),o(V.$$.fragment),fe=n(),E=u("p"),E.innerHTML=Je,de=n(),o(U.$$.fragment),me=n(),o(T.$$.fragment),ce=n(),o(z.$$.fragment),ge=n(),h=u("div"),o(D.$$.fragment),Oe=n(),X=u("p"),X.innerHTML=Ae,Ce=n(),o(I.$$.fragment),Me=n(),L=u("div"),o(j.$$.fragment),He=n(),Y=u("p"),Y.innerHTML=Ne,$e=n(),o(J.$$.fragment),he=n(),_=u("div"),o(A.$$.fragment),Be=n(),K=u("p"),K.textContent=Ze,be=n(),o(N.$$.fragment),ye=n(),P=u("div"),o(Z.$$.fragment),ke=n(),ee=u("p"),ee.textContent=qe,ve=n(),o(q.$$.fragment),_e=n(),x=u("div"),o(G.$$.fragment),Ve=n(),te=u("p"),te.textContent=Ge,Pe=n(),o(R.$$.fragment),xe=n(),se=u("p"),this.h()},l(e){const t=Ye("svelte-u9bgzb",document.head);r=p(t,"META",{name:!0,content:!0}),t.forEach(s),v=a(e),l=p(e,"P",{}),S(l).forEach(s),w=a(e),f(O.$$.fragment,e),ae=a(e),C=p(e,"P",{"data-svelte-h":!0}),b(C)!=="svelte-4sj20v"&&(C.innerHTML=Ue),re=a(e),M=p(e,"P",{"data-svelte-h":!0}),b(M)!=="svelte-1gkqha7"&&(M.textContent=ze),ue=a(e),f(H.$$.fragment,e),pe=a(e),B=p(e,"P",{"data-svelte-h":!0}),b(B)!=="svelte-1t37jem"&&(B.innerHTML=De),le=a(e),k=p(e,"P",{"data-svelte-h":!0}),b(k)!=="svelte-1ntwqaz"&&(k.innerHTML=je),oe=a(e),f(V.$$.fragment,e),fe=a(e),E=p(e,"P",{"data-svelte-h":!0}),b(E)!=="svelte-qzd8sf"&&(E.innerHTML=Je),de=a(e),f(U.$$.fragment,e),me=a(e),f(T.$$.fragment,e),ce=a(e),f(z.$$.fragment,e),ge=a(e),h=p(e,"DIV",{class:!0});var y=S(h);f(D.$$.fragment,y),Oe=a(y),X=p(y,"P",{"data-svelte-h":!0}),b(X)!=="svelte-1qra1r9"&&(X.innerHTML=Ae),Ce=a(y),f(I.$$.fragment,y),Me=a(y),L=p(y,"DIV",{class:!0});var W=S(L);f(j.$$.fragment,W),He=a(W),Y=p(W,"P",{"data-svelte-h":!0}),b(Y)!=="svelte-1gdpts"&&(Y.innerHTML=Ne),W.forEach(s),y.forEach(s),$e=a(e),f(J.$$.fragment,e),he=a(e),_=p(e,"DIV",{class:!0});var Te=S(_);f(A.$$.fragment,Te),Be=a(Te),K=p(Te,"P",{"data-svelte-h":!0}),b(K)!=="svelte-19wetgi"&&(K.textContent=Ze),Te.forEach(s),be=a(e),f(N.$$.fragment,e),ye=a(e),P=p(e,"DIV",{class:!0});var Ie=S(P);f(Z.$$.fragment,Ie),ke=a(Ie),ee=p(Ie,"P",{"data-svelte-h":!0}),b(ee)!=="svelte-19ryw33"&&(ee.textContent=qe),Ie.forEach(s),ve=a(e),f(q.$$.fragment,e),_e=a(e),x=p(e,"DIV",{class:!0});var Le=S(x);f(G.$$.fragment,Le),Ve=a(Le),te=p(Le,"P",{"data-svelte-h":!0}),b(te)!=="svelte-1i2ycus"&&(te.textContent=Ge),Le.forEach(s),Pe=a(e),f(R.$$.fragment,e),xe=a(e),se=p(e,"P",{}),S(se).forEach(s),this.h()},h(){Q(r,"name","hf:doc:metadata"),Q(r,"content",it),Q(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Q(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Q(_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Q(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Q(x,"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,t){$(document.head,r),i(e,v,t),i(e,l,t),i(e,w,t),d(O,e,t),i(e,ae,t),i(e,C,t),i(e,re,t),i(e,M,t),i(e,ue,t),d(H,e,t),i(e,pe,t),i(e,B,t),i(e,le,t),i(e,k,t),i(e,oe,t),d(V,e,t),i(e,fe,t),i(e,E,t),i(e,de,t),d(U,e,t),i(e,me,t),d(T,e,t),i(e,ce,t),d(z,e,t),i(e,ge,t),i(e,h,t),d(D,h,null),$(h,Oe),$(h,X),$(h,Ce),d(I,h,null),$(h,Me),$(h,L),d(j,L,null),$(L,He),$(L,Y),i(e,$e,t),d(J,e,t),i(e,he,t),i(e,_,t),d(A,_,null),$(_,Be),$(_,K),i(e,be,t),d(N,e,t),i(e,ye,t),i(e,P,t),d(Z,P,null),$(P,ke),$(P,ee),i(e,ve,t),d(q,e,t),i(e,_e,t),i(e,x,t),d(G,x,null),$(x,Ve),$(x,te),i(e,Pe,t),d(R,e,t),i(e,xe,t),i(e,se,t),we=!0},p(e,[t]){const y={};t&2&&(y.$$scope={dirty:t,ctx:e}),T.$set(y);const W={};t&2&&(W.$$scope={dirty:t,ctx:e}),I.$set(W)},i(e){we||(m(O.$$.fragment,e),m(H.$$.fragment,e),m(V.$$.fragment,e),m(U.$$.fragment,e),m(T.$$.fragment,e),m(z.$$.fragment,e),m(D.$$.fragment,e),m(I.$$.fragment,e),m(j.$$.fragment,e),m(J.$$.fragment,e),m(A.$$.fragment,e),m(N.$$.fragment,e),m(Z.$$.fragment,e),m(q.$$.fragment,e),m(G.$$.fragment,e),m(R.$$.fragment,e),we=!0)},o(e){c(O.$$.fragment,e),c(H.$$.fragment,e),c(V.$$.fragment,e),c(U.$$.fragment,e),c(T.$$.fragment,e),c(z.$$.fragment,e),c(D.$$.fragment,e),c(I.$$.fragment,e),c(j.$$.fragment,e),c(J.$$.fragment,e),c(A.$$.fragment,e),c(N.$$.fragment,e),c(Z.$$.fragment,e),c(q.$$.fragment,e),c(G.$$.fragment,e),c(R.$$.fragment,e),we=!1},d(e){e&&(s(v),s(l),s(w),s(ae),s(C),s(re),s(M),s(ue),s(pe),s(B),s(le),s(k),s(oe),s(fe),s(E),s(de),s(me),s(ce),s(ge),s(h),s($e),s(he),s(_),s(be),s(ye),s(P),s(ve),s(_e),s(x),s(Pe),s(xe),s(se)),s(r),g(O,e),g(H,e),g(V,e),g(U,e),g(T,e),g(z,e),g(D),g(I),g(j),g(J,e),g(A),g(N,e),g(Z),g(q,e),g(G),g(R,e)}}}const it='{"title":"Outputs","local":"outputs","sections":[{"title":"BaseOutput","local":"diffusers.utils.BaseOutput","sections":[],"depth":2},{"title":"ImagePipelineOutput","local":"diffusers.ImagePipelineOutput","sections":[],"depth":2},{"title":"AudioPipelineOutput","local":"diffusers.AudioPipelineOutput","sections":[],"depth":2},{"title":"ImageTextPipelineOutput","local":"diffusers.ImageTextPipelineOutput","sections":[],"depth":2}],"depth":1}';function nt(F){return Qe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ft extends Fe{constructor(r){super(),Xe(this,r,nt,st,Se,{})}}export{ft as component};
