Buckets:

hf-doc-build/doc / diffusers /v0.20.0 /en /_app /pages /using-diffusers /controlling_generation.mdx-hf-doc-builder.js
rtrm's picture
download
raw
71.1 kB
import{S as yg,i as Ag,s as $g,e as i,k as f,w as _,t as l,M as Tg,c as r,d as a,m as h,a as o,x as w,h as s,b as n,G as e,g as d,y as x,q as b,o as P,B as y,v as Dg}from"../../chunks/vendor-hf-doc-builder.js";import{T as Pg}from"../../chunks/Tip-hf-doc-builder.js";import{I as $}from"../../chunks/IconCopyLink-hf-doc-builder.js";function kg(fa){let g,D,E,A,J;return{c(){g=i("p"),D=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 `),E=i("a"),A=l("here"),J=l("."),this.h()},l(T){g=r(T,"P",{});var O=o(g);D=s(O,`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 `),E=r(O,"A",{href:!0});var ce=o(E);A=s(ce,"here"),ce.forEach(a),J=s(O,"."),O.forEach(a),this.h()},h(){n(E,"href","../api/pipelines/pix2pix_zero#usage-example")},m(T,O){d(T,g,O),e(g,D),e(g,E),e(E,A),e(g,J)},d(T){T&&a(g)}}}function Sg(fa){let g,D;return{c(){g=i("p"),D=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(E){g=r(E,"P",{});var A=o(g);D=s(A,`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.`),A.forEach(a)},m(E,A){d(E,g,A),e(g,D)},d(E){E&&a(g)}}}function Ig(fa){let g,D,E,A,J,T,O,ce,vs,an,ha,gs,rn,pa,Es,on,da,_s,nn,k,ws,Hr,xs,bs,Et,Ps,ys,_t,As,$s,ln,ua,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,Cu,Vo,Ru,El,Ir,ta,Mu,_l,Ve,Lu,Nr,ju,zu,wl,Je,Hu,Gr,Zu,Bu,xl,de,Ye,Jo,aa,Fu,Yo,Wu,bl,qr,ia,Uu,Pl,ra,Cr,Ou,Vu,yl,Ke,Ju,Rr,Yu,Ku,Al,ue,Qe,Ko,oa,Qu,Qo,Xu,$l,Mr,na,ec,Tl,la,Lr,tc,ac,Dl,Xe,ic,jr,rc,oc,kl;return T=new $({}),xt=new $({}),yt=new $({}),we=new Pg({props:{$$slots:{default:[kg]},$$scope:{ctx:fa}}}),It=new $({}),qt=new $({}),Rt=new $({}),jt=new $({}),Ne=new Pg({props:{$$slots:{default:[Sg]},$$scope:{ctx:fa}}}),Zt=new $({}),Ft=new $({}),Wt=new $({}),Ot=new $({}),Jt=new $({}),Kt=new $({}),Qt=new $({}),ea=new $({}),aa=new $({}),oa=new $({}),{c(){g=i("meta"),D=f(),E=i("h1"),A=i("a"),J=i("span"),_(T.$$.fragment),O=f(),ce=i("span"),vs=l("Controlled generation"),an=f(),ha=i("p"),gs=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."),rn=f(),pa=i("p"),Es=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."),on=f(),da=i("p"),_s=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."),nn=f(),k=i("p"),ws=l("We will document some of the techniques "),Hr=i("code"),xs=l("diffusers"),bs=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 "),Et=i("a"),Ps=l("forum"),ys=l(" or a "),_t=i("a"),As=l("GitHub issue"),$s=l("."),ln=f(),ua=i("p"),Ts=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."),sn=f(),ca=i("p"),Ds=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."),fn=f(),ma=i("p"),ks=l("Unless otherwise mentioned, these are techniques that work with existing models and don\u2019t require their own weights."),hn=f(),u=i("ol"),Zr=i("li"),va=i("a"),Ss=l("Instruct Pix2Pix"),Is=f(),Br=i("li"),ga=i("a"),Ns=l("Pix2Pix Zero"),Gs=f(),Fr=i("li"),Ea=i("a"),qs=l("Attend and Excite"),Cs=f(),Wr=i("li"),_a=i("a"),Rs=l("Semantic Guidance"),Ms=f(),Ur=i("li"),wa=i("a"),Ls=l("Self-attention Guidance"),js=f(),Or=i("li"),xa=i("a"),zs=l("Depth2Image"),Hs=f(),Vr=i("li"),ba=i("a"),Zs=l("MultiDiffusion Panorama"),Bs=f(),Jr=i("li"),Pa=i("a"),Fs=l("DreamBooth"),Ws=f(),Yr=i("li"),ya=i("a"),Us=l("Textual Inversion"),Os=f(),Kr=i("li"),Aa=i("a"),Vs=l("ControlNet"),Js=f(),Qr=i("li"),$a=i("a"),Ys=l("Prompt Weighting"),Ks=f(),Xr=i("li"),Ta=i("a"),Qs=l("Custom Diffusion"),Xs=f(),eo=i("li"),Da=i("a"),ef=l("Model Editing"),tf=f(),to=i("li"),ka=i("a"),af=l("DiffEdit"),rf=f(),ao=i("li"),Sa=i("a"),of=l("T2I-Adapter"),pn=f(),Ia=i("p"),nf=l("For convenience, we provide a table to denote which methods are inference-only and which require fine-tuning/training."),dn=f(),me=i("table"),io=i("thead"),I=i("tr"),Na=i("th"),ro=i("strong"),lf=l("Method"),sf=f(),Ga=i("th"),oo=i("strong"),ff=l("Inference only"),hf=f(),qa=i("th"),wt=i("strong"),pf=l("Requires training /"),df=i("br"),uf=l(" fine-tuning"),cf=f(),Ca=i("th"),no=i("strong"),mf=l("Comments"),vf=f(),c=i("tbody"),N=i("tr"),Ra=i("td"),Ma=i("a"),gf=l("Instruct Pix2Pix"),Ef=f(),La=i("td"),_f=l("\u2705"),wf=f(),ja=i("td"),xf=l("\u274C"),bf=f(),S=i("td"),Pf=l("Can additionally be"),yf=i("br"),Af=l("fine-tuned for better "),$f=i("br"),Tf=l("performance on specific "),Df=i("br"),kf=l("edit instructions."),Sf=f(),G=i("tr"),za=i("td"),Ha=i("a"),If=l("Pix2Pix Zero"),Nf=f(),Za=i("td"),Gf=l("\u2705"),qf=f(),Ba=i("td"),Cf=l("\u274C"),Rf=f(),lo=i("td"),Mf=f(),q=i("tr"),Fa=i("td"),Wa=i("a"),Lf=l("Attend and Excite"),jf=f(),Ua=i("td"),zf=l("\u2705"),Hf=f(),Oa=i("td"),Zf=l("\u274C"),Bf=f(),so=i("td"),Ff=f(),C=i("tr"),Va=i("td"),Ja=i("a"),Wf=l("Semantic Guidance"),Uf=f(),Ya=i("td"),Of=l("\u2705"),Vf=f(),Ka=i("td"),Jf=l("\u274C"),Yf=f(),fo=i("td"),Kf=f(),R=i("tr"),Qa=i("td"),Xa=i("a"),Qf=l("Self-attention Guidance"),Xf=f(),ei=i("td"),eh=l("\u2705"),th=f(),ti=i("td"),ah=l("\u274C"),ih=f(),ho=i("td"),rh=f(),M=i("tr"),ai=i("td"),ii=i("a"),oh=l("Depth2Image"),nh=f(),ri=i("td"),lh=l("\u2705"),sh=f(),oi=i("td"),fh=l("\u274C"),hh=f(),po=i("td"),ph=f(),L=i("tr"),ni=i("td"),li=i("a"),dh=l("MultiDiffusion Panorama"),uh=f(),si=i("td"),ch=l("\u2705"),mh=f(),fi=i("td"),vh=l("\u274C"),gh=f(),uo=i("td"),Eh=f(),j=i("tr"),hi=i("td"),pi=i("a"),_h=l("DreamBooth"),wh=f(),di=i("td"),xh=l("\u274C"),bh=f(),ui=i("td"),Ph=l("\u2705"),yh=f(),co=i("td"),Ah=f(),z=i("tr"),ci=i("td"),mi=i("a"),$h=l("Textual Inversion"),Th=f(),vi=i("td"),Dh=l("\u274C"),kh=f(),gi=i("td"),Sh=l("\u2705"),Ih=f(),mo=i("td"),Nh=f(),H=i("tr"),Ei=i("td"),_i=i("a"),Gh=l("ControlNet"),qh=f(),wi=i("td"),Ch=l("\u2705"),Rh=f(),xi=i("td"),Mh=l("\u274C"),Lh=f(),V=i("td"),jh=l("A ControlNet can be "),zh=i("br"),Hh=l("trained/fine-tuned on"),Zh=i("br"),Bh=l("a custom conditioning."),Fh=f(),Z=i("tr"),bi=i("td"),Pi=i("a"),Wh=l("Prompt Weighting"),Uh=f(),yi=i("td"),Oh=l("\u2705"),Vh=f(),Ai=i("td"),Jh=l("\u274C"),Yh=f(),vo=i("td"),Kh=f(),B=i("tr"),$i=i("td"),Ti=i("a"),Qh=l("Custom Diffusion"),Xh=f(),Di=i("td"),ep=l("\u274C"),tp=f(),ki=i("td"),ap=l("\u2705"),ip=f(),go=i("td"),rp=f(),F=i("tr"),Si=i("td"),Ii=i("a"),op=l("Model Editing"),np=f(),Ni=i("td"),lp=l("\u2705"),sp=f(),Gi=i("td"),fp=l("\u274C"),hp=f(),Eo=i("td"),pp=f(),W=i("tr"),qi=i("td"),Ci=i("a"),dp=l("DiffEdit"),up=f(),Ri=i("td"),cp=l("\u2705"),mp=f(),Mi=i("td"),vp=l("\u274C"),gp=f(),_o=i("td"),Ep=f(),U=i("tr"),Li=i("td"),ji=i("a"),_p=l("T2I-Adapter"),wp=f(),zi=i("td"),xp=l("\u2705"),bp=f(),Hi=i("td"),Pp=l("\u274C"),yp=f(),wo=i("td"),un=f(),Y=i("h2"),ve=i("a"),xo=i("span"),_(xt.$$.fragment),Ap=f(),bo=i("span"),$p=l("Instruct Pix2Pix"),cn=f(),Zi=i("p"),bt=i("a"),Tp=l("Paper"),mn=f(),K=i("p"),Bi=i("a"),Dp=l("Instruct Pix2Pix"),kp=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 `),Pt=i("a"),Sp=l("InstructGPT"),Ip=l("-like prompts."),vn=f(),ge=i("p"),Np=l("See "),Fi=i("a"),Gp=l("here"),qp=l(" for more information on how to use it."),gn=f(),Q=i("h2"),Ee=i("a"),Po=i("span"),_(yt.$$.fragment),Cp=f(),yo=i("span"),Rp=l("Pix2Pix Zero"),En=f(),Wi=i("p"),At=i("a"),Mp=l("Paper"),_n=f(),$t=i("p"),Ui=i("a"),Lp=l("Pix2Pix Zero"),jp=l(" allows modifying an image so that one concept or subject is translated to another one while preserving general image semantics."),wn=f(),Oi=i("p"),zp=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."),xn=f(),Vi=i("p"),Hp=l("Pix2Pix Zero can be used both to edit synthetic images as well as real images."),bn=f(),_e=i("ul"),Tt=i("li"),Zp=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 `),Dt=i("a"),Bp=l("Flan-T5"),Fp=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."),Wp=f(),kt=i("li"),Up=l("To edit a real image, one first generates an image caption using a model like "),St=i("a"),Op=l("BLIP"),Vp=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."),Pn=f(),_(we.$$.fragment),yn=f(),xe=i("p"),Jp=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 `),Ji=i("a"),Yp=l("StableDiffusionPipeline"),Kp=l("."),An=f(),be=i("p"),Qp=l("See "),Yi=i("a"),Xp=l("here"),ed=l(" for more information on how to use it."),$n=f(),X=i("h2"),Pe=i("a"),Ao=i("span"),_(It.$$.fragment),td=f(),$o=i("span"),ad=l("Attend and Excite"),Tn=f(),Ki=i("p"),Nt=i("a"),id=l("Paper"),Dn=f(),Gt=i("p"),Qi=i("a"),rd=l("Attend and Excite"),od=l(" allows subjects in the prompt to be faithfully represented in the final image."),kn=f(),Xi=i("p"),nd=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."),Sn=f(),ye=i("p"),ld=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 "),er=i("a"),sd=l("StableDiffusionPipeline"),fd=l("."),In=f(),Ae=i("p"),hd=l("See "),tr=i("a"),pd=l("here"),dd=l(" for more information on how to use it."),Nn=f(),ee=i("h2"),$e=i("a"),To=i("span"),_(qt.$$.fragment),ud=f(),Do=i("span"),cd=l("Semantic Guidance (SEGA)"),Gn=f(),ar=i("p"),Ct=i("a"),md=l("Paper"),qn=f(),ir=i("p"),vd=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."),Cn=f(),rr=i("p"),gd=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."),Rn=f(),or=i("p"),Ed=l("Unlike Pix2Pix Zero or Attend and Excite, SEGA directly interacts with the diffusion process instead of performing any explicit gradient-based optimization."),Mn=f(),Te=i("p"),_d=l("See "),nr=i("a"),wd=l("here"),xd=l(" for more information on how to use it."),Ln=f(),te=i("h2"),De=i("a"),ko=i("span"),_(Rt.$$.fragment),bd=f(),So=i("span"),Pd=l("Self-attention Guidance (SAG)"),jn=f(),lr=i("p"),Mt=i("a"),yd=l("Paper"),zn=f(),Lt=i("p"),sr=i("a"),Ad=l("Self-attention Guidance"),$d=l(" improves the general quality of images."),Hn=f(),fr=i("p"),Td=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."),Zn=f(),ke=i("p"),Dd=l("See "),hr=i("a"),kd=l("here"),Sd=l(" for more information on how to use it."),Bn=f(),ae=i("h2"),Se=i("a"),Io=i("span"),_(jt.$$.fragment),Id=f(),No=i("span"),Nd=l("Depth2Image"),Fn=f(),pr=i("p"),zt=i("a"),Gd=l("Project"),Wn=f(),Ht=i("p"),dr=i("a"),qd=l("Depth2Image"),Cd=l(" is fine-tuned from Stable Diffusion to better preserve semantics for text guided image variation."),Un=f(),ur=i("p"),Rd=l("It conditions on a monocular depth estimate of the original image."),On=f(),Ie=i("p"),Md=l("See "),cr=i("a"),Ld=l("here"),jd=l(" for more information on how to use it."),Vn=f(),_(Ne.$$.fragment),Jn=f(),ie=i("h2"),Ge=i("a"),Go=i("span"),_(Zt.$$.fragment),zd=f(),qo=i("span"),Hd=l("MultiDiffusion Panorama"),Yn=f(),mr=i("p"),Bt=i("a"),Zd=l("Paper"),Kn=f(),qe=i("p"),Bd=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.
`),vr=i("a"),Fd=l("MultiDiffusion Panorama"),Wd=l(" allows to generate high-quality images at arbitrary aspect ratios (e.g., panoramas)."),Qn=f(),Ce=i("p"),Ud=l("See "),gr=i("a"),Od=l("here"),Vd=l(" for more information on how to use it to generate panoramic images."),Xn=f(),re=i("h2"),Re=i("a"),Co=i("span"),_(Ft.$$.fragment),Jd=f(),Ro=i("span"),Yd=l("Fine-tuning your own models"),el=f(),Er=i("p"),Kd=l("In addition to pre-trained models, Diffusers has training scripts for fine-tuning models on user-provided data."),tl=f(),oe=i("h2"),Me=i("a"),Mo=i("span"),_(Wt.$$.fragment),Qd=f(),Lo=i("span"),Xd=l("DreamBooth"),al=f(),Ut=i("p"),_r=i("a"),eu=l("DreamBooth"),tu=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."),il=f(),Le=i("p"),au=l("See "),wr=i("a"),iu=l("here"),ru=l(" for more information on how to use it."),rl=f(),ne=i("h2"),je=i("a"),jo=i("span"),_(Ot.$$.fragment),ou=f(),zo=i("span"),nu=l("Textual Inversion"),ol=f(),Vt=i("p"),xr=i("a"),lu=l("Textual Inversion"),su=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."),nl=f(),ze=i("p"),fu=l("See "),br=i("a"),hu=l("here"),pu=l(" for more information on how to use it."),ll=f(),le=i("h2"),He=i("a"),Ho=i("span"),_(Jt.$$.fragment),du=f(),Zo=i("span"),uu=l("ControlNet"),sl=f(),Pr=i("p"),Yt=i("a"),cu=l("Paper"),fl=f(),se=i("p"),yr=i("a"),mu=l("ControlNet"),vu=l(` is an auxiliary network which adds an extra condition.
`),Ar=i("a"),gu=l("ControlNet"),Eu=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.`),hl=f(),Ze=i("p"),_u=l("See "),$r=i("a"),wu=l("here"),xu=l(" for more information on how to use it."),pl=f(),fe=i("h2"),Be=i("a"),Bo=i("span"),_(Kt.$$.fragment),bu=f(),Fo=i("span"),Pu=l("Prompt Weighting"),dl=f(),Tr=i("p"),yu=l(`Prompt weighting is a simple technique that puts more attention weight on certain parts of the text
input.`),ul=f(),Fe=i("p"),Au=l("For a more in-detail explanation and examples, see "),Dr=i("a"),$u=l("here"),Tu=l("."),cl=f(),he=i("h2"),We=i("a"),Wo=i("span"),_(Qt.$$.fragment),Du=f(),Uo=i("span"),ku=l("Custom Diffusion"),ml=f(),Xt=i("p"),kr=i("a"),Su=l("Custom Diffusion"),Iu=l(` only fine-tunes the cross-attention maps of a pre-trained
text-to-image diffusion model. It also allows for additionally performing textual inversion. It supports
multi-concept training by design. Like DreamBooth and Textual Inversion, Custom Diffusion is also used to
teach a pre-trained text-to-image diffusion model about new concepts to generate outputs involving the
concept(s) of interest.`),vl=f(),Ue=i("p"),Nu=l("For more details, check out our "),Sr=i("a"),Gu=l("official doc"),qu=l("."),gl=f(),pe=i("h2"),Oe=i("a"),Oo=i("span"),_(ea.$$.fragment),Cu=f(),Vo=i("span"),Ru=l("Model Editing"),El=f(),Ir=i("p"),ta=i("a"),Mu=l("Paper"),_l=f(),Ve=i("p"),Lu=l("The "),Nr=i("a"),ju=l("text-to-image model editing pipeline"),zu=l(` helps you mitigate some of the incorrect implicit assumptions a pre-trained text-to-image
diffusion model might make about the subjects present in the input prompt. For example, if you prompt Stable Diffusion to generate images for \u201CA pack of roses\u201D, the roses in the generated images
are more likely to be red. This pipeline helps you change that assumption.`),wl=f(),Je=i("p"),Hu=l("To know more details, check out the "),Gr=i("a"),Zu=l("official doc"),Bu=l("."),xl=f(),de=i("h2"),Ye=i("a"),Jo=i("span"),_(aa.$$.fragment),Fu=f(),Yo=i("span"),Wu=l("DiffEdit"),bl=f(),qr=i("p"),ia=i("a"),Uu=l("Paper"),Pl=f(),ra=i("p"),Cr=i("a"),Ou=l("DiffEdit"),Vu=l(` allows for semantic editing of input images along with
input prompts while preserving the original input images as much as possible.`),yl=f(),Ke=i("p"),Ju=l("To know more details, check out the "),Rr=i("a"),Yu=l("official doc"),Ku=l("."),Al=f(),ue=i("h2"),Qe=i("a"),Ko=i("span"),_(oa.$$.fragment),Qu=f(),Qo=i("span"),Xu=l("T2I-Adapter"),$l=f(),Mr=i("p"),na=i("a"),ec=l("Paper"),Tl=f(),la=i("p"),Lr=i("a"),tc=l("T2I-Adapter"),ac=l(` is an auxiliary network which adds an extra condition.
There are 8 canonical pre-trained adapters trained on different conditionings such as edge detection, sketch,
depth maps, and semantic segmentations.`),Dl=f(),Xe=i("p"),ic=l("See "),jr=i("a"),rc=l("here"),oc=l(" for more information on how to use it."),this.h()},l(t){const p=Tg('[data-svelte="svelte-1phssyn"]',document.head);g=r(p,"META",{name:!0,content:!0}),p.forEach(a),D=h(t),E=r(t,"H1",{class:!0});var sa=o(E);A=r(sa,"A",{id:!0,class:!0,href:!0});var Xo=o(A);J=r(Xo,"SPAN",{});var mc=o(J);w(T.$$.fragment,mc),mc.forEach(a),Xo.forEach(a),O=h(sa),ce=r(sa,"SPAN",{});var vc=o(ce);vs=s(vc,"Controlled generation"),vc.forEach(a),sa.forEach(a),an=h(t),ha=r(t,"P",{});var gc=o(ha);gs=s(gc,"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."),gc.forEach(a),rn=h(t),pa=r(t,"P",{});var Ec=o(pa);Es=s(Ec,"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."),Ec.forEach(a),on=h(t),da=r(t,"P",{});var _c=o(da);_s=s(_c,"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."),_c.forEach(a),nn=h(t),k=r(t,"P",{});var et=o(k);ws=s(et,"We will document some of the techniques "),Hr=r(et,"CODE",{});var wc=o(Hr);xs=s(wc,"diffusers"),wc.forEach(a),bs=s(et," 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 "),Et=r(et,"A",{href:!0,rel:!0});var xc=o(Et);Ps=s(xc,"forum"),xc.forEach(a),ys=s(et," or a "),_t=r(et,"A",{href:!0,rel:!0});var bc=o(_t);As=s(bc,"GitHub issue"),bc.forEach(a),$s=s(et,"."),et.forEach(a),ln=h(t),ua=r(t,"P",{});var Pc=o(ua);Ts=s(Pc,"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."),Pc.forEach(a),sn=h(t),ca=r(t,"P",{});var yc=o(ca);Ds=s(yc,"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."),yc.forEach(a),fn=h(t),ma=r(t,"P",{});var Ac=o(ma);ks=s(Ac,"Unless otherwise mentioned, these are techniques that work with existing models and don\u2019t require their own weights."),Ac.forEach(a),hn=h(t),u=r(t,"OL",{});var m=o(u);Zr=r(m,"LI",{});var $c=o(Zr);va=r($c,"A",{href:!0});var Tc=o(va);Ss=s(Tc,"Instruct Pix2Pix"),Tc.forEach(a),$c.forEach(a),Is=h(m),Br=r(m,"LI",{});var Dc=o(Br);ga=r(Dc,"A",{href:!0});var kc=o(ga);Ns=s(kc,"Pix2Pix Zero"),kc.forEach(a),Dc.forEach(a),Gs=h(m),Fr=r(m,"LI",{});var Sc=o(Fr);Ea=r(Sc,"A",{href:!0});var Ic=o(Ea);qs=s(Ic,"Attend and Excite"),Ic.forEach(a),Sc.forEach(a),Cs=h(m),Wr=r(m,"LI",{});var Nc=o(Wr);_a=r(Nc,"A",{href:!0});var Gc=o(_a);Rs=s(Gc,"Semantic Guidance"),Gc.forEach(a),Nc.forEach(a),Ms=h(m),Ur=r(m,"LI",{});var qc=o(Ur);wa=r(qc,"A",{href:!0});var Cc=o(wa);Ls=s(Cc,"Self-attention Guidance"),Cc.forEach(a),qc.forEach(a),js=h(m),Or=r(m,"LI",{});var Rc=o(Or);xa=r(Rc,"A",{href:!0});var Mc=o(xa);zs=s(Mc,"Depth2Image"),Mc.forEach(a),Rc.forEach(a),Hs=h(m),Vr=r(m,"LI",{});var Lc=o(Vr);ba=r(Lc,"A",{href:!0});var jc=o(ba);Zs=s(jc,"MultiDiffusion Panorama"),jc.forEach(a),Lc.forEach(a),Bs=h(m),Jr=r(m,"LI",{});var zc=o(Jr);Pa=r(zc,"A",{href:!0});var Hc=o(Pa);Fs=s(Hc,"DreamBooth"),Hc.forEach(a),zc.forEach(a),Ws=h(m),Yr=r(m,"LI",{});var Zc=o(Yr);ya=r(Zc,"A",{href:!0});var Bc=o(ya);Us=s(Bc,"Textual Inversion"),Bc.forEach(a),Zc.forEach(a),Os=h(m),Kr=r(m,"LI",{});var Fc=o(Kr);Aa=r(Fc,"A",{href:!0});var Wc=o(Aa);Vs=s(Wc,"ControlNet"),Wc.forEach(a),Fc.forEach(a),Js=h(m),Qr=r(m,"LI",{});var Uc=o(Qr);$a=r(Uc,"A",{href:!0});var Oc=o($a);Ys=s(Oc,"Prompt Weighting"),Oc.forEach(a),Uc.forEach(a),Ks=h(m),Xr=r(m,"LI",{});var Vc=o(Xr);Ta=r(Vc,"A",{href:!0});var Jc=o(Ta);Qs=s(Jc,"Custom Diffusion"),Jc.forEach(a),Vc.forEach(a),Xs=h(m),eo=r(m,"LI",{});var Yc=o(eo);Da=r(Yc,"A",{href:!0});var Kc=o(Da);ef=s(Kc,"Model Editing"),Kc.forEach(a),Yc.forEach(a),tf=h(m),to=r(m,"LI",{});var Qc=o(to);ka=r(Qc,"A",{href:!0});var Xc=o(ka);af=s(Xc,"DiffEdit"),Xc.forEach(a),Qc.forEach(a),rf=h(m),ao=r(m,"LI",{});var em=o(ao);Sa=r(em,"A",{href:!0});var tm=o(Sa);of=s(tm,"T2I-Adapter"),tm.forEach(a),em.forEach(a),m.forEach(a),pn=h(t),Ia=r(t,"P",{});var am=o(Ia);nf=s(am,"For convenience, we provide a table to denote which methods are inference-only and which require fine-tuning/training."),am.forEach(a),dn=h(t),me=r(t,"TABLE",{});var Sl=o(me);io=r(Sl,"THEAD",{});var im=o(io);I=r(im,"TR",{});var tt=o(I);Na=r(tt,"TH",{align:!0});var rm=o(Na);ro=r(rm,"STRONG",{});var om=o(ro);lf=s(om,"Method"),om.forEach(a),rm.forEach(a),sf=h(tt),Ga=r(tt,"TH",{align:!0});var nm=o(Ga);oo=r(nm,"STRONG",{});var lm=o(oo);ff=s(lm,"Inference only"),lm.forEach(a),nm.forEach(a),hf=h(tt),qa=r(tt,"TH",{align:!0});var sm=o(qa);wt=r(sm,"STRONG",{});var Il=o(wt);pf=s(Il,"Requires training /"),df=r(Il,"BR",{}),uf=s(Il," fine-tuning"),Il.forEach(a),sm.forEach(a),cf=h(tt),Ca=r(tt,"TH",{align:!0});var fm=o(Ca);no=r(fm,"STRONG",{});var hm=o(no);mf=s(hm,"Comments"),hm.forEach(a),fm.forEach(a),tt.forEach(a),im.forEach(a),vf=h(Sl),c=r(Sl,"TBODY",{});var v=o(c);N=r(v,"TR",{});var at=o(N);Ra=r(at,"TD",{align:!0});var pm=o(Ra);Ma=r(pm,"A",{href:!0});var dm=o(Ma);gf=s(dm,"Instruct Pix2Pix"),dm.forEach(a),pm.forEach(a),Ef=h(at),La=r(at,"TD",{align:!0});var um=o(La);_f=s(um,"\u2705"),um.forEach(a),wf=h(at),ja=r(at,"TD",{align:!0});var cm=o(ja);xf=s(cm,"\u274C"),cm.forEach(a),bf=h(at),S=r(at,"TD",{align:!0});var it=o(S);Pf=s(it,"Can additionally be"),yf=r(it,"BR",{}),Af=s(it,"fine-tuned for better "),$f=r(it,"BR",{}),Tf=s(it,"performance on specific "),Df=r(it,"BR",{}),kf=s(it,"edit instructions."),it.forEach(a),at.forEach(a),Sf=h(v),G=r(v,"TR",{});var rt=o(G);za=r(rt,"TD",{align:!0});var mm=o(za);Ha=r(mm,"A",{href:!0});var vm=o(Ha);If=s(vm,"Pix2Pix Zero"),vm.forEach(a),mm.forEach(a),Nf=h(rt),Za=r(rt,"TD",{align:!0});var gm=o(Za);Gf=s(gm,"\u2705"),gm.forEach(a),qf=h(rt),Ba=r(rt,"TD",{align:!0});var Em=o(Ba);Cf=s(Em,"\u274C"),Em.forEach(a),Rf=h(rt),lo=r(rt,"TD",{align:!0}),o(lo).forEach(a),rt.forEach(a),Mf=h(v),q=r(v,"TR",{});var ot=o(q);Fa=r(ot,"TD",{align:!0});var _m=o(Fa);Wa=r(_m,"A",{href:!0});var wm=o(Wa);Lf=s(wm,"Attend and Excite"),wm.forEach(a),_m.forEach(a),jf=h(ot),Ua=r(ot,"TD",{align:!0});var xm=o(Ua);zf=s(xm,"\u2705"),xm.forEach(a),Hf=h(ot),Oa=r(ot,"TD",{align:!0});var bm=o(Oa);Zf=s(bm,"\u274C"),bm.forEach(a),Bf=h(ot),so=r(ot,"TD",{align:!0}),o(so).forEach(a),ot.forEach(a),Ff=h(v),C=r(v,"TR",{});var nt=o(C);Va=r(nt,"TD",{align:!0});var Pm=o(Va);Ja=r(Pm,"A",{href:!0});var ym=o(Ja);Wf=s(ym,"Semantic Guidance"),ym.forEach(a),Pm.forEach(a),Uf=h(nt),Ya=r(nt,"TD",{align:!0});var Am=o(Ya);Of=s(Am,"\u2705"),Am.forEach(a),Vf=h(nt),Ka=r(nt,"TD",{align:!0});var $m=o(Ka);Jf=s($m,"\u274C"),$m.forEach(a),Yf=h(nt),fo=r(nt,"TD",{align:!0}),o(fo).forEach(a),nt.forEach(a),Kf=h(v),R=r(v,"TR",{});var lt=o(R);Qa=r(lt,"TD",{align:!0});var Tm=o(Qa);Xa=r(Tm,"A",{href:!0});var Dm=o(Xa);Qf=s(Dm,"Self-attention Guidance"),Dm.forEach(a),Tm.forEach(a),Xf=h(lt),ei=r(lt,"TD",{align:!0});var km=o(ei);eh=s(km,"\u2705"),km.forEach(a),th=h(lt),ti=r(lt,"TD",{align:!0});var Sm=o(ti);ah=s(Sm,"\u274C"),Sm.forEach(a),ih=h(lt),ho=r(lt,"TD",{align:!0}),o(ho).forEach(a),lt.forEach(a),rh=h(v),M=r(v,"TR",{});var st=o(M);ai=r(st,"TD",{align:!0});var Im=o(ai);ii=r(Im,"A",{href:!0});var Nm=o(ii);oh=s(Nm,"Depth2Image"),Nm.forEach(a),Im.forEach(a),nh=h(st),ri=r(st,"TD",{align:!0});var Gm=o(ri);lh=s(Gm,"\u2705"),Gm.forEach(a),sh=h(st),oi=r(st,"TD",{align:!0});var qm=o(oi);fh=s(qm,"\u274C"),qm.forEach(a),hh=h(st),po=r(st,"TD",{align:!0}),o(po).forEach(a),st.forEach(a),ph=h(v),L=r(v,"TR",{});var ft=o(L);ni=r(ft,"TD",{align:!0});var Cm=o(ni);li=r(Cm,"A",{href:!0});var Rm=o(li);dh=s(Rm,"MultiDiffusion Panorama"),Rm.forEach(a),Cm.forEach(a),uh=h(ft),si=r(ft,"TD",{align:!0});var Mm=o(si);ch=s(Mm,"\u2705"),Mm.forEach(a),mh=h(ft),fi=r(ft,"TD",{align:!0});var Lm=o(fi);vh=s(Lm,"\u274C"),Lm.forEach(a),gh=h(ft),uo=r(ft,"TD",{align:!0}),o(uo).forEach(a),ft.forEach(a),Eh=h(v),j=r(v,"TR",{});var ht=o(j);hi=r(ht,"TD",{align:!0});var jm=o(hi);pi=r(jm,"A",{href:!0});var zm=o(pi);_h=s(zm,"DreamBooth"),zm.forEach(a),jm.forEach(a),wh=h(ht),di=r(ht,"TD",{align:!0});var Hm=o(di);xh=s(Hm,"\u274C"),Hm.forEach(a),bh=h(ht),ui=r(ht,"TD",{align:!0});var Zm=o(ui);Ph=s(Zm,"\u2705"),Zm.forEach(a),yh=h(ht),co=r(ht,"TD",{align:!0}),o(co).forEach(a),ht.forEach(a),Ah=h(v),z=r(v,"TR",{});var pt=o(z);ci=r(pt,"TD",{align:!0});var Bm=o(ci);mi=r(Bm,"A",{href:!0});var Fm=o(mi);$h=s(Fm,"Textual Inversion"),Fm.forEach(a),Bm.forEach(a),Th=h(pt),vi=r(pt,"TD",{align:!0});var Wm=o(vi);Dh=s(Wm,"\u274C"),Wm.forEach(a),kh=h(pt),gi=r(pt,"TD",{align:!0});var Um=o(gi);Sh=s(Um,"\u2705"),Um.forEach(a),Ih=h(pt),mo=r(pt,"TD",{align:!0}),o(mo).forEach(a),pt.forEach(a),Nh=h(v),H=r(v,"TR",{});var dt=o(H);Ei=r(dt,"TD",{align:!0});var Om=o(Ei);_i=r(Om,"A",{href:!0});var Vm=o(_i);Gh=s(Vm,"ControlNet"),Vm.forEach(a),Om.forEach(a),qh=h(dt),wi=r(dt,"TD",{align:!0});var Jm=o(wi);Ch=s(Jm,"\u2705"),Jm.forEach(a),Rh=h(dt),xi=r(dt,"TD",{align:!0});var Ym=o(xi);Mh=s(Ym,"\u274C"),Ym.forEach(a),Lh=h(dt),V=r(dt,"TD",{align:!0});var zr=o(V);jh=s(zr,"A ControlNet can be "),zh=r(zr,"BR",{}),Hh=s(zr,"trained/fine-tuned on"),Zh=r(zr,"BR",{}),Bh=s(zr,"a custom conditioning."),zr.forEach(a),dt.forEach(a),Fh=h(v),Z=r(v,"TR",{});var ut=o(Z);bi=r(ut,"TD",{align:!0});var Km=o(bi);Pi=r(Km,"A",{href:!0});var Qm=o(Pi);Wh=s(Qm,"Prompt Weighting"),Qm.forEach(a),Km.forEach(a),Uh=h(ut),yi=r(ut,"TD",{align:!0});var Xm=o(yi);Oh=s(Xm,"\u2705"),Xm.forEach(a),Vh=h(ut),Ai=r(ut,"TD",{align:!0});var ev=o(Ai);Jh=s(ev,"\u274C"),ev.forEach(a),Yh=h(ut),vo=r(ut,"TD",{align:!0}),o(vo).forEach(a),ut.forEach(a),Kh=h(v),B=r(v,"TR",{});var ct=o(B);$i=r(ct,"TD",{align:!0});var tv=o($i);Ti=r(tv,"A",{href:!0});var av=o(Ti);Qh=s(av,"Custom Diffusion"),av.forEach(a),tv.forEach(a),Xh=h(ct),Di=r(ct,"TD",{align:!0});var iv=o(Di);ep=s(iv,"\u274C"),iv.forEach(a),tp=h(ct),ki=r(ct,"TD",{align:!0});var rv=o(ki);ap=s(rv,"\u2705"),rv.forEach(a),ip=h(ct),go=r(ct,"TD",{align:!0}),o(go).forEach(a),ct.forEach(a),rp=h(v),F=r(v,"TR",{});var mt=o(F);Si=r(mt,"TD",{align:!0});var ov=o(Si);Ii=r(ov,"A",{href:!0});var nv=o(Ii);op=s(nv,"Model Editing"),nv.forEach(a),ov.forEach(a),np=h(mt),Ni=r(mt,"TD",{align:!0});var lv=o(Ni);lp=s(lv,"\u2705"),lv.forEach(a),sp=h(mt),Gi=r(mt,"TD",{align:!0});var sv=o(Gi);fp=s(sv,"\u274C"),sv.forEach(a),hp=h(mt),Eo=r(mt,"TD",{align:!0}),o(Eo).forEach(a),mt.forEach(a),pp=h(v),W=r(v,"TR",{});var vt=o(W);qi=r(vt,"TD",{align:!0});var fv=o(qi);Ci=r(fv,"A",{href:!0});var hv=o(Ci);dp=s(hv,"DiffEdit"),hv.forEach(a),fv.forEach(a),up=h(vt),Ri=r(vt,"TD",{align:!0});var pv=o(Ri);cp=s(pv,"\u2705"),pv.forEach(a),mp=h(vt),Mi=r(vt,"TD",{align:!0});var dv=o(Mi);vp=s(dv,"\u274C"),dv.forEach(a),gp=h(vt),_o=r(vt,"TD",{align:!0}),o(_o).forEach(a),vt.forEach(a),Ep=h(v),U=r(v,"TR",{});var gt=o(U);Li=r(gt,"TD",{align:!0});var uv=o(Li);ji=r(uv,"A",{href:!0});var cv=o(ji);_p=s(cv,"T2I-Adapter"),cv.forEach(a),uv.forEach(a),wp=h(gt),zi=r(gt,"TD",{align:!0});var mv=o(zi);xp=s(mv,"\u2705"),mv.forEach(a),bp=h(gt),Hi=r(gt,"TD",{align:!0});var vv=o(Hi);Pp=s(vv,"\u274C"),vv.forEach(a),yp=h(gt),wo=r(gt,"TD",{align:!0}),o(wo).forEach(a),gt.forEach(a),v.forEach(a),Sl.forEach(a),un=h(t),Y=r(t,"H2",{class:!0});var Nl=o(Y);ve=r(Nl,"A",{id:!0,class:!0,href:!0});var gv=o(ve);xo=r(gv,"SPAN",{});var Ev=o(xo);w(xt.$$.fragment,Ev),Ev.forEach(a),gv.forEach(a),Ap=h(Nl),bo=r(Nl,"SPAN",{});var _v=o(bo);$p=s(_v,"Instruct Pix2Pix"),_v.forEach(a),Nl.forEach(a),cn=h(t),Zi=r(t,"P",{});var wv=o(Zi);bt=r(wv,"A",{href:!0,rel:!0});var xv=o(bt);Tp=s(xv,"Paper"),xv.forEach(a),wv.forEach(a),mn=h(t),K=r(t,"P",{});var en=o(K);Bi=r(en,"A",{href:!0});var bv=o(Bi);Dp=s(bv,"Instruct Pix2Pix"),bv.forEach(a),kp=s(en,` 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 `),Pt=r(en,"A",{href:!0,rel:!0});var Pv=o(Pt);Sp=s(Pv,"InstructGPT"),Pv.forEach(a),Ip=s(en,"-like prompts."),en.forEach(a),vn=h(t),ge=r(t,"P",{});var Gl=o(ge);Np=s(Gl,"See "),Fi=r(Gl,"A",{href:!0});var yv=o(Fi);Gp=s(yv,"here"),yv.forEach(a),qp=s(Gl," for more information on how to use it."),Gl.forEach(a),gn=h(t),Q=r(t,"H2",{class:!0});var ql=o(Q);Ee=r(ql,"A",{id:!0,class:!0,href:!0});var Av=o(Ee);Po=r(Av,"SPAN",{});var $v=o(Po);w(yt.$$.fragment,$v),$v.forEach(a),Av.forEach(a),Cp=h(ql),yo=r(ql,"SPAN",{});var Tv=o(yo);Rp=s(Tv,"Pix2Pix Zero"),Tv.forEach(a),ql.forEach(a),En=h(t),Wi=r(t,"P",{});var Dv=o(Wi);At=r(Dv,"A",{href:!0,rel:!0});var kv=o(At);Mp=s(kv,"Paper"),kv.forEach(a),Dv.forEach(a),_n=h(t),$t=r(t,"P",{});var nc=o($t);Ui=r(nc,"A",{href:!0});var Sv=o(Ui);Lp=s(Sv,"Pix2Pix Zero"),Sv.forEach(a),jp=s(nc," allows modifying an image so that one concept or subject is translated to another one while preserving general image semantics."),nc.forEach(a),wn=h(t),Oi=r(t,"P",{});var Iv=o(Oi);zp=s(Iv,"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."),Iv.forEach(a),xn=h(t),Vi=r(t,"P",{});var Nv=o(Vi);Hp=s(Nv,"Pix2Pix Zero can be used both to edit synthetic images as well as real images."),Nv.forEach(a),bn=h(t),_e=r(t,"UL",{});var Cl=o(_e);Tt=r(Cl,"LI",{});var Rl=o(Tt);Zp=s(Rl,`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 `),Dt=r(Rl,"A",{href:!0,rel:!0});var Gv=o(Dt);Bp=s(Gv,"Flan-T5"),Gv.forEach(a),Fp=s(Rl," 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."),Rl.forEach(a),Wp=h(Cl),kt=r(Cl,"LI",{});var Ml=o(kt);Up=s(Ml,"To edit a real image, one first generates an image caption using a model like "),St=r(Ml,"A",{href:!0,rel:!0});var qv=o(St);Op=s(qv,"BLIP"),qv.forEach(a),Vp=s(Ml,". 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."),Ml.forEach(a),Cl.forEach(a),Pn=h(t),w(we.$$.fragment,t),yn=h(t),xe=r(t,"P",{});var Ll=o(xe);Jp=s(Ll,`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 `),Ji=r(Ll,"A",{href:!0});var Cv=o(Ji);Yp=s(Cv,"StableDiffusionPipeline"),Cv.forEach(a),Kp=s(Ll,"."),Ll.forEach(a),An=h(t),be=r(t,"P",{});var jl=o(be);Qp=s(jl,"See "),Yi=r(jl,"A",{href:!0});var Rv=o(Yi);Xp=s(Rv,"here"),Rv.forEach(a),ed=s(jl," for more information on how to use it."),jl.forEach(a),$n=h(t),X=r(t,"H2",{class:!0});var zl=o(X);Pe=r(zl,"A",{id:!0,class:!0,href:!0});var Mv=o(Pe);Ao=r(Mv,"SPAN",{});var Lv=o(Ao);w(It.$$.fragment,Lv),Lv.forEach(a),Mv.forEach(a),td=h(zl),$o=r(zl,"SPAN",{});var jv=o($o);ad=s(jv,"Attend and Excite"),jv.forEach(a),zl.forEach(a),Tn=h(t),Ki=r(t,"P",{});var zv=o(Ki);Nt=r(zv,"A",{href:!0,rel:!0});var Hv=o(Nt);id=s(Hv,"Paper"),Hv.forEach(a),zv.forEach(a),Dn=h(t),Gt=r(t,"P",{});var lc=o(Gt);Qi=r(lc,"A",{href:!0});var Zv=o(Qi);rd=s(Zv,"Attend and Excite"),Zv.forEach(a),od=s(lc," allows subjects in the prompt to be faithfully represented in the final image."),lc.forEach(a),kn=h(t),Xi=r(t,"P",{});var Bv=o(Xi);nd=s(Bv,"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."),Bv.forEach(a),Sn=h(t),ye=r(t,"P",{});var Hl=o(ye);ld=s(Hl,"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 "),er=r(Hl,"A",{href:!0});var Fv=o(er);sd=s(Fv,"StableDiffusionPipeline"),Fv.forEach(a),fd=s(Hl,"."),Hl.forEach(a),In=h(t),Ae=r(t,"P",{});var Zl=o(Ae);hd=s(Zl,"See "),tr=r(Zl,"A",{href:!0});var Wv=o(tr);pd=s(Wv,"here"),Wv.forEach(a),dd=s(Zl," for more information on how to use it."),Zl.forEach(a),Nn=h(t),ee=r(t,"H2",{class:!0});var Bl=o(ee);$e=r(Bl,"A",{id:!0,class:!0,href:!0});var Uv=o($e);To=r(Uv,"SPAN",{});var Ov=o(To);w(qt.$$.fragment,Ov),Ov.forEach(a),Uv.forEach(a),ud=h(Bl),Do=r(Bl,"SPAN",{});var Vv=o(Do);cd=s(Vv,"Semantic Guidance (SEGA)"),Vv.forEach(a),Bl.forEach(a),Gn=h(t),ar=r(t,"P",{});var Jv=o(ar);Ct=r(Jv,"A",{href:!0,rel:!0});var Yv=o(Ct);md=s(Yv,"Paper"),Yv.forEach(a),Jv.forEach(a),qn=h(t),ir=r(t,"P",{});var Kv=o(ir);vd=s(Kv,"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."),Kv.forEach(a),Cn=h(t),rr=r(t,"P",{});var Qv=o(rr);gd=s(Qv,"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."),Qv.forEach(a),Rn=h(t),or=r(t,"P",{});var Xv=o(or);Ed=s(Xv,"Unlike Pix2Pix Zero or Attend and Excite, SEGA directly interacts with the diffusion process instead of performing any explicit gradient-based optimization."),Xv.forEach(a),Mn=h(t),Te=r(t,"P",{});var Fl=o(Te);_d=s(Fl,"See "),nr=r(Fl,"A",{href:!0});var e2=o(nr);wd=s(e2,"here"),e2.forEach(a),xd=s(Fl," for more information on how to use it."),Fl.forEach(a),Ln=h(t),te=r(t,"H2",{class:!0});var Wl=o(te);De=r(Wl,"A",{id:!0,class:!0,href:!0});var t2=o(De);ko=r(t2,"SPAN",{});var a2=o(ko);w(Rt.$$.fragment,a2),a2.forEach(a),t2.forEach(a),bd=h(Wl),So=r(Wl,"SPAN",{});var i2=o(So);Pd=s(i2,"Self-attention Guidance (SAG)"),i2.forEach(a),Wl.forEach(a),jn=h(t),lr=r(t,"P",{});var r2=o(lr);Mt=r(r2,"A",{href:!0,rel:!0});var o2=o(Mt);yd=s(o2,"Paper"),o2.forEach(a),r2.forEach(a),zn=h(t),Lt=r(t,"P",{});var sc=o(Lt);sr=r(sc,"A",{href:!0});var n2=o(sr);Ad=s(n2,"Self-attention Guidance"),n2.forEach(a),$d=s(sc," improves the general quality of images."),sc.forEach(a),Hn=h(t),fr=r(t,"P",{});var l2=o(fr);Td=s(l2,"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."),l2.forEach(a),Zn=h(t),ke=r(t,"P",{});var Ul=o(ke);Dd=s(Ul,"See "),hr=r(Ul,"A",{href:!0});var s2=o(hr);kd=s(s2,"here"),s2.forEach(a),Sd=s(Ul," for more information on how to use it."),Ul.forEach(a),Bn=h(t),ae=r(t,"H2",{class:!0});var Ol=o(ae);Se=r(Ol,"A",{id:!0,class:!0,href:!0});var f2=o(Se);Io=r(f2,"SPAN",{});var h2=o(Io);w(jt.$$.fragment,h2),h2.forEach(a),f2.forEach(a),Id=h(Ol),No=r(Ol,"SPAN",{});var p2=o(No);Nd=s(p2,"Depth2Image"),p2.forEach(a),Ol.forEach(a),Fn=h(t),pr=r(t,"P",{});var d2=o(pr);zt=r(d2,"A",{href:!0,rel:!0});var u2=o(zt);Gd=s(u2,"Project"),u2.forEach(a),d2.forEach(a),Wn=h(t),Ht=r(t,"P",{});var fc=o(Ht);dr=r(fc,"A",{href:!0});var c2=o(dr);qd=s(c2,"Depth2Image"),c2.forEach(a),Cd=s(fc," is fine-tuned from Stable Diffusion to better preserve semantics for text guided image variation."),fc.forEach(a),Un=h(t),ur=r(t,"P",{});var m2=o(ur);Rd=s(m2,"It conditions on a monocular depth estimate of the original image."),m2.forEach(a),On=h(t),Ie=r(t,"P",{});var Vl=o(Ie);Md=s(Vl,"See "),cr=r(Vl,"A",{href:!0});var v2=o(cr);Ld=s(v2,"here"),v2.forEach(a),jd=s(Vl," for more information on how to use it."),Vl.forEach(a),Vn=h(t),w(Ne.$$.fragment,t),Jn=h(t),ie=r(t,"H2",{class:!0});var Jl=o(ie);Ge=r(Jl,"A",{id:!0,class:!0,href:!0});var g2=o(Ge);Go=r(g2,"SPAN",{});var E2=o(Go);w(Zt.$$.fragment,E2),E2.forEach(a),g2.forEach(a),zd=h(Jl),qo=r(Jl,"SPAN",{});var _2=o(qo);Hd=s(_2,"MultiDiffusion Panorama"),_2.forEach(a),Jl.forEach(a),Yn=h(t),mr=r(t,"P",{});var w2=o(mr);Bt=r(w2,"A",{href:!0,rel:!0});var x2=o(Bt);Zd=s(x2,"Paper"),x2.forEach(a),w2.forEach(a),Kn=h(t),qe=r(t,"P",{});var Yl=o(qe);Bd=s(Yl,`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.
`),vr=r(Yl,"A",{href:!0});var b2=o(vr);Fd=s(b2,"MultiDiffusion Panorama"),b2.forEach(a),Wd=s(Yl," allows to generate high-quality images at arbitrary aspect ratios (e.g., panoramas)."),Yl.forEach(a),Qn=h(t),Ce=r(t,"P",{});var Kl=o(Ce);Ud=s(Kl,"See "),gr=r(Kl,"A",{href:!0});var P2=o(gr);Od=s(P2,"here"),P2.forEach(a),Vd=s(Kl," for more information on how to use it to generate panoramic images."),Kl.forEach(a),Xn=h(t),re=r(t,"H2",{class:!0});var Ql=o(re);Re=r(Ql,"A",{id:!0,class:!0,href:!0});var y2=o(Re);Co=r(y2,"SPAN",{});var A2=o(Co);w(Ft.$$.fragment,A2),A2.forEach(a),y2.forEach(a),Jd=h(Ql),Ro=r(Ql,"SPAN",{});var $2=o(Ro);Yd=s($2,"Fine-tuning your own models"),$2.forEach(a),Ql.forEach(a),el=h(t),Er=r(t,"P",{});var T2=o(Er);Kd=s(T2,"In addition to pre-trained models, Diffusers has training scripts for fine-tuning models on user-provided data."),T2.forEach(a),tl=h(t),oe=r(t,"H2",{class:!0});var Xl=o(oe);Me=r(Xl,"A",{id:!0,class:!0,href:!0});var D2=o(Me);Mo=r(D2,"SPAN",{});var k2=o(Mo);w(Wt.$$.fragment,k2),k2.forEach(a),D2.forEach(a),Qd=h(Xl),Lo=r(Xl,"SPAN",{});var S2=o(Lo);Xd=s(S2,"DreamBooth"),S2.forEach(a),Xl.forEach(a),al=h(t),Ut=r(t,"P",{});var hc=o(Ut);_r=r(hc,"A",{href:!0});var I2=o(_r);eu=s(I2,"DreamBooth"),I2.forEach(a),tu=s(hc," 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."),hc.forEach(a),il=h(t),Le=r(t,"P",{});var es=o(Le);au=s(es,"See "),wr=r(es,"A",{href:!0});var N2=o(wr);iu=s(N2,"here"),N2.forEach(a),ru=s(es," for more information on how to use it."),es.forEach(a),rl=h(t),ne=r(t,"H2",{class:!0});var ts=o(ne);je=r(ts,"A",{id:!0,class:!0,href:!0});var G2=o(je);jo=r(G2,"SPAN",{});var q2=o(jo);w(Ot.$$.fragment,q2),q2.forEach(a),G2.forEach(a),ou=h(ts),zo=r(ts,"SPAN",{});var C2=o(zo);nu=s(C2,"Textual Inversion"),C2.forEach(a),ts.forEach(a),ol=h(t),Vt=r(t,"P",{});var pc=o(Vt);xr=r(pc,"A",{href:!0});var R2=o(xr);lu=s(R2,"Textual Inversion"),R2.forEach(a),su=s(pc," 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."),pc.forEach(a),nl=h(t),ze=r(t,"P",{});var as=o(ze);fu=s(as,"See "),br=r(as,"A",{href:!0});var M2=o(br);hu=s(M2,"here"),M2.forEach(a),pu=s(as," for more information on how to use it."),as.forEach(a),ll=h(t),le=r(t,"H2",{class:!0});var is=o(le);He=r(is,"A",{id:!0,class:!0,href:!0});var L2=o(He);Ho=r(L2,"SPAN",{});var j2=o(Ho);w(Jt.$$.fragment,j2),j2.forEach(a),L2.forEach(a),du=h(is),Zo=r(is,"SPAN",{});var z2=o(Zo);uu=s(z2,"ControlNet"),z2.forEach(a),is.forEach(a),sl=h(t),Pr=r(t,"P",{});var H2=o(Pr);Yt=r(H2,"A",{href:!0,rel:!0});var Z2=o(Yt);cu=s(Z2,"Paper"),Z2.forEach(a),H2.forEach(a),fl=h(t),se=r(t,"P",{});var tn=o(se);yr=r(tn,"A",{href:!0});var B2=o(yr);mu=s(B2,"ControlNet"),B2.forEach(a),vu=s(tn,` is an auxiliary network which adds an extra condition.
`),Ar=r(tn,"A",{href:!0});var F2=o(Ar);gu=s(F2,"ControlNet"),F2.forEach(a),Eu=s(tn,` 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.`),tn.forEach(a),hl=h(t),Ze=r(t,"P",{});var rs=o(Ze);_u=s(rs,"See "),$r=r(rs,"A",{href:!0});var W2=o($r);wu=s(W2,"here"),W2.forEach(a),xu=s(rs," for more information on how to use it."),rs.forEach(a),pl=h(t),fe=r(t,"H2",{class:!0});var os=o(fe);Be=r(os,"A",{id:!0,class:!0,href:!0});var U2=o(Be);Bo=r(U2,"SPAN",{});var O2=o(Bo);w(Kt.$$.fragment,O2),O2.forEach(a),U2.forEach(a),bu=h(os),Fo=r(os,"SPAN",{});var V2=o(Fo);Pu=s(V2,"Prompt Weighting"),V2.forEach(a),os.forEach(a),dl=h(t),Tr=r(t,"P",{});var J2=o(Tr);yu=s(J2,`Prompt weighting is a simple technique that puts more attention weight on certain parts of the text
input.`),J2.forEach(a),ul=h(t),Fe=r(t,"P",{});var ns=o(Fe);Au=s(ns,"For a more in-detail explanation and examples, see "),Dr=r(ns,"A",{href:!0});var Y2=o(Dr);$u=s(Y2,"here"),Y2.forEach(a),Tu=s(ns,"."),ns.forEach(a),cl=h(t),he=r(t,"H2",{class:!0});var ls=o(he);We=r(ls,"A",{id:!0,class:!0,href:!0});var K2=o(We);Wo=r(K2,"SPAN",{});var Q2=o(Wo);w(Qt.$$.fragment,Q2),Q2.forEach(a),K2.forEach(a),Du=h(ls),Uo=r(ls,"SPAN",{});var X2=o(Uo);ku=s(X2,"Custom Diffusion"),X2.forEach(a),ls.forEach(a),ml=h(t),Xt=r(t,"P",{});var dc=o(Xt);kr=r(dc,"A",{href:!0});var eg=o(kr);Su=s(eg,"Custom Diffusion"),eg.forEach(a),Iu=s(dc,` only fine-tunes the cross-attention maps of a pre-trained
text-to-image diffusion model. It also allows for additionally performing textual inversion. It supports
multi-concept training by design. Like DreamBooth and Textual Inversion, Custom Diffusion is also used to
teach a pre-trained text-to-image diffusion model about new concepts to generate outputs involving the
concept(s) of interest.`),dc.forEach(a),vl=h(t),Ue=r(t,"P",{});var ss=o(Ue);Nu=s(ss,"For more details, check out our "),Sr=r(ss,"A",{href:!0});var tg=o(Sr);Gu=s(tg,"official doc"),tg.forEach(a),qu=s(ss,"."),ss.forEach(a),gl=h(t),pe=r(t,"H2",{class:!0});var fs=o(pe);Oe=r(fs,"A",{id:!0,class:!0,href:!0});var ag=o(Oe);Oo=r(ag,"SPAN",{});var ig=o(Oo);w(ea.$$.fragment,ig),ig.forEach(a),ag.forEach(a),Cu=h(fs),Vo=r(fs,"SPAN",{});var rg=o(Vo);Ru=s(rg,"Model Editing"),rg.forEach(a),fs.forEach(a),El=h(t),Ir=r(t,"P",{});var og=o(Ir);ta=r(og,"A",{href:!0,rel:!0});var ng=o(ta);Mu=s(ng,"Paper"),ng.forEach(a),og.forEach(a),_l=h(t),Ve=r(t,"P",{});var hs=o(Ve);Lu=s(hs,"The "),Nr=r(hs,"A",{href:!0});var lg=o(Nr);ju=s(lg,"text-to-image model editing pipeline"),lg.forEach(a),zu=s(hs,` helps you mitigate some of the incorrect implicit assumptions a pre-trained text-to-image
diffusion model might make about the subjects present in the input prompt. For example, if you prompt Stable Diffusion to generate images for \u201CA pack of roses\u201D, the roses in the generated images
are more likely to be red. This pipeline helps you change that assumption.`),hs.forEach(a),wl=h(t),Je=r(t,"P",{});var ps=o(Je);Hu=s(ps,"To know more details, check out the "),Gr=r(ps,"A",{href:!0});var sg=o(Gr);Zu=s(sg,"official doc"),sg.forEach(a),Bu=s(ps,"."),ps.forEach(a),xl=h(t),de=r(t,"H2",{class:!0});var ds=o(de);Ye=r(ds,"A",{id:!0,class:!0,href:!0});var fg=o(Ye);Jo=r(fg,"SPAN",{});var hg=o(Jo);w(aa.$$.fragment,hg),hg.forEach(a),fg.forEach(a),Fu=h(ds),Yo=r(ds,"SPAN",{});var pg=o(Yo);Wu=s(pg,"DiffEdit"),pg.forEach(a),ds.forEach(a),bl=h(t),qr=r(t,"P",{});var dg=o(qr);ia=r(dg,"A",{href:!0,rel:!0});var ug=o(ia);Uu=s(ug,"Paper"),ug.forEach(a),dg.forEach(a),Pl=h(t),ra=r(t,"P",{});var uc=o(ra);Cr=r(uc,"A",{href:!0});var cg=o(Cr);Ou=s(cg,"DiffEdit"),cg.forEach(a),Vu=s(uc,` allows for semantic editing of input images along with
input prompts while preserving the original input images as much as possible.`),uc.forEach(a),yl=h(t),Ke=r(t,"P",{});var us=o(Ke);Ju=s(us,"To know more details, check out the "),Rr=r(us,"A",{href:!0});var mg=o(Rr);Yu=s(mg,"official doc"),mg.forEach(a),Ku=s(us,"."),us.forEach(a),Al=h(t),ue=r(t,"H2",{class:!0});var cs=o(ue);Qe=r(cs,"A",{id:!0,class:!0,href:!0});var vg=o(Qe);Ko=r(vg,"SPAN",{});var gg=o(Ko);w(oa.$$.fragment,gg),gg.forEach(a),vg.forEach(a),Qu=h(cs),Qo=r(cs,"SPAN",{});var Eg=o(Qo);Xu=s(Eg,"T2I-Adapter"),Eg.forEach(a),cs.forEach(a),$l=h(t),Mr=r(t,"P",{});var _g=o(Mr);na=r(_g,"A",{href:!0,rel:!0});var wg=o(na);ec=s(wg,"Paper"),wg.forEach(a),_g.forEach(a),Tl=h(t),la=r(t,"P",{});var cc=o(la);Lr=r(cc,"A",{href:!0});var xg=o(Lr);tc=s(xg,"T2I-Adapter"),xg.forEach(a),ac=s(cc,` is an auxiliary network which adds an extra condition.
There are 8 canonical pre-trained adapters trained on different conditionings such as edge detection, sketch,
depth maps, and semantic segmentations.`),cc.forEach(a),Dl=h(t),Xe=r(t,"P",{});var ms=o(Xe);ic=s(ms,"See "),jr=r(ms,"A",{href:!0});var bg=o(jr);rc=s(bg,"here"),bg.forEach(a),oc=s(ms," for more information on how to use it."),ms.forEach(a),this.h()},h(){n(g,"name","hf:doc:metadata"),n(g,"content",JSON.stringify(Ng)),n(A,"id","controlled-generation"),n(A,"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"),n(A,"href","#controlled-generation"),n(E,"class","relative group"),n(Et,"href","https://discuss.huggingface.co/"),n(Et,"rel","nofollow"),n(_t,"href","https://github.com/huggingface/diffusers/issues"),n(_t,"rel","nofollow"),n(va,"href","#instruct-pix2pix"),n(ga,"href","#pix2pixzero"),n(Ea,"href","#attend-and-excite"),n(_a,"href","#semantic-guidance"),n(wa,"href","#self-attention-guidance"),n(xa,"href","#depth2image"),n(ba,"href","#multidiffusion-panorama"),n(Pa,"href","#dreambooth"),n(ya,"href","#textual-inversion"),n(Aa,"href","#controlnet"),n($a,"href","#prompt-weighting"),n(Ta,"href","#custom-diffusion"),n(Da,"href","#model-editing"),n(ka,"href","#diffedit"),n(Sa,"href","#t2i-adapter"),n(Na,"align","center"),n(Ga,"align","center"),n(qa,"align","center"),n(Ca,"align","center"),n(Ma,"href","#instruct-pix2pix"),n(Ra,"align","center"),n(La,"align","center"),n(ja,"align","center"),n(S,"align","center"),n(Ha,"href","#pix2pixzero"),n(za,"align","center"),n(Za,"align","center"),n(Ba,"align","center"),n(lo,"align","center"),n(Wa,"href","#attend-and-excite"),n(Fa,"align","center"),n(Ua,"align","center"),n(Oa,"align","center"),n(so,"align","center"),n(Ja,"href","#semantic-guidance"),n(Va,"align","center"),n(Ya,"align","center"),n(Ka,"align","center"),n(fo,"align","center"),n(Xa,"href","#self-attention-guidance"),n(Qa,"align","center"),n(ei,"align","center"),n(ti,"align","center"),n(ho,"align","center"),n(ii,"href","#depth2image"),n(ai,"align","center"),n(ri,"align","center"),n(oi,"align","center"),n(po,"align","center"),n(li,"href","#multidiffusion-panorama"),n(ni,"align","center"),n(si,"align","center"),n(fi,"align","center"),n(uo,"align","center"),n(pi,"href","#dreambooth"),n(hi,"align","center"),n(di,"align","center"),n(ui,"align","center"),n(co,"align","center"),n(mi,"href","#textual-inversion"),n(ci,"align","center"),n(vi,"align","center"),n(gi,"align","center"),n(mo,"align","center"),n(_i,"href","#controlnet"),n(Ei,"align","center"),n(wi,"align","center"),n(xi,"align","center"),n(V,"align","center"),n(Pi,"href","#prompt-weighting"),n(bi,"align","center"),n(yi,"align","center"),n(Ai,"align","center"),n(vo,"align","center"),n(Ti,"href","#custom-diffusion"),n($i,"align","center"),n(Di,"align","center"),n(ki,"align","center"),n(go,"align","center"),n(Ii,"href","#model-editing"),n(Si,"align","center"),n(Ni,"align","center"),n(Gi,"align","center"),n(Eo,"align","center"),n(Ci,"href","#diffedit"),n(qi,"align","center"),n(Ri,"align","center"),n(Mi,"align","center"),n(_o,"align","center"),n(ji,"href","#t2i-adapter"),n(Li,"align","center"),n(zi,"align","center"),n(Hi,"align","center"),n(wo,"align","center"),n(ve,"id","instruct-pix2pix"),n(ve,"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"),n(ve,"href","#instruct-pix2pix"),n(Y,"class","relative group"),n(bt,"href","https://arxiv.org/abs/2211.09800"),n(bt,"rel","nofollow"),n(Bi,"href","../api/pipelines/pix2pix"),n(Pt,"href","https://openai.com/blog/instruction-following/"),n(Pt,"rel","nofollow"),n(Fi,"href","../api/pipelines/pix2pix"),n(Ee,"id","pix2pix-zero"),n(Ee,"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"),n(Ee,"href","#pix2pix-zero"),n(Q,"class","relative group"),n(At,"href","https://arxiv.org/abs/2302.03027"),n(At,"rel","nofollow"),n(Ui,"href","../api/pipelines/pix2pix_zero"),n(Dt,"href","https://huggingface.co/docs/transformers/model_doc/flan-t5"),n(Dt,"rel","nofollow"),n(St,"href","https://huggingface.co/docs/transformers/model_doc/blip"),n(St,"rel","nofollow"),n(Ji,"href","../api/pipelines/stable_diffusion/text2img"),n(Yi,"href","../api/pipelines/pix2pix_zero"),n(Pe,"id","attend-and-excite"),n(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"),n(Pe,"href","#attend-and-excite"),n(X,"class","relative group"),n(Nt,"href","https://arxiv.org/abs/2301.13826"),n(Nt,"rel","nofollow"),n(Qi,"href","../api/pipelines/attend_and_excite"),n(er,"href","../api/pipelines/stable_diffusion/text2img"),n(tr,"href","../api/pipelines/attend_and_excite"),n($e,"id","semantic-guidance-sega"),n($e,"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"),n($e,"href","#semantic-guidance-sega"),n(ee,"class","relative group"),n(Ct,"href","https://arxiv.org/abs/2301.12247"),n(Ct,"rel","nofollow"),n(nr,"href","../api/pipelines/semantic_stable_diffusion"),n(De,"id","selfattention-guidance-sag"),n(De,"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"),n(De,"href","#selfattention-guidance-sag"),n(te,"class","relative group"),n(Mt,"href","https://arxiv.org/abs/2210.00939"),n(Mt,"rel","nofollow"),n(sr,"href","../api/pipelines/self_attention_guidance"),n(hr,"href","../api/pipelines/self_attention_guidance"),n(Se,"id","depth2image"),n(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"),n(Se,"href","#depth2image"),n(ae,"class","relative group"),n(zt,"href","https://huggingface.co/stabilityai/stable-diffusion-2-depth"),n(zt,"rel","nofollow"),n(dr,"href","../pipelines/stable_diffusion_2#depthtoimage"),n(cr,"href","../api/pipelines/stable_diffusion_2#depthtoimage"),n(Ge,"id","multidiffusion-panorama"),n(Ge,"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"),n(Ge,"href","#multidiffusion-panorama"),n(ie,"class","relative group"),n(Bt,"href","https://arxiv.org/abs/2302.08113"),n(Bt,"rel","nofollow"),n(vr,"href","../api/pipelines/panorama"),n(gr,"href","../api/pipelines/panorama"),n(Re,"id","finetuning-your-own-models"),n(Re,"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"),n(Re,"href","#finetuning-your-own-models"),n(re,"class","relative group"),n(Me,"id","dreambooth"),n(Me,"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"),n(Me,"href","#dreambooth"),n(oe,"class","relative group"),n(_r,"href","../training/dreambooth"),n(wr,"href","../training/dreambooth"),n(je,"id","textual-inversion"),n(je,"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"),n(je,"href","#textual-inversion"),n(ne,"class","relative group"),n(xr,"href","../training/text_inversion"),n(br,"href","../training/text_inversion"),n(He,"id","controlnet"),n(He,"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"),n(He,"href","#controlnet"),n(le,"class","relative group"),n(Yt,"href","https://arxiv.org/abs/2302.05543"),n(Yt,"rel","nofollow"),n(yr,"href","../api/pipelines/controlnet"),n(Ar,"href","../api/pipelines/controlnet"),n($r,"href","../api/pipelines/controlnet"),n(Be,"id","prompt-weighting"),n(Be,"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"),n(Be,"href","#prompt-weighting"),n(fe,"class","relative group"),n(Dr,"href","../using-diffusers/weighted_prompts"),n(We,"id","custom-diffusion"),n(We,"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"),n(We,"href","#custom-diffusion"),n(he,"class","relative group"),n(kr,"href","../training/custom_diffusion"),n(Sr,"href","../training/custom_diffusion"),n(Oe,"id","model-editing"),n(Oe,"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"),n(Oe,"href","#model-editing"),n(pe,"class","relative group"),n(ta,"href","https://arxiv.org/abs/2303.08084"),n(ta,"rel","nofollow"),n(Nr,"href","../api/pipelines/model_editing"),n(Gr,"href","../api/pipelines/model_editing"),n(Ye,"id","diffedit"),n(Ye,"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"),n(Ye,"href","#diffedit"),n(de,"class","relative group"),n(ia,"href","https://arxiv.org/abs/2210.11427"),n(ia,"rel","nofollow"),n(Cr,"href","../api/pipelines/diffedit"),n(Rr,"href","../api/pipelines/diffedit"),n(Qe,"id","t2iadapter"),n(Qe,"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"),n(Qe,"href","#t2iadapter"),n(ue,"class","relative group"),n(na,"href","https://arxiv.org/abs/2302.08453"),n(na,"rel","nofollow"),n(Lr,"href","../api/pipelines/stable_diffusion/adapter"),n(jr,"href","../api/pipelines/stable_diffusion/adapter")},m(t,p){e(document.head,g),d(t,D,p),d(t,E,p),e(E,A),e(A,J),x(T,J,null),e(E,O),e(E,ce),e(ce,vs),d(t,an,p),d(t,ha,p),e(ha,gs),d(t,rn,p),d(t,pa,p),e(pa,Es),d(t,on,p),d(t,da,p),e(da,_s),d(t,nn,p),d(t,k,p),e(k,ws),e(k,Hr),e(Hr,xs),e(k,bs),e(k,Et),e(Et,Ps),e(k,ys),e(k,_t),e(_t,As),e(k,$s),d(t,ln,p),d(t,ua,p),e(ua,Ts),d(t,sn,p),d(t,ca,p),e(ca,Ds),d(t,fn,p),d(t,ma,p),e(ma,ks),d(t,hn,p),d(t,u,p),e(u,Zr),e(Zr,va),e(va,Ss),e(u,Is),e(u,Br),e(Br,ga),e(ga,Ns),e(u,Gs),e(u,Fr),e(Fr,Ea),e(Ea,qs),e(u,Cs),e(u,Wr),e(Wr,_a),e(_a,Rs),e(u,Ms),e(u,Ur),e(Ur,wa),e(wa,Ls),e(u,js),e(u,Or),e(Or,xa),e(xa,zs),e(u,Hs),e(u,Vr),e(Vr,ba),e(ba,Zs),e(u,Bs),e(u,Jr),e(Jr,Pa),e(Pa,Fs),e(u,Ws),e(u,Yr),e(Yr,ya),e(ya,Us),e(u,Os),e(u,Kr),e(Kr,Aa),e(Aa,Vs),e(u,Js),e(u,Qr),e(Qr,$a),e($a,Ys),e(u,Ks),e(u,Xr),e(Xr,Ta),e(Ta,Qs),e(u,Xs),e(u,eo),e(eo,Da),e(Da,ef),e(u,tf),e(u,to),e(to,ka),e(ka,af),e(u,rf),e(u,ao),e(ao,Sa),e(Sa,of),d(t,pn,p),d(t,Ia,p),e(Ia,nf),d(t,dn,p),d(t,me,p),e(me,io),e(io,I),e(I,Na),e(Na,ro),e(ro,lf),e(I,sf),e(I,Ga),e(Ga,oo),e(oo,ff),e(I,hf),e(I,qa),e(qa,wt),e(wt,pf),e(wt,df),e(wt,uf),e(I,cf),e(I,Ca),e(Ca,no),e(no,mf),e(me,vf),e(me,c),e(c,N),e(N,Ra),e(Ra,Ma),e(Ma,gf),e(N,Ef),e(N,La),e(La,_f),e(N,wf),e(N,ja),e(ja,xf),e(N,bf),e(N,S),e(S,Pf),e(S,yf),e(S,Af),e(S,$f),e(S,Tf),e(S,Df),e(S,kf),e(c,Sf),e(c,G),e(G,za),e(za,Ha),e(Ha,If),e(G,Nf),e(G,Za),e(Za,Gf),e(G,qf),e(G,Ba),e(Ba,Cf),e(G,Rf),e(G,lo),e(c,Mf),e(c,q),e(q,Fa),e(Fa,Wa),e(Wa,Lf),e(q,jf),e(q,Ua),e(Ua,zf),e(q,Hf),e(q,Oa),e(Oa,Zf),e(q,Bf),e(q,so),e(c,Ff),e(c,C),e(C,Va),e(Va,Ja),e(Ja,Wf),e(C,Uf),e(C,Ya),e(Ya,Of),e(C,Vf),e(C,Ka),e(Ka,Jf),e(C,Yf),e(C,fo),e(c,Kf),e(c,R),e(R,Qa),e(Qa,Xa),e(Xa,Qf),e(R,Xf),e(R,ei),e(ei,eh),e(R,th),e(R,ti),e(ti,ah),e(R,ih),e(R,ho),e(c,rh),e(c,M),e(M,ai),e(ai,ii),e(ii,oh),e(M,nh),e(M,ri),e(ri,lh),e(M,sh),e(M,oi),e(oi,fh),e(M,hh),e(M,po),e(c,ph),e(c,L),e(L,ni),e(ni,li),e(li,dh),e(L,uh),e(L,si),e(si,ch),e(L,mh),e(L,fi),e(fi,vh),e(L,gh),e(L,uo),e(c,Eh),e(c,j),e(j,hi),e(hi,pi),e(pi,_h),e(j,wh),e(j,di),e(di,xh),e(j,bh),e(j,ui),e(ui,Ph),e(j,yh),e(j,co),e(c,Ah),e(c,z),e(z,ci),e(ci,mi),e(mi,$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mr,na),e(na,ec),d(t,Tl,p),d(t,la,p),e(la,Lr),e(Lr,tc),e(la,ac),d(t,Dl,p),d(t,Xe,p),e(Xe,ic),e(Xe,jr),e(jr,rc),e(Xe,oc),kl=!0},p(t,[p]){const sa={};p&2&&(sa.$$scope={dirty:p,ctx:t}),we.$set(sa);const Xo={};p&2&&(Xo.$$scope={dirty:p,ctx:t}),Ne.$set(Xo)},i(t){kl||(b(T.$$.fragment,t),b(xt.$$.fragment,t),b(yt.$$.fragment,t),b(we.$$.fragment,t),b(It.$$.fragment,t),b(qt.$$.fragment,t),b(Rt.$$.fragment,t),b(jt.$$.fragment,t),b(Ne.$$.fragment,t),b(Zt.$$.fragment,t),b(Ft.$$.fragment,t),b(Wt.$$.fragment,t),b(Ot.$$.fragment,t),b(Jt.$$.fragment,t),b(Kt.$$.fragment,t),b(Qt.$$.fragment,t),b(ea.$$.fragment,t),b(aa.$$.fragment,t),b(oa.$$.fragment,t),kl=!0)},o(t){P(T.$$.fragment,t),P(xt.$$.fragment,t),P(yt.$$.fragment,t),P(we.$$.fragment,t),P(It.$$.fragment,t),P(qt.$$.fragment,t),P(Rt.$$.fragment,t),P(jt.$$.fragment,t),P(Ne.$$.fragment,t),P(Zt.$$.fragment,t),P(Ft.$$.fragment,t),P(Wt.$$.fragment,t),P(Ot.$$.fragment,t),P(Jt.$$.fragment,t),P(Kt.$$.fragment,t),P(Qt.$$.fragment,t),P(ea.$$.fragment,t),P(aa.$$.fragment,t),P(oa.$$.fragment,t),kl=!1},d(t){a(g),t&&a(D),t&&a(E),y(T),t&&a(an),t&&a(ha),t&&a(rn),t&&a(pa),t&&a(on),t&&a(da),t&&a(nn),t&&a(k),t&&a(ln),t&&a(ua),t&&a(sn),t&&a(ca),t&&a(fn),t&&a(ma),t&&a(hn),t&&a(u),t&&a(pn),t&&a(Ia),t&&a(dn),t&&a(me),t&&a(un),t&&a(Y),y(xt),t&&a(cn),t&&a(Zi),t&&a(mn),t&&a(K),t&&a(vn),t&&a(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),t&&a(xl),t&&a(de),y(aa),t&&a(bl),t&&a(qr),t&&a(Pl),t&&a(ra),t&&a(yl),t&&a(Ke),t&&a(Al),t&&a(ue),y(oa),t&&a($l),t&&a(Mr),t&&a(Tl),t&&a(la),t&&a(Dl),t&&a(Xe)}}}const Ng={local:"controlled-generation",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",title:"Fine-tuning your own models"},{local:"dreambooth",title:"DreamBooth"},{local:"textual-inversion",title:"Textual Inversion"},{local:"controlnet",title:"ControlNet"},{local:"prompt-weighting",title:"Prompt Weighting"},{local:"custom-diffusion",title:"Custom Diffusion"},{local:"model-editing",title:"Model Editing"},{local:"diffedit",title:"DiffEdit"},{local:"t2iadapter",title:"T2I-Adapter"}],title:"Controlled generation"};function Gg(fa){return Dg(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Mg extends yg{constructor(g){super();Ag(this,g,Gg,Ig,$g,{})}}export{Mg as default,Ng as metadata};

Xet Storage Details

Size:
71.1 kB
·
Xet hash:
4f08f2143f26870214c5ee26b3b59caba079000317438e148ab1f29ab8df9c39

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