Buckets:

rtrm's picture
download
raw
12 kB
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.1b50ff75.js";import{D as ee}from"../chunks/Docstring.2d4c264a.js";import{C as Ue}from"../chunks/CodeBlock.d30a6509.js";import{H as te,E as it}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.f94e0d6c.js";function nt(ze){let h,se,K,ie,O,ne,I,ae,w,De='All model outputs are subclasses of <a href="/docs/diffusers/pr_12652/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,L,qe="For example:",le,C,ue,M,Je='The <code>outputs</code> object is a <a href="/docs/diffusers/pr_12652/en/api/pipelines/ddim#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,V,ge,g,U,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/pr_12652/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,q,he,b,J,Be,W,Re="Output class for image pipelines.",be,j,ve,v,N,Ee,F,Se="Output class for audio pipelines.",ye,A,_e,y,Z,Ve,X,We="Output class for joint image-text pipelines.",xe,G,Pe,Y,Te;return O=new st({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),I=new te({props:{title:"Outputs",local:"outputs",headingTag:"h1"}}),C=new Ue({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 Ue({props:{code:"b3V0cHV0cy5pbWFnZXMlMEFvdXRwdXRzJTVCJTIyaW1hZ2VzJTIyJTVE",highlighted:`outputs.images
outputs[<span class="hljs-string">&quot;images&quot;</span>]`,wrap:!1}}),E=new Ue({props:{code:"b3V0cHV0cyU1QiUzQTElNUQ=",highlighted:'outputs[:<span class="hljs-number">1</span>]',wrap:!1}}),V=new te({props:{title:"BaseOutput",local:"diffusers.utils.BaseOutput",headingTag:"h2"}}),U=new ee({props:{name:"class diffusers.utils.BaseOutput",anchor:"diffusers.utils.BaseOutput",parameters:"",source:"https://github.com/huggingface/diffusers/blob/vr_12652/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/vr_12652/src/diffusers/utils/outputs.py#L130"}}),q=new te({props:{title:"ImagePipelineOutput",local:"diffusers.ImagePipelineOutput",headingTag:"h2"}}),J=new ee({props:{name:"class diffusers.ImagePipelineOutput",anchor:"diffusers.ImagePipelineOutput",parameters:[{name:"images",val:": 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_12652/src/diffusers/pipelines/pipeline_utils.py#L121"}}),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/vr_12652/src/diffusers/pipelines/pipeline_utils.py#L135"}}),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:": list[PIL.Image.Image] | numpy.ndarray | None"},{name:"text",val:": list[str] | list[list[str]] | None"}],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_12652/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(O.$$.fragment),ne=n(),u(I.$$.fragment),ae=n(),w=r("p"),w.innerHTML=De,re=n(),L=r("p"),L.textContent=qe,le=n(),u(C.$$.fragment),ue=n(),M=r("p"),M.innerHTML=Je,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(V.$$.fragment),ge=n(),g=r("div"),u(U.$$.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(q.$$.fragment),he=n(),b=r("div"),u(J.$$.fragment),Be=n(),W=r("p"),W.textContent=Re,be=n(),u(j.$$.fragment),ve=n(),v=r("div"),u(N.$$.fragment),Ee=n(),F=r("p"),F.textContent=Se,ye=n(),u(A.$$.fragment),_e=n(),y=r("div"),u(Z.$$.fragment),Ve=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(O.$$.fragment,e),ne=a(e),p(I.$$.fragment,e),ae=a(e),w=l(e,"P",{"data-svelte-h":!0}),$(w)!=="svelte-14mdck3"&&(w.innerHTML=De),re=a(e),L=l(e,"P",{"data-svelte-h":!0}),$(L)!=="svelte-1gkqha7"&&(L.textContent=qe),le=a(e),p(C.$$.fragment,e),ue=a(e),M=l(e,"P",{"data-svelte-h":!0}),$(M)!=="svelte-14jdull"&&(M.innerHTML=Je),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(V.$$.fragment,e),ge=a(e),g=l(e,"DIV",{class:!0});var T=Q(g);p(U.$$.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-llfmdt"&&(z.innerHTML=Ge),He=a(T),P=l(T,"DIV",{class:!0});var Oe=Q(P);p(D.$$.fragment,Oe),ke=a(Oe),S=l(Oe,"P",{"data-svelte-h":!0}),$(S)!=="svelte-1gdpts"&&(S.innerHTML=Qe),Oe.forEach(s),T.forEach(s),$e=a(e),p(q.$$.fragment,e),he=a(e),b=l(e,"DIV",{class:!0});var Ie=Q(b);p(J.$$.fragment,Ie),Be=a(Ie),W=l(Ie,"P",{"data-svelte-h":!0}),$(W)!=="svelte-19wetgi"&&(W.textContent=Re),Ie.forEach(s),be=a(e),p(j.$$.fragment,e),ve=a(e),v=l(e,"DIV",{class:!0});var we=Q(v);p(N.$$.fragment,we),Ee=a(we),F=l(we,"P",{"data-svelte-h":!0}),$(F)!=="svelte-19ryw33"&&(F.textContent=Se),we.forEach(s),ye=a(e),p(A.$$.fragment,e),_e=a(e),y=l(e,"DIV",{class:!0});var Le=Q(y);p(Z.$$.fragment,Le),Ve=a(Le),X=l(Le,"P",{"data-svelte-h":!0}),$(X)!=="svelte-1i2ycus"&&(X.textContent=We),Le.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"),_(v,"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")},m(e,t){o(document.head,h),i(e,se,t),i(e,K,t),i(e,ie,t),d(O,e,t),i(e,ne,t),d(I,e,t),i(e,ae,t),i(e,w,t),i(e,re,t),i(e,L,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(V,e,t),i(e,ge,t),i(e,g,t),d(U,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(q,e,t),i(e,he,t),i(e,b,t),d(J,b,null),o(b,Be),o(b,W),i(e,be,t),d(j,e,t),i(e,ve,t),i(e,v,t),d(N,v,null),o(v,Ee),o(v,F),i(e,ye,t),d(A,e,t),i(e,_e,t),i(e,y,t),d(Z,y,null),o(y,Ve),o(y,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(O.$$.fragment,e),f(I.$$.fragment,e),f(C.$$.fragment,e),f(k.$$.fragment,e),f(E.$$.fragment,e),f(V.$$.fragment,e),f(U.$$.fragment,e),f(D.$$.fragment,e),f(q.$$.fragment,e),f(J.$$.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(O.$$.fragment,e),m(I.$$.fragment,e),m(C.$$.fragment,e),m(k.$$.fragment,e),m(E.$$.fragment,e),m(V.$$.fragment,e),m(U.$$.fragment,e),m(D.$$.fragment,e),m(q.$$.fragment,e),m(J.$$.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(w),s(re),s(L),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(ve),s(v),s(ye),s(_e),s(y),s(xe),s(Pe),s(Y)),s(h),c(O,e),c(I,e),c(C,e),c(k,e),c(E,e),c(V,e),c(U),c(D),c(q,e),c(J),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};

Xet Storage Details

Size:
12 kB
·
Xet hash:
f1300441f544498d9c6508f82b7be6f8b5219be2e694df1aaf84cd9794c2eeb2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.