import{s as Fe,n as Xe,o as Ke}from"../chunks/scheduler.53228c21.js";import{S as Ye,i as et,e as r,s as n,c as u,h as tt,a as l,d as s,b as a,f as Q,g as p,j as $,k as _,l as o,m as i,n as d,t as f,o as m,p as c}from"../chunks/index.100fac89.js";import{C as st}from"../chunks/CopyLLMTxtMenu.b0ff86f3.js";import{D as ee}from"../chunks/Docstring.db856a1e.js";import{C as Ve}from"../chunks/CodeBlock.d30a6509.js";import{H as te,E as it}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";function nt(ze){let h,se,K,ie,L,ne,O,ae,I,De='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,w,je="For example:",le,C,ue,M,qe='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.',pe,H,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,k,de,B,Ne=`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>:`,fe,E,me,x,Ae="<p>To check a specific pipeline or model output, refer to its corresponding API documentation.</p>",ce,U,ge,g,V,Ce,R,Ze=`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.`,Me,z,Ge=`<p>&gt; 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 &gt; first.</p>`,He,P,D,ke,S,Qe="Convert self to a tuple containing all the attributes/keys that are not <code>None</code>.",$e,j,he,b,q,Be,W,Re="Output class for image pipelines.",be,J,ye,y,N,Ee,F,Se="Output class for audio pipelines.",ve,A,_e,v,Z,Ue,X,We="Output class for joint image-text pipelines.",xe,G,Pe,Y,Te;return L=new st({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),O=new te({props:{title:"Outputs",local:"outputs",headingTag:"h1"}}),C=new Ve({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}}),k=new Ve({props:{code:"b3V0cHV0cy5pbWFnZXMlMEFvdXRwdXRzJTVCJTIyaW1hZ2VzJTIyJTVE",highlighted:`outputs.images
outputs[<span class="hljs-string">&quot;images&quot;</span>]`,wrap:!1}}),E=new Ve({props:{code:"b3V0cHV0cyU1QiUzQTElNUQ=",highlighted:'outputs[:<span class="hljs-number">1</span>]',wrap:!1}}),U=new te({props:{title:"BaseOutput",local:"diffusers.utils.BaseOutput",headingTag:"h2"}}),V=new ee({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"}}),D=new ee({props:{name:"to_tuple",anchor:"diffusers.utils.BaseOutput.to_tuple",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/utils/outputs.py#L130"}}),j=new te({props:{title:"ImagePipelineOutput",local:"diffusers.ImagePipelineOutput",headingTag:"h2"}}),q=new ee({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"}}),J=new te({props:{title:"AudioPipelineOutput",local:"diffusers.AudioPipelineOutput",headingTag:"h2"}}),N=new ee({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"}}),A=new te({props:{title:"ImageTextPipelineOutput",local:"diffusers.ImageTextPipelineOutput",headingTag:"h2"}}),Z=new ee({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"}}),G=new it({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/outputs.md"}}),{c(){h=r("meta"),se=n(),K=r("p"),ie=n(),u(L.$$.fragment),ne=n(),u(O.$$.fragment),ae=n(),I=r("p"),I.innerHTML=De,re=n(),w=r("p"),w.textContent=je,le=n(),u(C.$$.fragment),ue=n(),M=r("p"),M.innerHTML=qe,pe=n(),H=r("p"),H.innerHTML=Je,oe=n(),u(k.$$.fragment),de=n(),B=r("p"),B.innerHTML=Ne,fe=n(),u(E.$$.fragment),me=n(),x=r("blockquote"),x.innerHTML=Ae,ce=n(),u(U.$$.fragment),ge=n(),g=r("div"),u(V.$$.fragment),Ce=n(),R=r("p"),R.innerHTML=Ze,Me=n(),z=r("blockquote"),z.innerHTML=Ge,He=n(),P=r("div"),u(D.$$.fragment),ke=n(),S=r("p"),S.innerHTML=Qe,$e=n(),u(j.$$.fragment),he=n(),b=r("div"),u(q.$$.fragment),Be=n(),W=r("p"),W.textContent=Re,be=n(),u(J.$$.fragment),ye=n(),y=r("div"),u(N.$$.fragment),Ee=n(),F=r("p"),F.textContent=Se,ve=n(),u(A.$$.fragment),_e=n(),v=r("div"),u(Z.$$.fragment),Ue=n(),X=r("p"),X.textContent=We,xe=n(),u(G.$$.fragment),Pe=n(),Y=r("p"),this.h()},l(e){const t=tt("svelte-u9bgzb",document.head);h=l(t,"META",{name:!0,content:!0}),t.forEach(s),se=a(e),K=l(e,"P",{}),Q(K).forEach(s),ie=a(e),p(L.$$.fragment,e),ne=a(e),p(O.$$.fragment,e),ae=a(e),I=l(e,"P",{"data-svelte-h":!0}),$(I)!=="svelte-4sj20v"&&(I.innerHTML=De),re=a(e),w=l(e,"P",{"data-svelte-h":!0}),$(w)!=="svelte-1gkqha7"&&(w.textContent=je),le=a(e),p(C.$$.fragment,e),ue=a(e),M=l(e,"P",{"data-svelte-h":!0}),$(M)!=="svelte-1t37jem"&&(M.innerHTML=qe),pe=a(e),H=l(e,"P",{"data-svelte-h":!0}),$(H)!=="svelte-1ntwqaz"&&(H.innerHTML=Je),oe=a(e),p(k.$$.fragment,e),de=a(e),B=l(e,"P",{"data-svelte-h":!0}),$(B)!=="svelte-qzd8sf"&&(B.innerHTML=Ne),fe=a(e),p(E.$$.fragment,e),me=a(e),x=l(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),$(x)!=="svelte-82inme"&&(x.innerHTML=Ae),ce=a(e),p(U.$$.fragment,e),ge=a(e),g=l(e,"DIV",{class:!0});var T=Q(g);p(V.$$.fragment,T),Ce=a(T),R=l(T,"P",{"data-svelte-h":!0}),$(R)!=="svelte-1qra1r9"&&(R.innerHTML=Ze),Me=a(T),z=l(T,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),$(z)!=="svelte-6zh3p9"&&(z.innerHTML=Ge),He=a(T),P=l(T,"DIV",{class:!0});var Le=Q(P);p(D.$$.fragment,Le),ke=a(Le),S=l(Le,"P",{"data-svelte-h":!0}),$(S)!=="svelte-1gdpts"&&(S.innerHTML=Qe),Le.forEach(s),T.forEach(s),$e=a(e),p(j.$$.fragment,e),he=a(e),b=l(e,"DIV",{class:!0});var Oe=Q(b);p(q.$$.fragment,Oe),Be=a(Oe),W=l(Oe,"P",{"data-svelte-h":!0}),$(W)!=="svelte-19wetgi"&&(W.textContent=Re),Oe.forEach(s),be=a(e),p(J.$$.fragment,e),ye=a(e),y=l(e,"DIV",{class:!0});var Ie=Q(y);p(N.$$.fragment,Ie),Ee=a(Ie),F=l(Ie,"P",{"data-svelte-h":!0}),$(F)!=="svelte-19ryw33"&&(F.textContent=Se),Ie.forEach(s),ve=a(e),p(A.$$.fragment,e),_e=a(e),v=l(e,"DIV",{class:!0});var we=Q(v);p(Z.$$.fragment,we),Ue=a(we),X=l(we,"P",{"data-svelte-h":!0}),$(X)!=="svelte-1i2ycus"&&(X.textContent=We),we.forEach(s),xe=a(e),p(G.$$.fragment,e),Pe=a(e),Y=l(e,"P",{}),Q(Y).forEach(s),this.h()},h(){_(h,"name","hf:doc:metadata"),_(h,"content",at),_(x,"class","tip"),_(z,"class","warning"),_(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(v,"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){o(document.head,h),i(e,se,t),i(e,K,t),i(e,ie,t),d(L,e,t),i(e,ne,t),d(O,e,t),i(e,ae,t),i(e,I,t),i(e,re,t),i(e,w,t),i(e,le,t),d(C,e,t),i(e,ue,t),i(e,M,t),i(e,pe,t),i(e,H,t),i(e,oe,t),d(k,e,t),i(e,de,t),i(e,B,t),i(e,fe,t),d(E,e,t),i(e,me,t),i(e,x,t),i(e,ce,t),d(U,e,t),i(e,ge,t),i(e,g,t),d(V,g,null),o(g,Ce),o(g,R),o(g,Me),o(g,z),o(g,He),o(g,P),d(D,P,null),o(P,ke),o(P,S),i(e,$e,t),d(j,e,t),i(e,he,t),i(e,b,t),d(q,b,null),o(b,Be),o(b,W),i(e,be,t),d(J,e,t),i(e,ye,t),i(e,y,t),d(N,y,null),o(y,Ee),o(y,F),i(e,ve,t),d(A,e,t),i(e,_e,t),i(e,v,t),d(Z,v,null),o(v,Ue),o(v,X),i(e,xe,t),d(G,e,t),i(e,Pe,t),i(e,Y,t),Te=!0},p:Xe,i(e){Te||(f(L.$$.fragment,e),f(O.$$.fragment,e),f(C.$$.fragment,e),f(k.$$.fragment,e),f(E.$$.fragment,e),f(U.$$.fragment,e),f(V.$$.fragment,e),f(D.$$.fragment,e),f(j.$$.fragment,e),f(q.$$.fragment,e),f(J.$$.fragment,e),f(N.$$.fragment,e),f(A.$$.fragment,e),f(Z.$$.fragment,e),f(G.$$.fragment,e),Te=!0)},o(e){m(L.$$.fragment,e),m(O.$$.fragment,e),m(C.$$.fragment,e),m(k.$$.fragment,e),m(E.$$.fragment,e),m(U.$$.fragment,e),m(V.$$.fragment,e),m(D.$$.fragment,e),m(j.$$.fragment,e),m(q.$$.fragment,e),m(J.$$.fragment,e),m(N.$$.fragment,e),m(A.$$.fragment,e),m(Z.$$.fragment,e),m(G.$$.fragment,e),Te=!1},d(e){e&&(s(se),s(K),s(ie),s(ne),s(ae),s(I),s(re),s(w),s(le),s(ue),s(M),s(pe),s(H),s(oe),s(de),s(B),s(fe),s(me),s(x),s(ce),s(ge),s(g),s($e),s(he),s(b),s(be),s(ye),s(y),s(ve),s(_e),s(v),s(xe),s(Pe),s(Y)),s(h),c(L,e),c(O,e),c(C,e),c(k,e),c(E,e),c(U,e),c(V),c(D),c(j,e),c(q),c(J,e),c(N),c(A,e),c(Z),c(G,e)}}}const at='{"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 rt(ze){return Ke(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mt extends Ye{constructor(h){super(),et(this,h,rt,nt,Fe,{})}}export{mt as component};
