Buckets:
| 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.1d9b8c37.js";import{D as ie}from"../chunks/Docstring.2187c15d.js";import{C as Ee}from"../chunks/CodeBlock.a9c4becf.js";import{H as ne,E as Ke}from"../chunks/getInferenceSnippets.676f6ee5.js";function et(F){let r,y="To check a specific pipeline or model output, refer to its corresponding API documentation.";return{c(){r=u("p"),r.textContent=y},l(l){r=p(l,"P",{"data-svelte-h":!0}),b(r)!=="svelte-60gd7d"&&(r.textContent=y)},m(l,w){i(l,r,w)},p:We,d(l){l&&s(r)}}}function tt(F){let r,y=`You can’t unpack a <code>BaseOutput</code> directly. Use the <a href="/docs/diffusers/pr_12262/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=y},l(l){r=p(l,"P",{"data-svelte-h":!0}),b(r)!=="svelte-8us4eu"&&(r.innerHTML=y)},m(l,w){i(l,r,w)},p:We,d(l){l&&s(r)}}}function st(F){let r,y,l,w,O,ae,C,Ue='All model outputs are subclasses of <a href="/docs/diffusers/pr_12262/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/pr_12262/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,Ae=`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,Ne=`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,je="Convert self to a tuple containing all the attributes/keys that are not <code>None</code>.",$e,A,he,v,N,Be,K,Ze="Output class for image pipelines.",be,j,_e,P,Z,ke,ee,qe="Output class for audio pipelines.",ye,q,ve,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">"google/ddpm-cifar10-32"</span>) | |
| outputs = pipeline()`,wrap:!1}}),V=new Ee({props:{code:"b3V0cHV0cy5pbWFnZXMlMEFvdXRwdXRzJTVCJTIyaW1hZ2VzJTIyJTVE",highlighted:`outputs.images | |
| outputs[<span class="hljs-string">"images"</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/vr_12262/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/vr_12262/src/diffusers/utils/outputs.py#L134"}}),A=new ne({props:{title:"ImagePipelineOutput",local:"diffusers.ImagePipelineOutput",headingTag:"h2"}}),N=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>) — | |
| 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_12262/src/diffusers/pipelines/pipeline_utils.py#L117"}}),j=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>) — | |
| 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_12262/src/diffusers/pipelines/pipeline_utils.py#L131"}}),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>) — | |
| 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>) — | |
| 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_12262/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"),y=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=Ae,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=Ne,Ce=n(),o(I.$$.fragment),Me=n(),L=u("div"),o(J.$$.fragment),He=n(),Y=u("p"),Y.innerHTML=je,$e=n(),o(A.$$.fragment),he=n(),v=u("div"),o(N.$$.fragment),Be=n(),K=u("p"),K.textContent=Ze,be=n(),o(j.$$.fragment),_e=n(),P=u("div"),o(Z.$$.fragment),ke=n(),ee=u("p"),ee.textContent=qe,ye=n(),o(q.$$.fragment),ve=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),y=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-e0ts30"&&(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-q50ixn"&&(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=Ae),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 _=S(h);f(D.$$.fragment,_),Oe=a(_),X=p(_,"P",{"data-svelte-h":!0}),b(X)!=="svelte-1qra1r9"&&(X.innerHTML=Ne),Ce=a(_),f(I.$$.fragment,_),Me=a(_),L=p(_,"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=je),W.forEach(s),_.forEach(s),$e=a(e),f(A.$$.fragment,e),he=a(e),v=p(e,"DIV",{class:!0});var Te=S(v);f(N.$$.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(j.$$.fragment,e),_e=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),ye=a(e),f(q.$$.fragment,e),ve=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(v,"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,y,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(A,e,t),i(e,he,t),i(e,v,t),d(N,v,null),$(v,Be),$(v,K),i(e,be,t),d(j,e,t),i(e,_e,t),i(e,P,t),d(Z,P,null),$(P,ke),$(P,ee),i(e,ye,t),d(q,e,t),i(e,ve,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 _={};t&2&&(_.$$scope={dirty:t,ctx:e}),T.$set(_);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(A.$$.fragment,e),m(N.$$.fragment,e),m(j.$$.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(A.$$.fragment,e),c(N.$$.fragment,e),c(j.$$.fragment,e),c(Z.$$.fragment,e),c(q.$$.fragment,e),c(G.$$.fragment,e),c(R.$$.fragment,e),we=!1},d(e){e&&(s(y),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(v),s(be),s(_e),s(P),s(ye),s(ve),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(A,e),g(N),g(j,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}; | |
Xet Storage Details
- Size:
- 12.2 kB
- Xet hash:
- 287f58f09f09c9c471c742ce2c67cddcb4254314596fca1cb3d1a879f1dacc3b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.