Buckets:
hf-doc-build/doc / diffusers /v0.14.0 /en /_app /pages /using-diffusers /controlling_generation.mdx-hf-doc-builder.js
| import{S as of,i as af,s as rf,e as o,k as h,w,t as l,M as nf,c as a,d as t,m as u,a as r,x as _,h as f,b as p,G as i,g as s,y as b,q as x,o as E,B as P,v as sf}from"../../chunks/vendor-hf-doc-builder.js";import{T as tf}from"../../chunks/Tip-hf-doc-builder.js";import{I as S}from"../../chunks/IconCopyLink-hf-doc-builder.js";function lf(Je){let d,$,m,g;return{c(){d=o("p"),$=l(`Pix2Pix Zero is the first model that allows \u201Czero-shot\u201D image editing. This means that the model | |
| can edit an image in less than a minute on a consumer GPU as shown `),m=o("a"),g=l("here"),this.h()},l(k){d=a(k,"P",{});var y=r(d);$=f(y,`Pix2Pix Zero is the first model that allows \u201Czero-shot\u201D image editing. This means that the model | |
| can edit an image in less than a minute on a consumer GPU as shown `),m=a(y,"A",{href:!0});var Ke=r(m);g=f(Ke,"here"),Ke.forEach(t),y.forEach(t),this.h()},h(){p(m,"href","../api/pipelines/stable_diffusion/pix2pix_zero#usage-example")},m(k,y){s(k,d,y),i(d,$),i(d,m),i(m,g)},d(k){k&&t(d)}}}function ff(Je){let d,$;return{c(){d=o("p"),$=l(`An important distinction between methods like InstructPix2Pix and Pix2Pix Zero is that the former | |
| involves fine-tuning the pre-trained weights while the latter does not. This means that you can | |
| apply Pix2Pix Zero to any of the available Stable Diffusion models.`)},l(m){d=a(m,"P",{});var g=r(d);$=f(g,`An important distinction between methods like InstructPix2Pix and Pix2Pix Zero is that the former | |
| involves fine-tuning the pre-trained weights while the latter does not. This means that you can | |
| apply Pix2Pix Zero to any of the available Stable Diffusion models.`),g.forEach(t)},m(m,g){s(m,d,g),i(d,$)},d(m){m&&t(d)}}}function pf(Je){let d,$,m,g,k,y,Ke,Kt,ca,Gi,Qe,ma,qi,Xe,va,ji,Ye,ga,zi,A,wa,Qt,_a,ba,me,xa,Ea,ve,Pa,ya,Zi,et,$a,Li,tt,Aa,Ci,it,Sa,Mi,c,Xt,ot,ka,Ia,Yt,at,Ta,Na,ei,rt,Da,Ga,ti,nt,qa,ja,ii,st,za,Za,oi,lt,La,Ca,ai,ft,Ma,Ha,ri,pt,Ua,Fa,ni,ht,Ba,Oa,si,ut,Wa,Hi,I,H,li,ge,Ra,fi,Va,Ui,dt,we,Ja,Fi,T,ct,Ka,Qa,_e,Xa,Ya,Bi,U,er,mt,tr,ir,Oi,N,F,pi,be,or,hi,ar,Wi,vt,xe,rr,Ri,Ee,gt,nr,sr,Vi,wt,lr,Ji,_t,fr,Ki,B,Pe,pr,ye,hr,ur,dr,$e,cr,Ae,mr,vr,Qi,O,Xi,W,gr,bt,wr,_r,Yi,R,br,xt,xr,Er,eo,D,V,ui,Se,Pr,di,yr,to,Et,ke,$r,io,Ie,Pt,Ar,Sr,oo,yt,kr,ao,J,Ir,ci,Tr,Nr,ro,K,Dr,$t,Gr,qr,no,G,Q,mi,Te,jr,vi,zr,so,At,Ne,Zr,lo,St,Lr,fo,kt,Cr,po,It,Mr,ho,X,Hr,Tt,Ur,Fr,uo,q,Y,gi,De,Br,wi,Or,co,Nt,Ge,Wr,mo,qe,Dt,Rr,Vr,vo,Gt,Jr,go,ee,Kr,qt,Qr,Xr,wo,j,te,_i,je,Yr,bi,en,_o,jt,ze,tn,bo,Ze,zt,on,an,xo,Zt,rn,Eo,ie,nn,Lt,sn,ln,Po,oe,yo,z,ae,xi,Le,fn,Ei,pn,$o,Ct,Ce,hn,Ao,re,un,Mt,dn,cn,So,ne,mn,Ht,vn,gn,ko,Z,se,Pi,Me,wn,yi,_n,Io,Ut,bn,To,L,le,$i,He,xn,Ai,En,No,Ue,Ft,Pn,yn,Do,fe,$n,Bt,An,Sn,Go,C,pe,Si,Fe,kn,ki,In,qo,Be,Ot,Tn,Nn,jo,he,Dn,Wt,Gn,qn,zo,M,ue,Ii,Oe,jn,Ti,zn,Zo,Rt,We,Zn,Lo,Re,Vt,Ln,Cn,Co,de,Mn,Jt,Hn,Un,Mo;return y=new S({}),ge=new S({}),be=new S({}),O=new tf({props:{$$slots:{default:[lf]},$$scope:{ctx:Je}}}),Se=new S({}),Te=new S({}),De=new S({}),je=new S({}),oe=new tf({props:{$$slots:{default:[ff]},$$scope:{ctx:Je}}}),Le=new S({}),Me=new S({}),He=new S({}),Fe=new S({}),Oe=new S({}),{c(){d=o("meta"),$=h(),m=o("h1"),g=o("a"),k=o("span"),w(y.$$.fragment),Ke=h(),Kt=o("span"),ca=l("Controlling generation of diffusion models"),Gi=h(),Qe=o("p"),ma=l("Controlling outputs generated by diffusion models has been long pursued by the community and is now an active research topic. In many popular diffusion models, subtle changes in inputs, both images and text prompts, can drastically change outputs. In an ideal world we want to be able to control how semantics are preserved and changed."),qi=h(),Xe=o("p"),va=l("Most examples of preserving semantics reduce to being able to accurately map a change in input to a change in output. I.e. adding an adjective to a subject in a prompt preserves the entire image, only modifying the changed subject. Or, image variation of a particular subject preserves the subject\u2019s pose."),ji=h(),Ye=o("p"),ga=l("Additionally, there are qualities of generated images that we would like to influence beyond semantic preservation. I.e. in general, we would like our outputs to be of good quality, adhere to a particular style, or be realistic."),zi=h(),A=o("p"),wa=l("We will document some of the techniques "),Qt=o("code"),_a=l("diffusers"),ba=l(" supports to control generation of diffusion models. Much is cutting edge research and can be quite nuanced. If something needs clarifying or you have a suggestion, don\u2019t hesitate to open a discussion on the "),me=o("a"),xa=l("forum"),Ea=l(" or a "),ve=o("a"),Pa=l("GitHub issue"),ya=l("."),Zi=h(),et=o("p"),$a=l("We provide a high level explanation of how the generation can be controlled as well as a snippet of the technicals. For more in depth explanations on the technicals, the original papers which are linked from the pipelines are always the best resources."),Li=h(),tt=o("p"),Aa=l("Depending on the use case, one should choose a technique accordingly. In many cases, these techniques can be combined. For example, one can combine Textual Inversion with SEGA to provide more semantic guidance to the outputs generated using Textual Inversion."),Ci=h(),it=o("p"),Sa=l("Unless otherwise mentioned, these are techniques that work with existing models and don\u2019t require their own weights."),Mi=h(),c=o("ol"),Xt=o("li"),ot=o("a"),ka=l("Instruct Pix2Pix"),Ia=h(),Yt=o("li"),at=o("a"),Ta=l("Pix2Pix Zero"),Na=h(),ei=o("li"),rt=o("a"),Da=l("Attend and Excite"),Ga=h(),ti=o("li"),nt=o("a"),qa=l("Semantic Guidance"),ja=h(),ii=o("li"),st=o("a"),za=l("Self-attention Guidance"),Za=h(),oi=o("li"),lt=o("a"),La=l("Depth2Image"),Ca=h(),ai=o("li"),ft=o("a"),Ma=l("MultiDiffusion Panorama"),Ha=h(),ri=o("li"),pt=o("a"),Ua=l("DreamBooth"),Fa=h(),ni=o("li"),ht=o("a"),Ba=l("Textual Inversion"),Oa=h(),si=o("li"),ut=o("a"),Wa=l("ControlNet"),Hi=h(),I=o("h2"),H=o("a"),li=o("span"),w(ge.$$.fragment),Ra=h(),fi=o("span"),Va=l("Instruct Pix2Pix"),Ui=h(),dt=o("p"),we=o("a"),Ja=l("Paper"),Fi=h(),T=o("p"),ct=o("a"),Ka=l("Instruct Pix2Pix"),Qa=l(` is fine-tuned from stable diffusion to support editing input images. It takes as inputs an image and a prompt describing an edit, and it outputs the edited image. | |
| Instruct Pix2Pix has been explicitly trained to work well with `),_e=o("a"),Xa=l("InstructGPT"),Ya=l("-like prompts."),Bi=h(),U=o("p"),er=l("See "),mt=o("a"),tr=l("here"),ir=l(" for more information on how to use it."),Oi=h(),N=o("h2"),F=o("a"),pi=o("span"),w(be.$$.fragment),or=h(),hi=o("span"),ar=l("Pix2Pix Zero"),Wi=h(),vt=o("p"),xe=o("a"),rr=l("Paper"),Ri=h(),Ee=o("p"),gt=o("a"),nr=l("Pix2Pix Zero"),sr=l(" allows modifying an image so that one concept or subject is translated to another one while preserving general image semantics."),Vi=h(),wt=o("p"),lr=l("The denoising process is guided from one conceptual embedding towards another conceptual embedding. The intermediate latents are optimized during the denoising process to push the attention maps towards reference attention maps. The reference attention maps are from the denoising process of the input image and are used to encourage semantic preservation."),Ji=h(),_t=o("p"),fr=l("Pix2Pix Zero can be used both to edit synthetic images as well as real images."),Ki=h(),B=o("ul"),Pe=o("li"),pr=l(`To edit synthetic images, one first generates an image given a caption. | |
| Next, we generate image captions for the concept that shall be edited and for the new target concept. We can use a model like `),ye=o("a"),hr=l("Flan-T5"),ur=l(" for this purpose. Then, \u201Cmean\u201D prompt embeddings for both the source and target concepts are created via the text encoder. Finally, the pix2pix-zero algorithm is used to edit the synthetic image."),dr=h(),$e=o("li"),cr=l("To edit a real image, one first generates an image caption using a model like "),Ae=o("a"),mr=l("BLIP"),vr=l(". Then one applies ddim inversion on the prompt and image to generate \u201Cinverse\u201D latents. Similar to before, \u201Cmean\u201D prompt embeddings for both source and target concepts are created and finally the pix2pix-zero algorithm in combination with the \u201Cinverse\u201D latents is used to edit the image."),Qi=h(),w(O.$$.fragment),Xi=h(),W=o("p"),gr=l(`As mentioned above, Pix2Pix Zero includes optimizing the latents (and not any of the UNet, VAE, or the text encoder) to steer the generation toward a specific concept. This means that the overall | |
| pipeline might require more memory than a standard `),bt=o("a"),wr=l("StableDiffusionPipeline"),_r=l("."),Yi=h(),R=o("p"),br=l("See "),xt=o("a"),xr=l("here"),Er=l(" for more information on how to use it."),eo=h(),D=o("h2"),V=o("a"),ui=o("span"),w(Se.$$.fragment),Pr=h(),di=o("span"),yr=l("Attend and Excite"),to=h(),Et=o("p"),ke=o("a"),$r=l("Paper"),io=h(),Ie=o("p"),Pt=o("a"),Ar=l("Attend and Excite"),Sr=l(" allows subjects in the prompt to be faithfully represented in the final image."),oo=h(),yt=o("p"),kr=l("A set of token indices are given as input, corresponding to the subjects in the prompt that need to be present in the image. During denoising, each token index is guaranteed to have a minimum attention threshold for at least one patch of the image. The intermediate latents are iteratively optimized during the denoising process to strengthen the attention of the most neglected subject token until the attention threshold is passed for all subject tokens."),ao=h(),J=o("p"),Ir=l("Like Pix2Pix Zero, Attend and Excite also involves a mini optimization loop (leaving the pre-trained weights untouched) in its pipeline and can require more memory than the usual "),ci=o("code"),Tr=l("StableDiffusionPipeline"),Nr=l("."),ro=h(),K=o("p"),Dr=l("See "),$t=o("a"),Gr=l("here"),qr=l(" for more information on how to use it."),no=h(),G=o("h2"),Q=o("a"),mi=o("span"),w(Te.$$.fragment),jr=h(),vi=o("span"),zr=l("Semantic Guidance (SEGA)"),so=h(),At=o("p"),Ne=o("a"),Zr=l("Paper"),lo=h(),St=o("p"),Lr=l("SEGA allows applying or removing one or more concepts from an image. The strength of the concept can also be controlled. I.e. the smile concept can be used to incrementally increase or decrease the smile of a portrait."),fo=h(),kt=o("p"),Cr=l("Similar to how classifier free guidance provides guidance via empty prompt inputs, SEGA provides guidance on conceptual prompts. Multiple of these conceptual prompts can be applied simultaneously. Each conceptual prompt can either add or remove their concept depending on if the guidance is applied positively or negatively."),po=h(),It=o("p"),Mr=l("Unlike Pix2Pix Zero or Attend and Excite, SEGA directly interacts with the diffusion process instead of performing any explicit gradient-based optimization."),ho=h(),X=o("p"),Hr=l("See "),Tt=o("a"),Ur=l("here"),Fr=l(" for more information on how to use it."),uo=h(),q=o("h2"),Y=o("a"),gi=o("span"),w(De.$$.fragment),Br=h(),wi=o("span"),Or=l("Self-attention Guidance (SAG)"),co=h(),Nt=o("p"),Ge=o("a"),Wr=l("Paper"),mo=h(),qe=o("p"),Dt=o("a"),Rr=l("Self-attention Guidance"),Vr=l(" improves the general quality of images."),vo=h(),Gt=o("p"),Jr=l("SAG provides guidance from predictions not conditioned on high-frequency details to fully conditioned images. The high frequency details are extracted out of the UNet self-attention maps."),go=h(),ee=o("p"),Kr=l("See "),qt=o("a"),Qr=l("here"),Xr=l(" for more information on how to use it."),wo=h(),j=o("h2"),te=o("a"),_i=o("span"),w(je.$$.fragment),Yr=h(),bi=o("span"),en=l("Depth2Image"),_o=h(),jt=o("p"),ze=o("a"),tn=l("Project"),bo=h(),Ze=o("p"),zt=o("a"),on=l("Depth2Image"),an=l(" is fine-tuned from Stable Diffusion to better preserve semantics for text guided image variation."),xo=h(),Zt=o("p"),rn=l("It conditions on a monocular depth estimate of the original image."),Eo=h(),ie=o("p"),nn=l("See "),Lt=o("a"),sn=l("here"),ln=l(" for more information on how to use it."),Po=h(),w(oe.$$.fragment),yo=h(),z=o("h2"),ae=o("a"),xi=o("span"),w(Le.$$.fragment),fn=h(),Ei=o("span"),pn=l("MultiDiffusion Panorama"),$o=h(),Ct=o("p"),Ce=o("a"),hn=l("Paper"),Ao=h(),re=o("p"),un=l(`MultiDiffusion defines a new generation process over a pre-trained diffusion model. This process binds together multiple diffusion generation methods that can be readily applied to generate high quality and diverse images. Results adhere to user-provided controls, such as desired aspect ratio (e.g., panorama), and spatial guiding signals, ranging from tight segmentation masks to bounding boxes. | |
| `),Mt=o("a"),dn=l("MultiDiffusion Panorama"),cn=l(" allows to generate high-quality images at arbitrary aspect ratios (e.g., panoramas)."),So=h(),ne=o("p"),mn=l("See "),Ht=o("a"),vn=l("here"),gn=l(" for more information on how to use it to generate panoramic images."),ko=h(),Z=o("h2"),se=o("a"),Pi=o("span"),w(Me.$$.fragment),wn=h(),yi=o("span"),_n=l("Fine-tuning your own models"),Io=h(),Ut=o("p"),bn=l("In addition to pre-trained models, Diffusers has training scripts for fine-tuning models on user-provided data."),To=h(),L=o("h3"),le=o("a"),$i=o("span"),w(He.$$.fragment),xn=h(),Ai=o("span"),En=l("DreamBooth"),No=h(),Ue=o("p"),Ft=o("a"),Pn=l("DreamBooth"),yn=l(" fine-tunes a model to teach it about a new subject. I.e. a few pictures of a person can be used to generate images of that person in different styles."),Do=h(),fe=o("p"),$n=l("See "),Bt=o("a"),An=l("here"),Sn=l(" for more information on how to use it."),Go=h(),C=o("h3"),pe=o("a"),Si=o("span"),w(Fe.$$.fragment),kn=h(),ki=o("span"),In=l("Textual Inversion"),qo=h(),Be=o("p"),Ot=o("a"),Tn=l("Textual Inversion"),Nn=l(" fine-tunes a model to teach it about a new concept. I.e. a few pictures of a style of artwork can be used to generate images in that style."),jo=h(),he=o("p"),Dn=l("See "),Wt=o("a"),Gn=l("here"),qn=l(" for more information on how to use it."),zo=h(),M=o("h2"),ue=o("a"),Ii=o("span"),w(Oe.$$.fragment),jn=h(),Ti=o("span"),zn=l("ControlNet"),Zo=h(),Rt=o("p"),We=o("a"),Zn=l("Paper"),Lo=h(),Re=o("p"),Vt=o("a"),Ln=l("ControlNet"),Cn=l(` is an auxiliary network which adds an extra condition. | |
| There are 8 canonical pre-trained ControlNets trained on different conditionings such as edge detection, scribbles, | |
| depth maps, and semantic segmentations.`),Co=h(),de=o("p"),Mn=l("See "),Jt=o("a"),Hn=l("here"),Un=l(" for more information on how to use it."),this.h()},l(e){const n=nf('[data-svelte="svelte-1phssyn"]',document.head);d=a(n,"META",{name:!0,content:!0}),n.forEach(t),$=u(e),m=a(e,"H1",{class:!0});var Ve=r(m);g=a(Ve,"A",{id:!0,class:!0,href:!0});var Ni=r(g);k=a(Ni,"SPAN",{});var Kn=r(k);_(y.$$.fragment,Kn),Kn.forEach(t),Ni.forEach(t),Ke=u(Ve),Kt=a(Ve,"SPAN",{});var Qn=r(Kt);ca=f(Qn,"Controlling generation of diffusion models"),Qn.forEach(t),Ve.forEach(t),Gi=u(e),Qe=a(e,"P",{});var Xn=r(Qe);ma=f(Xn,"Controlling outputs generated by diffusion models has been long pursued by the community and is now an active research topic. In many popular diffusion models, subtle changes in inputs, both images and text prompts, can drastically change outputs. In an ideal world we want to be able to control how semantics are preserved and changed."),Xn.forEach(t),qi=u(e),Xe=a(e,"P",{});var Yn=r(Xe);va=f(Yn,"Most examples of preserving semantics reduce to being able to accurately map a change in input to a change in output. I.e. adding an adjective to a subject in a prompt preserves the entire image, only modifying the changed subject. Or, image variation of a particular subject preserves the subject\u2019s pose."),Yn.forEach(t),ji=u(e),Ye=a(e,"P",{});var es=r(Ye);ga=f(es,"Additionally, there are qualities of generated images that we would like to influence beyond semantic preservation. I.e. in general, we would like our outputs to be of good quality, adhere to a particular style, or be realistic."),es.forEach(t),zi=u(e),A=a(e,"P",{});var ce=r(A);wa=f(ce,"We will document some of the techniques "),Qt=a(ce,"CODE",{});var ts=r(Qt);_a=f(ts,"diffusers"),ts.forEach(t),ba=f(ce," supports to control generation of diffusion models. Much is cutting edge research and can be quite nuanced. If something needs clarifying or you have a suggestion, don\u2019t hesitate to open a discussion on the "),me=a(ce,"A",{href:!0,rel:!0});var is=r(me);xa=f(is,"forum"),is.forEach(t),Ea=f(ce," or a "),ve=a(ce,"A",{href:!0,rel:!0});var os=r(ve);Pa=f(os,"GitHub issue"),os.forEach(t),ya=f(ce,"."),ce.forEach(t),Zi=u(e),et=a(e,"P",{});var as=r(et);$a=f(as,"We provide a high level explanation of how the generation can be controlled as well as a snippet of the technicals. For more in depth explanations on the technicals, the original papers which are linked from the pipelines are always the best resources."),as.forEach(t),Li=u(e),tt=a(e,"P",{});var rs=r(tt);Aa=f(rs,"Depending on the use case, one should choose a technique accordingly. In many cases, these techniques can be combined. For example, one can combine Textual Inversion with SEGA to provide more semantic guidance to the outputs generated using Textual Inversion."),rs.forEach(t),Ci=u(e),it=a(e,"P",{});var ns=r(it);Sa=f(ns,"Unless otherwise mentioned, these are techniques that work with existing models and don\u2019t require their own weights."),ns.forEach(t),Mi=u(e),c=a(e,"OL",{});var v=r(c);Xt=a(v,"LI",{});var ss=r(Xt);ot=a(ss,"A",{href:!0});var ls=r(ot);ka=f(ls,"Instruct Pix2Pix"),ls.forEach(t),ss.forEach(t),Ia=u(v),Yt=a(v,"LI",{});var fs=r(Yt);at=a(fs,"A",{href:!0});var ps=r(at);Ta=f(ps,"Pix2Pix Zero"),ps.forEach(t),fs.forEach(t),Na=u(v),ei=a(v,"LI",{});var hs=r(ei);rt=a(hs,"A",{href:!0});var us=r(rt);Da=f(us,"Attend and Excite"),us.forEach(t),hs.forEach(t),Ga=u(v),ti=a(v,"LI",{});var ds=r(ti);nt=a(ds,"A",{href:!0});var cs=r(nt);qa=f(cs,"Semantic Guidance"),cs.forEach(t),ds.forEach(t),ja=u(v),ii=a(v,"LI",{});var ms=r(ii);st=a(ms,"A",{href:!0});var vs=r(st);za=f(vs,"Self-attention Guidance"),vs.forEach(t),ms.forEach(t),Za=u(v),oi=a(v,"LI",{});var gs=r(oi);lt=a(gs,"A",{href:!0});var ws=r(lt);La=f(ws,"Depth2Image"),ws.forEach(t),gs.forEach(t),Ca=u(v),ai=a(v,"LI",{});var _s=r(ai);ft=a(_s,"A",{href:!0});var bs=r(ft);Ma=f(bs,"MultiDiffusion Panorama"),bs.forEach(t),_s.forEach(t),Ha=u(v),ri=a(v,"LI",{});var xs=r(ri);pt=a(xs,"A",{href:!0});var Es=r(pt);Ua=f(Es,"DreamBooth"),Es.forEach(t),xs.forEach(t),Fa=u(v),ni=a(v,"LI",{});var Ps=r(ni);ht=a(Ps,"A",{href:!0});var ys=r(ht);Ba=f(ys,"Textual Inversion"),ys.forEach(t),Ps.forEach(t),Oa=u(v),si=a(v,"LI",{});var $s=r(si);ut=a($s,"A",{href:!0});var As=r(ut);Wa=f(As,"ControlNet"),As.forEach(t),$s.forEach(t),v.forEach(t),Hi=u(e),I=a(e,"H2",{class:!0});var Ho=r(I);H=a(Ho,"A",{id:!0,class:!0,href:!0});var Ss=r(H);li=a(Ss,"SPAN",{});var ks=r(li);_(ge.$$.fragment,ks),ks.forEach(t),Ss.forEach(t),Ra=u(Ho),fi=a(Ho,"SPAN",{});var Is=r(fi);Va=f(Is,"Instruct Pix2Pix"),Is.forEach(t),Ho.forEach(t),Ui=u(e),dt=a(e,"P",{});var Ts=r(dt);we=a(Ts,"A",{href:!0,rel:!0});var Ns=r(we);Ja=f(Ns,"Paper"),Ns.forEach(t),Ts.forEach(t),Fi=u(e),T=a(e,"P",{});var Di=r(T);ct=a(Di,"A",{href:!0});var Ds=r(ct);Ka=f(Ds,"Instruct Pix2Pix"),Ds.forEach(t),Qa=f(Di,` is fine-tuned from stable diffusion to support editing input images. It takes as inputs an image and a prompt describing an edit, and it outputs the edited image. | |
| Instruct Pix2Pix has been explicitly trained to work well with `),_e=a(Di,"A",{href:!0,rel:!0});var Gs=r(_e);Xa=f(Gs,"InstructGPT"),Gs.forEach(t),Ya=f(Di,"-like prompts."),Di.forEach(t),Bi=u(e),U=a(e,"P",{});var Uo=r(U);er=f(Uo,"See "),mt=a(Uo,"A",{href:!0});var qs=r(mt);tr=f(qs,"here"),qs.forEach(t),ir=f(Uo," for more information on how to use it."),Uo.forEach(t),Oi=u(e),N=a(e,"H2",{class:!0});var Fo=r(N);F=a(Fo,"A",{id:!0,class:!0,href:!0});var js=r(F);pi=a(js,"SPAN",{});var zs=r(pi);_(be.$$.fragment,zs),zs.forEach(t),js.forEach(t),or=u(Fo),hi=a(Fo,"SPAN",{});var Zs=r(hi);ar=f(Zs,"Pix2Pix Zero"),Zs.forEach(t),Fo.forEach(t),Wi=u(e),vt=a(e,"P",{});var Ls=r(vt);xe=a(Ls,"A",{href:!0,rel:!0});var Cs=r(xe);rr=f(Cs,"Paper"),Cs.forEach(t),Ls.forEach(t),Ri=u(e),Ee=a(e,"P",{});var Fn=r(Ee);gt=a(Fn,"A",{href:!0});var Ms=r(gt);nr=f(Ms,"Pix2Pix Zero"),Ms.forEach(t),sr=f(Fn," allows modifying an image so that one concept or subject is translated to another one while preserving general image semantics."),Fn.forEach(t),Vi=u(e),wt=a(e,"P",{});var Hs=r(wt);lr=f(Hs,"The denoising process is guided from one conceptual embedding towards another conceptual embedding. The intermediate latents are optimized during the denoising process to push the attention maps towards reference attention maps. The reference attention maps are from the denoising process of the input image and are used to encourage semantic preservation."),Hs.forEach(t),Ji=u(e),_t=a(e,"P",{});var Us=r(_t);fr=f(Us,"Pix2Pix Zero can be used both to edit synthetic images as well as real images."),Us.forEach(t),Ki=u(e),B=a(e,"UL",{});var Bo=r(B);Pe=a(Bo,"LI",{});var Oo=r(Pe);pr=f(Oo,`To edit synthetic images, one first generates an image given a caption. | |
| Next, we generate image captions for the concept that shall be edited and for the new target concept. We can use a model like `),ye=a(Oo,"A",{href:!0,rel:!0});var Fs=r(ye);hr=f(Fs,"Flan-T5"),Fs.forEach(t),ur=f(Oo," for this purpose. Then, \u201Cmean\u201D prompt embeddings for both the source and target concepts are created via the text encoder. Finally, the pix2pix-zero algorithm is used to edit the synthetic image."),Oo.forEach(t),dr=u(Bo),$e=a(Bo,"LI",{});var Wo=r($e);cr=f(Wo,"To edit a real image, one first generates an image caption using a model like "),Ae=a(Wo,"A",{href:!0,rel:!0});var Bs=r(Ae);mr=f(Bs,"BLIP"),Bs.forEach(t),vr=f(Wo,". Then one applies ddim inversion on the prompt and image to generate \u201Cinverse\u201D latents. Similar to before, \u201Cmean\u201D prompt embeddings for both source and target concepts are created and finally the pix2pix-zero algorithm in combination with the \u201Cinverse\u201D latents is used to edit the image."),Wo.forEach(t),Bo.forEach(t),Qi=u(e),_(O.$$.fragment,e),Xi=u(e),W=a(e,"P",{});var Ro=r(W);gr=f(Ro,`As mentioned above, Pix2Pix Zero includes optimizing the latents (and not any of the UNet, VAE, or the text encoder) to steer the generation toward a specific concept. This means that the overall | |
| pipeline might require more memory than a standard `),bt=a(Ro,"A",{href:!0});var Os=r(bt);wr=f(Os,"StableDiffusionPipeline"),Os.forEach(t),_r=f(Ro,"."),Ro.forEach(t),Yi=u(e),R=a(e,"P",{});var Vo=r(R);br=f(Vo,"See "),xt=a(Vo,"A",{href:!0});var Ws=r(xt);xr=f(Ws,"here"),Ws.forEach(t),Er=f(Vo," for more information on how to use it."),Vo.forEach(t),eo=u(e),D=a(e,"H2",{class:!0});var Jo=r(D);V=a(Jo,"A",{id:!0,class:!0,href:!0});var Rs=r(V);ui=a(Rs,"SPAN",{});var Vs=r(ui);_(Se.$$.fragment,Vs),Vs.forEach(t),Rs.forEach(t),Pr=u(Jo),di=a(Jo,"SPAN",{});var Js=r(di);yr=f(Js,"Attend and Excite"),Js.forEach(t),Jo.forEach(t),to=u(e),Et=a(e,"P",{});var Ks=r(Et);ke=a(Ks,"A",{href:!0,rel:!0});var Qs=r(ke);$r=f(Qs,"Paper"),Qs.forEach(t),Ks.forEach(t),io=u(e),Ie=a(e,"P",{});var Bn=r(Ie);Pt=a(Bn,"A",{href:!0});var Xs=r(Pt);Ar=f(Xs,"Attend and Excite"),Xs.forEach(t),Sr=f(Bn," allows subjects in the prompt to be faithfully represented in the final image."),Bn.forEach(t),oo=u(e),yt=a(e,"P",{});var Ys=r(yt);kr=f(Ys,"A set of token indices are given as input, corresponding to the subjects in the prompt that need to be present in the image. During denoising, each token index is guaranteed to have a minimum attention threshold for at least one patch of the image. The intermediate latents are iteratively optimized during the denoising process to strengthen the attention of the most neglected subject token until the attention threshold is passed for all subject tokens."),Ys.forEach(t),ao=u(e),J=a(e,"P",{});var Ko=r(J);Ir=f(Ko,"Like Pix2Pix Zero, Attend and Excite also involves a mini optimization loop (leaving the pre-trained weights untouched) in its pipeline and can require more memory than the usual "),ci=a(Ko,"CODE",{});var el=r(ci);Tr=f(el,"StableDiffusionPipeline"),el.forEach(t),Nr=f(Ko,"."),Ko.forEach(t),ro=u(e),K=a(e,"P",{});var Qo=r(K);Dr=f(Qo,"See "),$t=a(Qo,"A",{href:!0});var tl=r($t);Gr=f(tl,"here"),tl.forEach(t),qr=f(Qo," for more information on how to use it."),Qo.forEach(t),no=u(e),G=a(e,"H2",{class:!0});var Xo=r(G);Q=a(Xo,"A",{id:!0,class:!0,href:!0});var il=r(Q);mi=a(il,"SPAN",{});var ol=r(mi);_(Te.$$.fragment,ol),ol.forEach(t),il.forEach(t),jr=u(Xo),vi=a(Xo,"SPAN",{});var al=r(vi);zr=f(al,"Semantic Guidance (SEGA)"),al.forEach(t),Xo.forEach(t),so=u(e),At=a(e,"P",{});var rl=r(At);Ne=a(rl,"A",{href:!0,rel:!0});var nl=r(Ne);Zr=f(nl,"Paper"),nl.forEach(t),rl.forEach(t),lo=u(e),St=a(e,"P",{});var sl=r(St);Lr=f(sl,"SEGA allows applying or removing one or more concepts from an image. The strength of the concept can also be controlled. I.e. the smile concept can be used to incrementally increase or decrease the smile of a portrait."),sl.forEach(t),fo=u(e),kt=a(e,"P",{});var ll=r(kt);Cr=f(ll,"Similar to how classifier free guidance provides guidance via empty prompt inputs, SEGA provides guidance on conceptual prompts. Multiple of these conceptual prompts can be applied simultaneously. Each conceptual prompt can either add or remove their concept depending on if the guidance is applied positively or negatively."),ll.forEach(t),po=u(e),It=a(e,"P",{});var fl=r(It);Mr=f(fl,"Unlike Pix2Pix Zero or Attend and Excite, SEGA directly interacts with the diffusion process instead of performing any explicit gradient-based optimization."),fl.forEach(t),ho=u(e),X=a(e,"P",{});var Yo=r(X);Hr=f(Yo,"See "),Tt=a(Yo,"A",{href:!0});var pl=r(Tt);Ur=f(pl,"here"),pl.forEach(t),Fr=f(Yo," for more information on how to use it."),Yo.forEach(t),uo=u(e),q=a(e,"H2",{class:!0});var ea=r(q);Y=a(ea,"A",{id:!0,class:!0,href:!0});var hl=r(Y);gi=a(hl,"SPAN",{});var ul=r(gi);_(De.$$.fragment,ul),ul.forEach(t),hl.forEach(t),Br=u(ea),wi=a(ea,"SPAN",{});var dl=r(wi);Or=f(dl,"Self-attention Guidance (SAG)"),dl.forEach(t),ea.forEach(t),co=u(e),Nt=a(e,"P",{});var cl=r(Nt);Ge=a(cl,"A",{href:!0,rel:!0});var ml=r(Ge);Wr=f(ml,"Paper"),ml.forEach(t),cl.forEach(t),mo=u(e),qe=a(e,"P",{});var On=r(qe);Dt=a(On,"A",{href:!0});var vl=r(Dt);Rr=f(vl,"Self-attention Guidance"),vl.forEach(t),Vr=f(On," improves the general quality of images."),On.forEach(t),vo=u(e),Gt=a(e,"P",{});var gl=r(Gt);Jr=f(gl,"SAG provides guidance from predictions not conditioned on high-frequency details to fully conditioned images. The high frequency details are extracted out of the UNet self-attention maps."),gl.forEach(t),go=u(e),ee=a(e,"P",{});var ta=r(ee);Kr=f(ta,"See "),qt=a(ta,"A",{href:!0});var wl=r(qt);Qr=f(wl,"here"),wl.forEach(t),Xr=f(ta," for more information on how to use it."),ta.forEach(t),wo=u(e),j=a(e,"H2",{class:!0});var ia=r(j);te=a(ia,"A",{id:!0,class:!0,href:!0});var _l=r(te);_i=a(_l,"SPAN",{});var bl=r(_i);_(je.$$.fragment,bl),bl.forEach(t),_l.forEach(t),Yr=u(ia),bi=a(ia,"SPAN",{});var xl=r(bi);en=f(xl,"Depth2Image"),xl.forEach(t),ia.forEach(t),_o=u(e),jt=a(e,"P",{});var El=r(jt);ze=a(El,"A",{href:!0,rel:!0});var Pl=r(ze);tn=f(Pl,"Project"),Pl.forEach(t),El.forEach(t),bo=u(e),Ze=a(e,"P",{});var Wn=r(Ze);zt=a(Wn,"A",{href:!0});var yl=r(zt);on=f(yl,"Depth2Image"),yl.forEach(t),an=f(Wn," is fine-tuned from Stable Diffusion to better preserve semantics for text guided image variation."),Wn.forEach(t),xo=u(e),Zt=a(e,"P",{});var $l=r(Zt);rn=f($l,"It conditions on a monocular depth estimate of the original image."),$l.forEach(t),Eo=u(e),ie=a(e,"P",{});var oa=r(ie);nn=f(oa,"See "),Lt=a(oa,"A",{href:!0});var Al=r(Lt);sn=f(Al,"here"),Al.forEach(t),ln=f(oa," for more information on how to use it."),oa.forEach(t),Po=u(e),_(oe.$$.fragment,e),yo=u(e),z=a(e,"H2",{class:!0});var aa=r(z);ae=a(aa,"A",{id:!0,class:!0,href:!0});var Sl=r(ae);xi=a(Sl,"SPAN",{});var kl=r(xi);_(Le.$$.fragment,kl),kl.forEach(t),Sl.forEach(t),fn=u(aa),Ei=a(aa,"SPAN",{});var Il=r(Ei);pn=f(Il,"MultiDiffusion Panorama"),Il.forEach(t),aa.forEach(t),$o=u(e),Ct=a(e,"P",{});var Tl=r(Ct);Ce=a(Tl,"A",{href:!0,rel:!0});var Nl=r(Ce);hn=f(Nl,"Paper"),Nl.forEach(t),Tl.forEach(t),Ao=u(e),re=a(e,"P",{});var ra=r(re);un=f(ra,`MultiDiffusion defines a new generation process over a pre-trained diffusion model. This process binds together multiple diffusion generation methods that can be readily applied to generate high quality and diverse images. Results adhere to user-provided controls, such as desired aspect ratio (e.g., panorama), and spatial guiding signals, ranging from tight segmentation masks to bounding boxes. | |
| `),Mt=a(ra,"A",{href:!0});var Dl=r(Mt);dn=f(Dl,"MultiDiffusion Panorama"),Dl.forEach(t),cn=f(ra," allows to generate high-quality images at arbitrary aspect ratios (e.g., panoramas)."),ra.forEach(t),So=u(e),ne=a(e,"P",{});var na=r(ne);mn=f(na,"See "),Ht=a(na,"A",{href:!0});var Gl=r(Ht);vn=f(Gl,"here"),Gl.forEach(t),gn=f(na," for more information on how to use it to generate panoramic images."),na.forEach(t),ko=u(e),Z=a(e,"H2",{class:!0});var sa=r(Z);se=a(sa,"A",{id:!0,class:!0,href:!0});var ql=r(se);Pi=a(ql,"SPAN",{});var jl=r(Pi);_(Me.$$.fragment,jl),jl.forEach(t),ql.forEach(t),wn=u(sa),yi=a(sa,"SPAN",{});var zl=r(yi);_n=f(zl,"Fine-tuning your own models"),zl.forEach(t),sa.forEach(t),Io=u(e),Ut=a(e,"P",{});var Zl=r(Ut);bn=f(Zl,"In addition to pre-trained models, Diffusers has training scripts for fine-tuning models on user-provided data."),Zl.forEach(t),To=u(e),L=a(e,"H3",{class:!0});var la=r(L);le=a(la,"A",{id:!0,class:!0,href:!0});var Ll=r(le);$i=a(Ll,"SPAN",{});var Cl=r($i);_(He.$$.fragment,Cl),Cl.forEach(t),Ll.forEach(t),xn=u(la),Ai=a(la,"SPAN",{});var Ml=r(Ai);En=f(Ml,"DreamBooth"),Ml.forEach(t),la.forEach(t),No=u(e),Ue=a(e,"P",{});var Rn=r(Ue);Ft=a(Rn,"A",{href:!0});var Hl=r(Ft);Pn=f(Hl,"DreamBooth"),Hl.forEach(t),yn=f(Rn," fine-tunes a model to teach it about a new subject. I.e. a few pictures of a person can be used to generate images of that person in different styles."),Rn.forEach(t),Do=u(e),fe=a(e,"P",{});var fa=r(fe);$n=f(fa,"See "),Bt=a(fa,"A",{href:!0});var Ul=r(Bt);An=f(Ul,"here"),Ul.forEach(t),Sn=f(fa," for more information on how to use it."),fa.forEach(t),Go=u(e),C=a(e,"H3",{class:!0});var pa=r(C);pe=a(pa,"A",{id:!0,class:!0,href:!0});var Fl=r(pe);Si=a(Fl,"SPAN",{});var Bl=r(Si);_(Fe.$$.fragment,Bl),Bl.forEach(t),Fl.forEach(t),kn=u(pa),ki=a(pa,"SPAN",{});var Ol=r(ki);In=f(Ol,"Textual Inversion"),Ol.forEach(t),pa.forEach(t),qo=u(e),Be=a(e,"P",{});var Vn=r(Be);Ot=a(Vn,"A",{href:!0});var Wl=r(Ot);Tn=f(Wl,"Textual Inversion"),Wl.forEach(t),Nn=f(Vn," fine-tunes a model to teach it about a new concept. I.e. a few pictures of a style of artwork can be used to generate images in that style."),Vn.forEach(t),jo=u(e),he=a(e,"P",{});var ha=r(he);Dn=f(ha,"See "),Wt=a(ha,"A",{href:!0});var Rl=r(Wt);Gn=f(Rl,"here"),Rl.forEach(t),qn=f(ha," for more information on how to use it."),ha.forEach(t),zo=u(e),M=a(e,"H2",{class:!0});var ua=r(M);ue=a(ua,"A",{id:!0,class:!0,href:!0});var Vl=r(ue);Ii=a(Vl,"SPAN",{});var Jl=r(Ii);_(Oe.$$.fragment,Jl),Jl.forEach(t),Vl.forEach(t),jn=u(ua),Ti=a(ua,"SPAN",{});var Kl=r(Ti);zn=f(Kl,"ControlNet"),Kl.forEach(t),ua.forEach(t),Zo=u(e),Rt=a(e,"P",{});var Ql=r(Rt);We=a(Ql,"A",{href:!0,rel:!0});var Xl=r(We);Zn=f(Xl,"Paper"),Xl.forEach(t),Ql.forEach(t),Lo=u(e),Re=a(e,"P",{});var Jn=r(Re);Vt=a(Jn,"A",{href:!0});var Yl=r(Vt);Ln=f(Yl,"ControlNet"),Yl.forEach(t),Cn=f(Jn,` is an auxiliary network which adds an extra condition. | |
| There are 8 canonical pre-trained ControlNets trained on different conditionings such as edge detection, scribbles, | |
| depth maps, and semantic segmentations.`),Jn.forEach(t),Co=u(e),de=a(e,"P",{});var da=r(de);Mn=f(da,"See "),Jt=a(da,"A",{href:!0});var ef=r(Jt);Hn=f(ef,"here"),ef.forEach(t),Un=f(da," for more information on how to use it."),da.forEach(t),this.h()},h(){p(d,"name","hf:doc:metadata"),p(d,"content",JSON.stringify(hf)),p(g,"id","controlling-generation-of-diffusion-models"),p(g,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(g,"href","#controlling-generation-of-diffusion-models"),p(m,"class","relative group"),p(me,"href","https://discuss.huggingface.co/"),p(me,"rel","nofollow"),p(ve,"href","https://github.com/huggingface/diffusers/issues"),p(ve,"rel","nofollow"),p(ot,"href","#instruct-pix2pix"),p(at,"href","#pix2pixzero"),p(rt,"href","#attend-and-excite"),p(nt,"href","#semantic-guidance"),p(st,"href","#self-attention-guidance"),p(lt,"href","#depth2image"),p(ft,"href","#multidiffusion-panorama"),p(pt,"href","#dreambooth"),p(ht,"href","#textual-inversion"),p(ut,"href","#controlnet"),p(H,"id","instruct-pix2pix"),p(H,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(H,"href","#instruct-pix2pix"),p(I,"class","relative group"),p(we,"href","https://arxiv.org/abs/2211.09800"),p(we,"rel","nofollow"),p(ct,"href","../api/pipelines/stable_diffusion/pix2pix"),p(_e,"href","https://openai.com/blog/instruction-following/"),p(_e,"rel","nofollow"),p(mt,"href","../api/pipelines/stable_diffusion/pix2pix"),p(F,"id","pix2pix-zero"),p(F,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(F,"href","#pix2pix-zero"),p(N,"class","relative group"),p(xe,"href","https://arxiv.org/abs/2302.03027"),p(xe,"rel","nofollow"),p(gt,"href","../api/pipelines/stable_diffusion/pix2pix_zero"),p(ye,"href","https://huggingface.co/docs/transformers/model_doc/flan-t5"),p(ye,"rel","nofollow"),p(Ae,"href","https://huggingface.co/docs/transformers/model_doc/blip"),p(Ae,"rel","nofollow"),p(bt,"href","../api/pipelines/stable_diffusion/text2img"),p(xt,"href","../api/pipelines/stable_diffusion/pix2pix_zero"),p(V,"id","attend-and-excite"),p(V,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(V,"href","#attend-and-excite"),p(D,"class","relative group"),p(ke,"href","https://arxiv.org/abs/2301.13826"),p(ke,"rel","nofollow"),p(Pt,"href","../api/pipelines/stable_diffusion/attend_and_excite"),p($t,"href","../api/pipelines/stable_diffusion/attend_and_excite"),p(Q,"id","semantic-guidance-sega"),p(Q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Q,"href","#semantic-guidance-sega"),p(G,"class","relative group"),p(Ne,"href","https://arxiv.org/abs/2301.12247"),p(Ne,"rel","nofollow"),p(Tt,"href","../api/pipelines/semantic_stable_diffusion"),p(Y,"id","selfattention-guidance-sag"),p(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Y,"href","#selfattention-guidance-sag"),p(q,"class","relative group"),p(Ge,"href","https://arxiv.org/abs/2210.00939"),p(Ge,"rel","nofollow"),p(Dt,"href","../api/pipelines/stable_diffusion/self_attention_guidance"),p(qt,"href","../api/pipelines/stable_diffusion/self_attention_guidance"),p(te,"id","depth2image"),p(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(te,"href","#depth2image"),p(j,"class","relative group"),p(ze,"href","https://huggingface.co/stabilityai/stable-diffusion-2-depth"),p(ze,"rel","nofollow"),p(zt,"href","../pipelines/stable_diffusion_2#depthtoimage"),p(Lt,"href","../api/pipelines/stable_diffusion_2#depthtoimage"),p(ae,"id","multidiffusion-panorama"),p(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(ae,"href","#multidiffusion-panorama"),p(z,"class","relative group"),p(Ce,"href","https://arxiv.org/abs/2302.08113"),p(Ce,"rel","nofollow"),p(Mt,"href","../api/pipelines/stable_diffusion/panorama"),p(Ht,"href","../api/pipelines/stable_diffusion/panorama"),p(se,"id","finetuning-your-own-models"),p(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(se,"href","#finetuning-your-own-models"),p(Z,"class","relative group"),p(le,"id","dreambooth"),p(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(le,"href","#dreambooth"),p(L,"class","relative group"),p(Ft,"href","../training/dreambooth"),p(Bt,"href","../training/dreambooth"),p(pe,"id","textual-inversion"),p(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(pe,"href","#textual-inversion"),p(C,"class","relative group"),p(Ot,"href","../training/text_inversion"),p(Wt,"href","../training/text_inversion"),p(ue,"id","controlnet"),p(ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(ue,"href","#controlnet"),p(M,"class","relative group"),p(We,"href","https://arxiv.org/abs/2302.05543"),p(We,"rel","nofollow"),p(Vt,"href","../api/pipelines/stable_diffusion/controlnet"),p(Jt,"href","../api/pipelines/stable_diffusion/controlnet")},m(e,n){i(document.head,d),s(e,$,n),s(e,m,n),i(m,g),i(g,k),b(y,k,null),i(m,Ke),i(m,Kt),i(Kt,ca),s(e,Gi,n),s(e,Qe,n),i(Qe,ma),s(e,qi,n),s(e,Xe,n),i(Xe,va),s(e,ji,n),s(e,Ye,n),i(Ye,ga),s(e,zi,n),s(e,A,n),i(A,wa),i(A,Qt),i(Qt,_a),i(A,ba),i(A,me),i(me,xa),i(A,Ea),i(A,ve),i(ve,Pa),i(A,ya),s(e,Zi,n),s(e,et,n),i(et,$a),s(e,Li,n),s(e,tt,n),i(tt,Aa),s(e,Ci,n),s(e,it,n),i(it,Sa),s(e,Mi,n),s(e,c,n),i(c,Xt),i(Xt,ot),i(ot,ka),i(c,Ia),i(c,Yt),i(Yt,at),i(at,Ta),i(c,Na),i(c,ei),i(ei,rt),i(rt,Da),i(c,Ga),i(c,ti),i(ti,nt),i(nt,qa),i(c,ja),i(c,ii),i(ii,st),i(st,za),i(c,Za),i(c,oi),i(oi,lt),i(lt,La),i(c,Ca),i(c,ai),i(ai,ft),i(ft,Ma),i(c,Ha),i(c,ri),i(ri,pt),i(pt,Ua),i(c,Fa),i(c,ni),i(ni,ht),i(ht,Ba),i(c,Oa),i(c,si),i(si,ut),i(ut,Wa),s(e,Hi,n),s(e,I,n),i(I,H),i(H,li),b(ge,li,null),i(I,Ra),i(I,fi),i(fi,Va),s(e,Ui,n),s(e,dt,n),i(dt,we),i(we,Ja),s(e,Fi,n),s(e,T,n),i(T,ct),i(ct,Ka),i(T,Qa),i(T,_e),i(_e,Xa),i(T,Ya),s(e,Bi,n),s(e,U,n),i(U,er),i(U,mt),i(mt,tr),i(U,ir),s(e,Oi,n),s(e,N,n),i(N,F),i(F,pi),b(be,pi,null),i(N,or),i(N,hi),i(hi,ar),s(e,Wi,n),s(e,vt,n),i(vt,xe),i(xe,rr),s(e,Ri,n),s(e,Ee,n),i(Ee,gt),i(gt,nr),i(Ee,sr),s(e,Vi,n),s(e,wt,n),i(wt,lr),s(e,Ji,n),s(e,_t,n),i(_t,fr),s(e,Ki,n),s(e,B,n),i(B,Pe),i(Pe,pr),i(Pe,ye),i(ye,hr),i(Pe,ur),i(B,dr),i(B,$e),i($e,cr),i($e,Ae),i(Ae,mr),i($e,vr),s(e,Qi,n),b(O,e,n),s(e,Xi,n),s(e,W,n),i(W,gr),i(W,bt),i(bt,wr),i(W,_r),s(e,Yi,n),s(e,R,n),i(R,br),i(R,xt),i(xt,xr),i(R,Er),s(e,eo,n),s(e,D,n),i(D,V),i(V,ui),b(Se,ui,null),i(D,Pr),i(D,di),i(di,yr),s(e,to,n),s(e,Et,n),i(Et,ke),i(ke,$r),s(e,io,n),s(e,Ie,n),i(Ie,Pt),i(Pt,Ar),i(Ie,Sr),s(e,oo,n),s(e,yt,n),i(yt,kr),s(e,ao,n),s(e,J,n),i(J,Ir),i(J,ci),i(ci,Tr),i(J,Nr),s(e,ro,n),s(e,K,n),i(K,Dr),i(K,$t),i($t,Gr),i(K,qr),s(e,no,n),s(e,G,n),i(G,Q),i(Q,mi),b(Te,mi,null),i(G,jr),i(G,vi),i(vi,zr),s(e,so,n),s(e,At,n),i(At,Ne),i(Ne,Zr),s(e,lo,n),s(e,St,n),i(St,Lr),s(e,fo,n),s(e,kt,n),i(kt,Cr),s(e,po,n),s(e,It,n),i(It,Mr),s(e,ho,n),s(e,X,n),i(X,Hr),i(X,Tt),i(Tt,Ur),i(X,Fr),s(e,uo,n),s(e,q,n),i(q,Y),i(Y,gi),b(De,gi,null),i(q,Br),i(q,wi),i(wi,Or),s(e,co,n),s(e,Nt,n),i(Nt,Ge),i(Ge,Wr),s(e,mo,n),s(e,qe,n),i(qe,Dt),i(Dt,Rr),i(qe,Vr),s(e,vo,n),s(e,Gt,n),i(Gt,Jr),s(e,go,n),s(e,ee,n),i(ee,Kr),i(ee,qt),i(qt,Qr),i(ee,Xr),s(e,wo,n),s(e,j,n),i(j,te),i(te,_i),b(je,_i,null),i(j,Yr),i(j,bi),i(bi,en),s(e,_o,n),s(e,jt,n),i(jt,ze),i(ze,tn),s(e,bo,n),s(e,Ze,n),i(Ze,zt),i(zt,on),i(Ze,an),s(e,xo,n),s(e,Zt,n),i(Zt,rn),s(e,Eo,n),s(e,ie,n),i(ie,nn),i(ie,Lt),i(Lt,sn),i(ie,ln),s(e,Po,n),b(oe,e,n),s(e,yo,n),s(e,z,n),i(z,ae),i(ae,xi),b(Le,xi,null),i(z,fn),i(z,Ei),i(Ei,pn),s(e,$o,n),s(e,Ct,n),i(Ct,Ce),i(Ce,hn),s(e,Ao,n),s(e,re,n),i(re,un),i(re,Mt),i(Mt,dn),i(re,cn),s(e,So,n),s(e,ne,n),i(ne,mn),i(ne,Ht),i(Ht,vn),i(ne,gn),s(e,ko,n),s(e,Z,n),i(Z,se),i(se,Pi),b(Me,Pi,null),i(Z,wn),i(Z,yi),i(yi,_n),s(e,Io,n),s(e,Ut,n),i(Ut,bn),s(e,To,n),s(e,L,n),i(L,le),i(le,$i),b(He,$i,null),i(L,xn),i(L,Ai),i(Ai,En),s(e,No,n),s(e,Ue,n),i(Ue,Ft),i(Ft,Pn),i(Ue,yn),s(e,Do,n),s(e,fe,n),i(fe,$n),i(fe,Bt),i(Bt,An),i(fe,Sn),s(e,Go,n),s(e,C,n),i(C,pe),i(pe,Si),b(Fe,Si,null),i(C,kn),i(C,ki),i(ki,In),s(e,qo,n),s(e,Be,n),i(Be,Ot),i(Ot,Tn),i(Be,Nn),s(e,jo,n),s(e,he,n),i(he,Dn),i(he,Wt),i(Wt,Gn),i(he,qn),s(e,zo,n),s(e,M,n),i(M,ue),i(ue,Ii),b(Oe,Ii,null),i(M,jn),i(M,Ti),i(Ti,zn),s(e,Zo,n),s(e,Rt,n),i(Rt,We),i(We,Zn),s(e,Lo,n),s(e,Re,n),i(Re,Vt),i(Vt,Ln),i(Re,Cn),s(e,Co,n),s(e,de,n),i(de,Mn),i(de,Jt),i(Jt,Hn),i(de,Un),Mo=!0},p(e,[n]){const Ve={};n&2&&(Ve.$$scope={dirty:n,ctx:e}),O.$set(Ve);const Ni={};n&2&&(Ni.$$scope={dirty:n,ctx:e}),oe.$set(Ni)},i(e){Mo||(x(y.$$.fragment,e),x(ge.$$.fragment,e),x(be.$$.fragment,e),x(O.$$.fragment,e),x(Se.$$.fragment,e),x(Te.$$.fragment,e),x(De.$$.fragment,e),x(je.$$.fragment,e),x(oe.$$.fragment,e),x(Le.$$.fragment,e),x(Me.$$.fragment,e),x(He.$$.fragment,e),x(Fe.$$.fragment,e),x(Oe.$$.fragment,e),Mo=!0)},o(e){E(y.$$.fragment,e),E(ge.$$.fragment,e),E(be.$$.fragment,e),E(O.$$.fragment,e),E(Se.$$.fragment,e),E(Te.$$.fragment,e),E(De.$$.fragment,e),E(je.$$.fragment,e),E(oe.$$.fragment,e),E(Le.$$.fragment,e),E(Me.$$.fragment,e),E(He.$$.fragment,e),E(Fe.$$.fragment,e),E(Oe.$$.fragment,e),Mo=!1},d(e){t(d),e&&t($),e&&t(m),P(y),e&&t(Gi),e&&t(Qe),e&&t(qi),e&&t(Xe),e&&t(ji),e&&t(Ye),e&&t(zi),e&&t(A),e&&t(Zi),e&&t(et),e&&t(Li),e&&t(tt),e&&t(Ci),e&&t(it),e&&t(Mi),e&&t(c),e&&t(Hi),e&&t(I),P(ge),e&&t(Ui),e&&t(dt),e&&t(Fi),e&&t(T),e&&t(Bi),e&&t(U),e&&t(Oi),e&&t(N),P(be),e&&t(Wi),e&&t(vt),e&&t(Ri),e&&t(Ee),e&&t(Vi),e&&t(wt),e&&t(Ji),e&&t(_t),e&&t(Ki),e&&t(B),e&&t(Qi),P(O,e),e&&t(Xi),e&&t(W),e&&t(Yi),e&&t(R),e&&t(eo),e&&t(D),P(Se),e&&t(to),e&&t(Et),e&&t(io),e&&t(Ie),e&&t(oo),e&&t(yt),e&&t(ao),e&&t(J),e&&t(ro),e&&t(K),e&&t(no),e&&t(G),P(Te),e&&t(so),e&&t(At),e&&t(lo),e&&t(St),e&&t(fo),e&&t(kt),e&&t(po),e&&t(It),e&&t(ho),e&&t(X),e&&t(uo),e&&t(q),P(De),e&&t(co),e&&t(Nt),e&&t(mo),e&&t(qe),e&&t(vo),e&&t(Gt),e&&t(go),e&&t(ee),e&&t(wo),e&&t(j),P(je),e&&t(_o),e&&t(jt),e&&t(bo),e&&t(Ze),e&&t(xo),e&&t(Zt),e&&t(Eo),e&&t(ie),e&&t(Po),P(oe,e),e&&t(yo),e&&t(z),P(Le),e&&t($o),e&&t(Ct),e&&t(Ao),e&&t(re),e&&t(So),e&&t(ne),e&&t(ko),e&&t(Z),P(Me),e&&t(Io),e&&t(Ut),e&&t(To),e&&t(L),P(He),e&&t(No),e&&t(Ue),e&&t(Do),e&&t(fe),e&&t(Go),e&&t(C),P(Fe),e&&t(qo),e&&t(Be),e&&t(jo),e&&t(he),e&&t(zo),e&&t(M),P(Oe),e&&t(Zo),e&&t(Rt),e&&t(Lo),e&&t(Re),e&&t(Co),e&&t(de)}}}const hf={local:"controlling-generation-of-diffusion-models",sections:[{local:"instruct-pix2pix",title:"Instruct Pix2Pix"},{local:"pix2pix-zero",title:"Pix2Pix Zero"},{local:"attend-and-excite",title:"Attend and Excite"},{local:"semantic-guidance-sega",title:"Semantic Guidance (SEGA)"},{local:"selfattention-guidance-sag",title:"Self-attention Guidance (SAG)"},{local:"depth2image",title:"Depth2Image"},{local:"multidiffusion-panorama",title:"MultiDiffusion Panorama"},{local:"finetuning-your-own-models",sections:[{local:"dreambooth",title:"DreamBooth"},{local:"textual-inversion",title:"Textual Inversion"}],title:"Fine-tuning your own models"},{local:"controlnet",title:"ControlNet"}],title:"Controlling generation of diffusion models"};function uf(Je){return sf(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class vf extends of{constructor(d){super();af(this,d,uf,pf,rf,{})}}export{vf as default,hf as metadata}; | |
Xet Storage Details
- Size:
- 43.7 kB
- Xet hash:
- 301cdef0134d638f95e30a3a38fd10560664126a4b3cacca519cc42e7044a3aa
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.