import{s as ot,o as ft,n as ut}from"../chunks/scheduler.8c3d61f6.js";import{S as dt,i as mt,g as l,s as n,r as o,A as gt,h as p,f as s,c as a,j as w,u as f,x as h,k as O,y as u,a as i,v as d,d as m,t as g,w as c}from"../chunks/index.da70eac4.js";import{T as pt}from"../chunks/Tip.1d9b8c37.js";import{D as te}from"../chunks/Docstring.6b390b9a.js";import{C as Se}from"../chunks/CodeBlock.00a903b3.js";import{H as fe,E as ct}from"../chunks/EditOnGithub.1e64e623.js";function $t(se){let r,y="To check a specific pipeline or model output, refer to its corresponding API documentation.";return{c(){r=l("p"),r.textContent=y},l($){r=p($,"P",{"data-svelte-h":!0}),h(r)!=="svelte-60gd7d"&&(r.textContent=y)},m($,L){i($,r,L)},p:ut,d($){$&&s(r)}}}function ht(se){let r,y=`You can’t unpack a <code>BaseOutput</code> directly. Use the <a href="/docs/diffusers/pr_10012/en/api/outputs#diffusers.utils.BaseOutput.to_tuple">to_tuple()</a> method to convert it to a tuple
first.`;return{c(){r=l("p"),r.innerHTML=y},l($){r=p($,"P",{"data-svelte-h":!0}),h(r)!=="svelte-gr5kbb"&&(r.innerHTML=y)},m($,L){i($,r,L)},p:ut,d($){$&&s(r)}}}function bt(se){let r,y,$,L,V,me,k,Qe='All model outputs are subclasses of <a href="/docs/diffusers/pr_10012/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.',ge,B,Xe="For example:",ce,E,$e,U,Ye='The <code>outputs</code> object is a <a href="/docs/diffusers/pr_10012/en/api/pipelines/latent_diffusion#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> which means it has an image attribute.',he,z,Ke="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>:",be,D,_e,j,et=`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>:`,ve,F,ye,T,xe,J,Pe,b,N,je,ie,tt=`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.`,Fe,C,Je,M,A,Ne,ne,st="Convert self to a tuple containing all the attributes/keys that are not <code>None</code>.",Ie,Z,we,x,q,Ae,ae,it="Output class for image pipelines.",Oe,G,Le,_,R,Ze,re,nt="Output class for image pipelines.",qe,H,W,Ge,le,at="Returns a new object replacing the specified fields with new values.",Te,S,Ce,P,Q,Re,pe,rt="Output class for audio pipelines.",Me,X,He,I,Y,We,ue,lt="Output class for joint image-text pipelines.",Ve,K,ke,de,Be;return V=new fe({props:{title:"Outputs",local:"outputs",headingTag:"h1"}}),E=new Se({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}}),D=new Se({props:{code:"b3V0cHV0cy5pbWFnZXMlMEFvdXRwdXRzJTVCJTIyaW1hZ2VzJTIyJTVE",highlighted:`outputs.images
outputs[<span class="hljs-string">&quot;images&quot;</span>]`,wrap:!1}}),F=new Se({props:{code:"b3V0cHV0cyU1QiUzQTElNUQ=",highlighted:'outputs[:<span class="hljs-number">1</span>]',wrap:!1}}),T=new pt({props:{$$slots:{default:[$t]},$$scope:{ctx:se}}}),J=new fe({props:{title:"BaseOutput",local:"diffusers.utils.BaseOutput",headingTag:"h2"}}),N=new te({props:{name:"class diffusers.utils.BaseOutput",anchor:"diffusers.utils.BaseOutput",parameters:"",source:"https://github.com/huggingface/diffusers/blob/vr_10012/src/diffusers/utils/outputs.py#L40"}}),C=new pt({props:{warning:!0,$$slots:{default:[ht]},$$scope:{ctx:se}}}),A=new te({props:{name:"to_tuple",anchor:"diffusers.utils.BaseOutput.to_tuple",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_10012/src/diffusers/utils/outputs.py#L133"}}),Z=new fe({props:{title:"ImagePipelineOutput",local:"diffusers.ImagePipelineOutput",headingTag:"h2"}}),q=new te({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/vr_10012/src/diffusers/pipelines/pipeline_utils.py#L105"}}),G=new fe({props:{title:"FlaxImagePipelineOutput",local:"diffusers.pipelines.pipeline_flax_utils.FlaxImagePipelineOutput",headingTag:"h2"}}),R=new te({props:{name:"class diffusers.pipelines.pipeline_flax_utils.FlaxImagePipelineOutput",anchor:"diffusers.pipelines.pipeline_flax_utils.FlaxImagePipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"}],parametersDescription:[{anchor:"diffusers.pipelines.pipeline_flax_utils.FlaxImagePipelineOutput.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/vr_10012/src/diffusers/pipelines/pipeline_flax_utils.py#L87"}}),W=new te({props:{name:"replace",anchor:"diffusers.pipelines.pipeline_flax_utils.FlaxImagePipelineOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_10012/src/flax/struct.py#L144"}}),S=new fe({props:{title:"AudioPipelineOutput",local:"diffusers.AudioPipelineOutput",headingTag:"h2"}}),Q=new te({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/vr_10012/src/diffusers/pipelines/pipeline_utils.py#L119"}}),X=new fe({props:{title:"ImageTextPipelineOutput",local:"diffusers.ImageTextPipelineOutput",headingTag:"h2"}}),Y=new te({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/vr_10012/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L33"}}),K=new ct({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/outputs.md"}}),{c(){r=l("meta"),y=n(),$=l("p"),L=n(),o(V.$$.fragment),me=n(),k=l("p"),k.innerHTML=Qe,ge=n(),B=l("p"),B.textContent=Xe,ce=n(),o(E.$$.fragment),$e=n(),U=l("p"),U.innerHTML=Ye,he=n(),z=l("p"),z.innerHTML=Ke,be=n(),o(D.$$.fragment),_e=n(),j=l("p"),j.innerHTML=et,ve=n(),o(F.$$.fragment),ye=n(),o(T.$$.fragment),xe=n(),o(J.$$.fragment),Pe=n(),b=l("div"),o(N.$$.fragment),je=n(),ie=l("p"),ie.innerHTML=tt,Fe=n(),o(C.$$.fragment),Je=n(),M=l("div"),o(A.$$.fragment),Ne=n(),ne=l("p"),ne.innerHTML=st,Ie=n(),o(Z.$$.fragment),we=n(),x=l("div"),o(q.$$.fragment),Ae=n(),ae=l("p"),ae.textContent=it,Oe=n(),o(G.$$.fragment),Le=n(),_=l("div"),o(R.$$.fragment),Ze=n(),re=l("p"),re.textContent=nt,qe=n(),H=l("div"),o(W.$$.fragment),Ge=n(),le=l("p"),le.textContent=at,Te=n(),o(S.$$.fragment),Ce=n(),P=l("div"),o(Q.$$.fragment),Re=n(),pe=l("p"),pe.textContent=rt,Me=n(),o(X.$$.fragment),He=n(),I=l("div"),o(Y.$$.fragment),We=n(),ue=l("p"),ue.textContent=lt,Ve=n(),o(K.$$.fragment),ke=n(),de=l("p"),this.h()},l(e){const t=gt("svelte-u9bgzb",document.head);r=p(t,"META",{name:!0,content:!0}),t.forEach(s),y=a(e),$=p(e,"P",{}),w($).forEach(s),L=a(e),f(V.$$.fragment,e),me=a(e),k=p(e,"P",{"data-svelte-h":!0}),h(k)!=="svelte-4ujlfb"&&(k.innerHTML=Qe),ge=a(e),B=p(e,"P",{"data-svelte-h":!0}),h(B)!=="svelte-1gkqha7"&&(B.textContent=Xe),ce=a(e),f(E.$$.fragment,e),$e=a(e),U=p(e,"P",{"data-svelte-h":!0}),h(U)!=="svelte-17b1qst"&&(U.innerHTML=Ye),he=a(e),z=p(e,"P",{"data-svelte-h":!0}),h(z)!=="svelte-1ntwqaz"&&(z.innerHTML=Ke),be=a(e),f(D.$$.fragment,e),_e=a(e),j=p(e,"P",{"data-svelte-h":!0}),h(j)!=="svelte-qzd8sf"&&(j.innerHTML=et),ve=a(e),f(F.$$.fragment,e),ye=a(e),f(T.$$.fragment,e),xe=a(e),f(J.$$.fragment,e),Pe=a(e),b=p(e,"DIV",{class:!0});var v=w(b);f(N.$$.fragment,v),je=a(v),ie=p(v,"P",{"data-svelte-h":!0}),h(ie)!=="svelte-1qra1r9"&&(ie.innerHTML=tt),Fe=a(v),f(C.$$.fragment,v),Je=a(v),M=p(v,"DIV",{class:!0});var ee=w(M);f(A.$$.fragment,ee),Ne=a(ee),ne=p(ee,"P",{"data-svelte-h":!0}),h(ne)!=="svelte-1gdpts"&&(ne.innerHTML=st),ee.forEach(s),v.forEach(s),Ie=a(e),f(Z.$$.fragment,e),we=a(e),x=p(e,"DIV",{class:!0});var Ee=w(x);f(q.$$.fragment,Ee),Ae=a(Ee),ae=p(Ee,"P",{"data-svelte-h":!0}),h(ae)!=="svelte-19wetgi"&&(ae.textContent=it),Ee.forEach(s),Oe=a(e),f(G.$$.fragment,e),Le=a(e),_=p(e,"DIV",{class:!0});var oe=w(_);f(R.$$.fragment,oe),Ze=a(oe),re=p(oe,"P",{"data-svelte-h":!0}),h(re)!=="svelte-19wetgi"&&(re.textContent=nt),qe=a(oe),H=p(oe,"DIV",{class:!0});var Ue=w(H);f(W.$$.fragment,Ue),Ge=a(Ue),le=p(Ue,"P",{"data-svelte-h":!0}),h(le)!=="svelte-brjshm"&&(le.textContent=at),Ue.forEach(s),oe.forEach(s),Te=a(e),f(S.$$.fragment,e),Ce=a(e),P=p(e,"DIV",{class:!0});var ze=w(P);f(Q.$$.fragment,ze),Re=a(ze),pe=p(ze,"P",{"data-svelte-h":!0}),h(pe)!=="svelte-19ryw33"&&(pe.textContent=rt),ze.forEach(s),Me=a(e),f(X.$$.fragment,e),He=a(e),I=p(e,"DIV",{class:!0});var De=w(I);f(Y.$$.fragment,De),We=a(De),ue=p(De,"P",{"data-svelte-h":!0}),h(ue)!=="svelte-1i2ycus"&&(ue.textContent=lt),De.forEach(s),Ve=a(e),f(K.$$.fragment,e),ke=a(e),de=p(e,"P",{}),w(de).forEach(s),this.h()},h(){O(r,"name","hf:doc:metadata"),O(r,"content",_t),O(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),O(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),O(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),O(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),O(_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),O(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),O(I,"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){u(document.head,r),i(e,y,t),i(e,$,t),i(e,L,t),d(V,e,t),i(e,me,t),i(e,k,t),i(e,ge,t),i(e,B,t),i(e,ce,t),d(E,e,t),i(e,$e,t),i(e,U,t),i(e,he,t),i(e,z,t),i(e,be,t),d(D,e,t),i(e,_e,t),i(e,j,t),i(e,ve,t),d(F,e,t),i(e,ye,t),d(T,e,t),i(e,xe,t),d(J,e,t),i(e,Pe,t),i(e,b,t),d(N,b,null),u(b,je),u(b,ie),u(b,Fe),d(C,b,null),u(b,Je),u(b,M),d(A,M,null),u(M,Ne),u(M,ne),i(e,Ie,t),d(Z,e,t),i(e,we,t),i(e,x,t),d(q,x,null),u(x,Ae),u(x,ae),i(e,Oe,t),d(G,e,t),i(e,Le,t),i(e,_,t),d(R,_,null),u(_,Ze),u(_,re),u(_,qe),u(_,H),d(W,H,null),u(H,Ge),u(H,le),i(e,Te,t),d(S,e,t),i(e,Ce,t),i(e,P,t),d(Q,P,null),u(P,Re),u(P,pe),i(e,Me,t),d(X,e,t),i(e,He,t),i(e,I,t),d(Y,I,null),u(I,We),u(I,ue),i(e,Ve,t),d(K,e,t),i(e,ke,t),i(e,de,t),Be=!0},p(e,[t]){const v={};t&2&&(v.$$scope={dirty:t,ctx:e}),T.$set(v);const ee={};t&2&&(ee.$$scope={dirty:t,ctx:e}),C.$set(ee)},i(e){Be||(m(V.$$.fragment,e),m(E.$$.fragment,e),m(D.$$.fragment,e),m(F.$$.fragment,e),m(T.$$.fragment,e),m(J.$$.fragment,e),m(N.$$.fragment,e),m(C.$$.fragment,e),m(A.$$.fragment,e),m(Z.$$.fragment,e),m(q.$$.fragment,e),m(G.$$.fragment,e),m(R.$$.fragment,e),m(W.$$.fragment,e),m(S.$$.fragment,e),m(Q.$$.fragment,e),m(X.$$.fragment,e),m(Y.$$.fragment,e),m(K.$$.fragment,e),Be=!0)},o(e){g(V.$$.fragment,e),g(E.$$.fragment,e),g(D.$$.fragment,e),g(F.$$.fragment,e),g(T.$$.fragment,e),g(J.$$.fragment,e),g(N.$$.fragment,e),g(C.$$.fragment,e),g(A.$$.fragment,e),g(Z.$$.fragment,e),g(q.$$.fragment,e),g(G.$$.fragment,e),g(R.$$.fragment,e),g(W.$$.fragment,e),g(S.$$.fragment,e),g(Q.$$.fragment,e),g(X.$$.fragment,e),g(Y.$$.fragment,e),g(K.$$.fragment,e),Be=!1},d(e){e&&(s(y),s($),s(L),s(me),s(k),s(ge),s(B),s(ce),s($e),s(U),s(he),s(z),s(be),s(_e),s(j),s(ve),s(ye),s(xe),s(Pe),s(b),s(Ie),s(we),s(x),s(Oe),s(Le),s(_),s(Te),s(Ce),s(P),s(Me),s(He),s(I),s(Ve),s(ke),s(de)),s(r),c(V,e),c(E,e),c(D,e),c(F,e),c(T,e),c(J,e),c(N),c(C),c(A),c(Z,e),c(q),c(G,e),c(R),c(W),c(S,e),c(Q),c(X,e),c(Y),c(K,e)}}}const _t='{"title":"Outputs","local":"outputs","sections":[{"title":"BaseOutput","local":"diffusers.utils.BaseOutput","sections":[],"depth":2},{"title":"ImagePipelineOutput","local":"diffusers.ImagePipelineOutput","sections":[],"depth":2},{"title":"FlaxImagePipelineOutput","local":"diffusers.pipelines.pipeline_flax_utils.FlaxImagePipelineOutput","sections":[],"depth":2},{"title":"AudioPipelineOutput","local":"diffusers.AudioPipelineOutput","sections":[],"depth":2},{"title":"ImageTextPipelineOutput","local":"diffusers.ImageTextPipelineOutput","sections":[],"depth":2}],"depth":1}';function vt(se){return ft(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Lt extends dt{constructor(r){super(),mt(this,r,vt,bt,ot,{})}}export{Lt as component};
