Buckets:

hf-doc-build/doc / diffusers /main /en /_app /pages /using-diffusers /weighted_prompts.mdx-hf-doc-builder.js
rtrm's picture
download
raw
50 kB
import{S as tr,i as lr,s as sr,e as s,k as f,w as h,t as a,M as or,c as o,d as l,m,a as n,x as b,h as i,b as c,N as L,G as t,g as p,y,q as g,o as w,B as v,v as ar}from"../../chunks/vendor-hf-doc-builder.js";import{T as er}from"../../chunks/Tip-hf-doc-builder.js";import{I as Jt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as T}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as ir}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function rr(Et){let d,W,_,j,U,J,x,$;return{c(){d=s("p"),W=a("If your favorite pipeline doesn\u2019t have a "),_=s("code"),j=a("prompt_embeds"),U=a(" parameter, please open an "),J=s("a"),x=a("issue"),$=a(" so we can add it!"),this.h()},l(B){d=o(B,"P",{});var E=n(d);W=i(E,"If your favorite pipeline doesn\u2019t have a "),_=o(E,"CODE",{});var Z=n(_);j=i(Z,"prompt_embeds"),Z.forEach(l),U=i(E," parameter, please open an "),J=o(E,"A",{href:!0,rel:!0});var N=n(J);x=i(N,"issue"),N.forEach(l),$=i(E," so we can add it!"),E.forEach(l),this.h()},h(){c(J,"href","https://github.com/huggingface/diffusers/issues/new/choose"),c(J,"rel","nofollow")},m(B,E){p(B,d,E),t(d,W),t(d,_),t(_,j),t(d,U),t(d,J),t(J,x),t(d,$)},d(B){B&&l(d)}}}function nr(Et){let d,W,_,j,U,J,x,$,B,E,Z,N,C,O,S,We,K,de,M,ee,D,Ie,te,R,le,se,Be,F,Y,Ce,Xe;return{c(){d=s("p"),W=s("code"),_=a("+"),j=a(" corresponds to the value "),U=s("code"),J=a("1.1"),x=a(", "),$=s("code"),B=a("++"),E=a(" corresponds to "),Z=s("code"),N=a("1.1^2"),C=a(", and so on. Similarly, "),O=s("code"),S=a("-"),We=a(" corresponds to "),K=s("code"),de=a("0.9"),M=a(" and "),ee=s("code"),D=a("--"),Ie=a(" corresponds to "),te=s("code"),R=a("0.9^2"),le=a(". Feel free to experiment with adding more "),se=s("code"),Be=a("+"),F=a(" or "),Y=s("code"),Ce=a("-"),Xe=a(" in your prompt!")},l(X){d=o(X,"P",{});var u=n(d);W=o(u,"CODE",{});var jt=n(W);_=i(jt,"+"),jt.forEach(l),j=i(u," corresponds to the value "),U=o(u,"CODE",{});var oe=n(U);J=i(oe,"1.1"),oe.forEach(l),x=i(u,", "),$=o(u,"CODE",{});var Zt=n($);B=i(Zt,"++"),Zt.forEach(l),E=i(u," corresponds to "),Z=o(u,"CODE",{});var Tt=n(Z);N=i(Tt,"1.1^2"),Tt.forEach(l),C=i(u,", and so on. Similarly, "),O=o(u,"CODE",{});var ae=n(O);S=i(ae,"-"),ae.forEach(l),We=i(u," corresponds to "),K=o(u,"CODE",{});var Ut=n(K);de=i(Ut,"0.9"),Ut.forEach(l),M=i(u," and "),ee=o(u,"CODE",{});var $t=n(ee);D=i($t,"--"),$t.forEach(l),Ie=i(u," corresponds to "),te=o(u,"CODE",{});var Ge=n(te);R=i(Ge,"0.9^2"),Ge.forEach(l),le=i(u,". Feel free to experiment with adding more "),se=o(u,"CODE",{});var z=n(se);Be=i(z,"+"),z.forEach(l),F=i(u," or "),Y=o(u,"CODE",{});var ke=n(Y);Ce=i(ke,"-"),ke.forEach(l),Xe=i(u," in your prompt!"),u.forEach(l)},m(X,u){p(X,d,u),t(d,W),t(W,_),t(d,j),t(d,U),t(U,J),t(d,x),t(d,$),t($,B),t(d,E),t(d,Z),t(Z,N),t(d,C),t(d,O),t(O,S),t(d,We),t(d,K),t(K,de),t(d,M),t(d,ee),t(ee,D),t(d,Ie),t(d,te),t(te,R),t(d,le),t(d,se),t(se,Be),t(d,F),t(d,Y),t(Y,Ce),t(d,Xe)},d(X){X&&l(d)}}}function pr(Et){let d,W,_,j,U,J,x,$,B,E,Z,N,C,O,S,We,K,de,M,ee,D,Ie,te,R,le,se,Be,F,Y,Ce,Xe,X,u,jt,oe,Zt,Tt,ae,Ut,$t,Ge,z,ke,Wt,zs,Cl,It,Hs,Xl,Ve,Gl,A,As,tl,Qs,Ps,Bt,qs,Ls,kl,xe,Vl,Ne,Ct,Za,xl,ie,ue,ll,Se,Os,sl,Ks,Nl,he,eo,De,ol,to,lo,Sl,Re,Dl,Q,so,al,oo,ao,il,io,ro,Rl,be,Fl,Fe,Yl,ye,no,rl,po,co,zl,Ye,Hl,ze,Xt,Ta,Al,ge,fo,nl,mo,uo,Ql,He,Pl,Ae,Gt,Ua,ql,kt,ho,Ll,Qe,Ol,Pe,Vt,$a,Kl,re,we,pl,qe,bo,cl,yo,es,P,go,fl,wo,vo,ml,Mo,_o,ts,Le,ls,Oe,xt,Wa,ss,ne,ve,dl,Ke,Jo,ul,Eo,os,Me,jo,hl,Zo,To,as,et,is,tt,Nt,Ia,rs,pe,_e,bl,lt,Uo,yl,$o,ns,st,St,Wo,Io,ps,q,Bo,Dt,Co,Xo,ot,Go,ko,cs,at,fs,G,Vo,gl,xo,No,wl,So,Do,vl,Ro,Fo,ms,it,ds,Je,Yo,Ml,zo,Ho,us,rt,hs,nt,Rt,Ba,bs,ce,Ee,_l,pt,Ao,Jl,Qo,ys,H,Ft,Po,qo,Yt,Lo,Oo,ct,Ko,ea,gs,ft,ws,k,ta,El,la,sa,jl,oa,aa,Zl,ia,ra,vs,mt,Ms,dt,zt,Ca,_s,fe,je,Tl,ut,na,Ul,pa,Js,Ze,ca,$l,fa,ma,Es,ht,js,V,da,Ht,ua,ha,bt,Wl,ba,ya,yt,Il,ga,wa,Zs,gt,Ts,me,wt,At,Xa,va,Qt,Ma,_a,vt,Pt,Ga,Ja,qt,Ea,Us;return J=new Jt({}),Z=new ir({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/weighted_prompts.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/weighted_prompts.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/weighted_prompts.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/weighted_prompts.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/weighted_prompts.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/weighted_prompts.ipynb"}]}}),z=new er({props:{$$slots:{default:[rr]},$$scope:{ctx:Et}}}),Ve=new T({props:{code:"JTIzJTIwdW5jb21tZW50JTIwdG8lMjBpbnN0YWxsJTIwaW4lMjBDb2xhYiUwQSUyMyFwaXAlMjBpbnN0YWxsJTIwY29tcGVsJTIwLS11cGdyYWRl",highlighted:`<span class="hljs-comment"># uncomment to install in Colab</span>
<span class="hljs-comment">#!pip install compel --upgrade</span>`}}),xe=new T({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTJDJTIwVW5pUENNdWx0aXN0ZXBTY2hlZHVsZXIlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyQ29tcFZpcyUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNCUyMiUyQyUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUpJTBBcGlwZS5zY2hlZHVsZXIlMjAlM0QlMjBVbmlQQ011bHRpc3RlcFNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlLnNjaGVkdWxlci5jb25maWcpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMHJlZCUyMGNhdCUyMHBsYXlpbmclMjB3aXRoJTIwYSUyMGJhbGwlMjIlMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEJTIyY3B1JTIyKS5tYW51YWxfc2VlZCgzMyklMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDIwKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline, UniPCMultistepScheduler
<span class="hljs-keyword">import</span> torch
pipe = StableDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>, use_safetensors=<span class="hljs-literal">True</span>)
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
prompt = <span class="hljs-string">&quot;a red cat playing with a ball&quot;</span>
generator = torch.Generator(device=<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">33</span>)
image = pipe(prompt, generator=generator, num_inference_steps=<span class="hljs-number">20</span>).images[<span class="hljs-number">0</span>]
image`}}),Se=new Jt({}),Re=new T({props:{code:"ZnJvbSUyMGNvbXBlbCUyMGltcG9ydCUyMENvbXBlbCUwQSUwQWNvbXBlbF9wcm9jJTIwJTNEJTIwQ29tcGVsKHRva2VuaXplciUzRHBpcGUudG9rZW5pemVyJTJDJTIwdGV4dF9lbmNvZGVyJTNEcGlwZS50ZXh0X2VuY29kZXIp",highlighted:`<span class="hljs-keyword">from</span> compel <span class="hljs-keyword">import</span> Compel
compel_proc = Compel(tokenizer=pipe.tokenizer, text_encoder=pipe.text_encoder)`}}),be=new er({props:{$$slots:{default:[nr]},$$scope:{ctx:Et}}}),Fe=new T({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyYSUyMHJlZCUyMGNhdCUyMHBsYXlpbmclMjB3aXRoJTIwYSUyMGJhbGwlMkIlMkIlMjI=",highlighted:'prompt = <span class="hljs-string">&quot;a red cat playing with a ball++&quot;</span>'}}),Ye=new T({props:{code:"cHJvbXB0X2VtYmVkcyUyMCUzRCUyMGNvbXBlbF9wcm9jKHByb21wdCklMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCgzMyklMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0X2VtYmVkcyUzRHByb21wdF9lbWJlZHMlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMjApLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`prompt_embeds = compel_proc(prompt)
generator = torch.manual_seed(<span class="hljs-number">33</span>)
image = pipe(prompt_embeds=prompt_embeds, generator=generator, num_inference_steps=<span class="hljs-number">20</span>).images[<span class="hljs-number">0</span>]
image`}}),He=new T({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyYSUyMHJlZC0tLS0tLS0lMjBjYXQlMjBwbGF5aW5nJTIwd2l0aCUyMGElMjBiYWxsJTIyJTBBcHJvbXB0X2VtYmVkcyUyMCUzRCUyMGNvbXBlbF9wcm9jKHByb21wdCklMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCgzMyklMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0X2VtYmVkcyUzRHByb21wdF9lbWJlZHMlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMjApLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`prompt = <span class="hljs-string">&quot;a red------- cat playing with a ball&quot;</span>
prompt_embeds = compel_proc(prompt)
generator = torch.manual_seed(<span class="hljs-number">33</span>)
image = pipe(prompt_embeds=prompt_embeds, generator=generator, num_inference_steps=<span class="hljs-number">20</span>).images[<span class="hljs-number">0</span>]
image`}}),Qe=new T({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyYSUyMHJlZCUyMGNhdCUyQiUyQiUyMHBsYXlpbmclMjB3aXRoJTIwYSUyMGJhbGwtLS0tJTIyJTBBcHJvbXB0X2VtYmVkcyUyMCUzRCUyMGNvbXBlbF9wcm9jKHByb21wdCklMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCgzMyklMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0X2VtYmVkcyUzRHByb21wdF9lbWJlZHMlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMjApLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`prompt = <span class="hljs-string">&quot;a red cat++ playing with a ball----&quot;</span>
prompt_embeds = compel_proc(prompt)
generator = torch.manual_seed(<span class="hljs-number">33</span>)
image = pipe(prompt_embeds=prompt_embeds, generator=generator, num_inference_steps=<span class="hljs-number">20</span>).images[<span class="hljs-number">0</span>]
image`}}),qe=new Jt({}),Le=new T({props:{code:"cHJvbXB0X2VtYmVkcyUyMCUzRCUyMGNvbXBlbF9wcm9jKCcoJTIyYSUyMHJlZCUyMGNhdCUyMHBsYXlpbmclMjB3aXRoJTIwYSUyMGJhbGwlMjIlMkMlMjAlMjJqdW5nbGUlMjIpLmJsZW5kKDAuNyUyQyUyMDAuOCknKSUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLkdlbmVyYXRvcihkZXZpY2UlM0QlMjJjdWRhJTIyKS5tYW51YWxfc2VlZCgzMyklMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0X2VtYmVkcyUzRHByb21wdF9lbWJlZHMlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMjApLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`prompt_embeds = compel_proc(<span class="hljs-string">&#x27;(&quot;a red cat playing with a ball&quot;, &quot;jungle&quot;).blend(0.7, 0.8)&#x27;</span>)
generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">33</span>)
image = pipe(prompt_embeds=prompt_embeds, generator=generator, num_inference_steps=<span class="hljs-number">20</span>).images[<span class="hljs-number">0</span>]
image`}}),Ke=new Jt({}),et=new T({props:{code:"cHJvbXB0X2VtYmVkcyUyMCUzRCUyMGNvbXBlbF9wcm9jKCclNUIlMjJhJTIwcmVkJTIwY2F0JTIyJTJDJTIwJTIycGxheWluZyUyMHdpdGglMjBhJTIyJTJDJTIwJTIyYmFsbCUyMiU1RC5hbmQoKScpJTBBZ2VuZXJhdG9yJTIwJTNEJTIwdG9yY2guR2VuZXJhdG9yKGRldmljZSUzRCUyMmN1ZGElMjIpLm1hbnVhbF9zZWVkKDU1KSUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHRfZW1iZWRzJTNEcHJvbXB0X2VtYmVkcyUyQyUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyMCkuaW1hZ2VzJTVCMCU1RCUwQWltYWdl",highlighted:`prompt_embeds = compel_proc(<span class="hljs-string">&#x27;[&quot;a red cat&quot;, &quot;playing with a&quot;, &quot;ball&quot;].and()&#x27;</span>)
generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">55</span>)
image = pipe(prompt_embeds=prompt_embeds, generator=generator, num_inference_steps=<span class="hljs-number">20</span>).images[<span class="hljs-number">0</span>]
image`}}),lt=new Jt({}),at=new T({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIwY29tcGVsJTIwaW1wb3J0JTIwQ29tcGVsJTJDJTIwRGlmZnVzZXJzVGV4dHVhbEludmVyc2lvbk1hbmFnZXIlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUyMHZhcmlhbnQlM0QlMjJmcDE2JTIyKS50byglMjJjdWRhJTIyKSUwQXBpcGUubG9hZF90ZXh0dWFsX2ludmVyc2lvbiglMjJzZC1jb25jZXB0cy1saWJyYXJ5JTJGbWlkam91cm5leS1zdHlsZSUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">from</span> compel <span class="hljs-keyword">import</span> Compel, DiffusersTextualInversionManager
pipe = StableDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16, use_safetensors=<span class="hljs-literal">True</span>, variant=<span class="hljs-string">&quot;fp16&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe.load_textual_inversion(<span class="hljs-string">&quot;sd-concepts-library/midjourney-style&quot;</span>)`}}),it=new T({props:{code:"dGV4dHVhbF9pbnZlcnNpb25fbWFuYWdlciUyMCUzRCUyMERpZmZ1c2Vyc1RleHR1YWxJbnZlcnNpb25NYW5hZ2VyKHBpcGUpJTBBY29tcGVsJTIwJTNEJTIwQ29tcGVsKCUwQSUyMCUyMCUyMCUyMHRva2VuaXplciUzRHBpcGUudG9rZW5pemVyJTJDJTBBJTIwJTIwJTIwJTIwdGV4dF9lbmNvZGVyJTNEcGlwZS50ZXh0X2VuY29kZXIlMkMlMEElMjAlMjAlMjAlMjB0ZXh0dWFsX2ludmVyc2lvbl9tYW5hZ2VyJTNEdGV4dHVhbF9pbnZlcnNpb25fbWFuYWdlcik=",highlighted:`textual_inversion_manager = DiffusersTextualInversionManager(pipe)
compel = Compel(
tokenizer=pipe.tokenizer,
text_encoder=pipe.text_encoder,
textual_inversion_manager=textual_inversion_manager)`}}),rt=new T({props:{code:"cHJvbXB0X2VtYmVkcyUyMCUzRCUyMGNvbXBlbF9wcm9jKCcoJTIyQSUyMHJlZCUyMGNhdCUyQiUyQiUyMHBsYXlpbmclMjB3aXRoJTIwYSUyMGJhbGwlMjAlM0NtaWRqb3VybmV5LXN0eWxlJTNFJTIyKScpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKHByb21wdF9lbWJlZHMlM0Rwcm9tcHRfZW1iZWRzKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`prompt_embeds = compel_proc(<span class="hljs-string">&#x27;(&quot;A red cat++ playing with a ball &lt;midjourney-style&gt;&quot;)&#x27;</span>)
image = pipe(prompt_embeds=prompt_embeds).images[<span class="hljs-number">0</span>]
image`}}),pt=new Jt({}),ft=new T({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMkMlMjBVbmlQQ011bHRpc3RlcFNjaGVkdWxlciUwQWZyb20lMjBjb21wZWwlMjBpbXBvcnQlMjBDb21wZWwlMEElMEFwaXBlJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMnNkLWRyZWFtYm9vdGgtbGlicmFyeSUyRmRuZGNvdmVyYXJ0LXYxJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQXBpcGUuc2NoZWR1bGVyJTIwJTNEJTIwVW5pUENNdWx0aXN0ZXBTY2hlZHVsZXIuZnJvbV9jb25maWcocGlwZS5zY2hlZHVsZXIuY29uZmlnKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline, UniPCMultistepScheduler
<span class="hljs-keyword">from</span> compel <span class="hljs-keyword">import</span> Compel
pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;sd-dreambooth-library/dndcoverart-v1&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)`}}),mt=new T({props:{code:"Y29tcGVsX3Byb2MlMjAlM0QlMjBDb21wZWwodG9rZW5pemVyJTNEcGlwZS50b2tlbml6ZXIlMkMlMjB0ZXh0X2VuY29kZXIlM0RwaXBlLnRleHRfZW5jb2RlciklMEFwcm9tcHRfZW1iZWRzJTIwJTNEJTIwY29tcGVsX3Byb2MoJyglMjJtYWdhemluZSUyMGNvdmVyJTIwb2YlMjBhJTIwZG5kY292ZXJhcnQlMjBkcmFnb24lMkMlMjBoaWdoJTIwcXVhbGl0eSUyQyUyMGludHJpY2F0ZSUyMGRldGFpbHMlMkMlMjBsYXJyeSUyMGVsbW9yZSUyMGFydCUyMHN0eWxlJTIyKS5hbmQoKScpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKHByb21wdF9lbWJlZHMlM0Rwcm9tcHRfZW1iZWRzKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`compel_proc = Compel(tokenizer=pipe.tokenizer, text_encoder=pipe.text_encoder)
prompt_embeds = compel_proc(<span class="hljs-string">&#x27;(&quot;magazine cover of a dndcoverart dragon, high quality, intricate details, larry elmore art style&quot;).and()&#x27;</span>)
image = pipe(prompt_embeds=prompt_embeds).images[<span class="hljs-number">0</span>]
image`}}),ut=new Jt({}),ht=new T({props:{code:"ZnJvbSUyMGNvbXBlbCUyMGltcG9ydCUyMENvbXBlbCUyQyUyMFJldHVybmVkRW1iZWRkaW5nc1R5cGUlMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUwQSUyMCUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUlMkMlMEElMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBY29tcGVsJTIwJTNEJTIwQ29tcGVsKCUwQSUyMCUyMHRva2VuaXplciUzRCU1QnBpcGVsaW5lLnRva2VuaXplciUyQyUyMHBpcGVsaW5lLnRva2VuaXplcl8yJTVEJTIwJTJDJTBBJTIwJTIwdGV4dF9lbmNvZGVyJTNEJTVCcGlwZWxpbmUudGV4dF9lbmNvZGVyJTJDJTIwcGlwZWxpbmUudGV4dF9lbmNvZGVyXzIlNUQlMkMlMEElMjAlMjByZXR1cm5lZF9lbWJlZGRpbmdzX3R5cGUlM0RSZXR1cm5lZEVtYmVkZGluZ3NUeXBlLlBFTlVMVElNQVRFX0hJRERFTl9TVEFURVNfTk9OX05PUk1BTElaRUQlMkMlMEElMjAlMjByZXF1aXJlc19wb29sZWQlM0QlNUJGYWxzZSUyQyUyMFRydWUlNUQlMEEp",highlighted:`<span class="hljs-keyword">from</span> compel <span class="hljs-keyword">import</span> Compel, ReturnedEmbeddingsType
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained(
<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
variant=<span class="hljs-string">&quot;fp16&quot;</span>,
use_safetensors=<span class="hljs-literal">True</span>,
torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
compel = Compel(
tokenizer=[pipeline.tokenizer, pipeline.tokenizer_2] ,
text_encoder=[pipeline.text_encoder, pipeline.text_encoder_2],
returned_embeddings_type=ReturnedEmbeddingsType.PENULTIMATE_HIDDEN_STATES_NON_NORMALIZED,
requires_pooled=[<span class="hljs-literal">False</span>, <span class="hljs-literal">True</span>]
)`}}),gt=new T({props:{code:"JTIzJTIwYXBwbHklMjB3ZWlnaHRzJTBBcHJvbXB0JTIwJTNEJTIwJTVCJTIyYSUyMHJlZCUyMGNhdCUyMHBsYXlpbmclMjB3aXRoJTIwYSUyMChiYWxsKTEuNSUyMiUyQyUyMCUyMmElMjByZWQlMjBjYXQlMjBwbGF5aW5nJTIwd2l0aCUyMGElMjAoYmFsbCkwLjYlMjIlNUQlMEFjb25kaXRpb25pbmclMkMlMjBwb29sZWQlMjAlM0QlMjBjb21wZWwocHJvbXB0KSUwQSUwQSUyMyUyMGdlbmVyYXRlJTIwaW1hZ2UlMEFnZW5lcmF0b3IlMjAlM0QlMjAlNUJ0b3JjaC5HZW5lcmF0b3IoKS5tYW51YWxfc2VlZCgzMyklMjBmb3IlMjBfJTIwaW4lMjByYW5nZShsZW4ocHJvbXB0KSklNUQlMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZShwcm9tcHRfZW1iZWRzJTNEY29uZGl0aW9uaW5nJTJDJTIwcG9vbGVkX3Byb21wdF9lbWJlZHMlM0Rwb29sZWQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMzApLmltYWdlcw==",highlighted:`<span class="hljs-comment"># apply weights</span>
prompt = [<span class="hljs-string">&quot;a red cat playing with a (ball)1.5&quot;</span>, <span class="hljs-string">&quot;a red cat playing with a (ball)0.6&quot;</span>]
conditioning, pooled = compel(prompt)
<span class="hljs-comment"># generate image</span>
generator = [torch.Generator().manual_seed(<span class="hljs-number">33</span>) <span class="hljs-keyword">for</span> _ <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-built_in">len</span>(prompt))]
images = pipeline(prompt_embeds=conditioning, pooled_prompt_embeds=pooled, generator=generator, num_inference_steps=<span class="hljs-number">30</span>).images`}}),{c(){d=s("meta"),W=f(),_=s("h1"),j=s("a"),U=s("span"),h(J.$$.fragment),x=f(),$=s("span"),B=a("Prompt weighting"),E=f(),h(Z.$$.fragment),N=f(),C=s("p"),O=a("Prompt weighting provides a way to emphasize or de-emphasize certain parts of a prompt, allowing for more control over the generated image. A prompt can include several concepts, which gets turned into contextualized text embeddings. The embeddings are used by the model to condition its cross-attention layers to generate an image (read the Stable Diffusion "),S=s("a"),We=a("blog post"),K=a(" to learn more about how it works)."),de=f(),M=s("p"),ee=a("Prompt weighting works by increasing or decreasing the scale of the text embedding vector that corresponds to its concept in the prompt because you may not necessarily want the model to focus on all concepts equally. The easiest way to prepare the prompt-weighted embeddings is to use "),D=s("a"),Ie=a("Compel"),te=a(", a text prompt-weighting and blending library. Once you have the prompt-weighted embeddings, you can pass them to any pipeline that has a "),R=s("a"),le=s("code"),se=a("prompt_embeds"),Be=a(" (and optionally "),F=s("a"),Y=s("code"),Ce=a("negative_prompt_embeds"),Xe=a(") parameter, such as "),X=s("a"),u=a("StableDiffusionPipeline"),jt=a(", "),oe=s("a"),Zt=a("StableDiffusionControlNetPipeline"),Tt=a(", and "),ae=s("a"),Ut=a("StableDiffusionXLPipeline"),$t=a("."),Ge=f(),h(z.$$.fragment),ke=f(),Wt=s("p"),zs=a("This guide will show you how to weight and blend your prompts with Compel in \u{1F917} Diffusers."),Cl=f(),It=s("p"),Hs=a("Before you begin, make sure you have the latest version of Compel installed:"),Xl=f(),h(Ve.$$.fragment),Gl=f(),A=s("p"),As=a("For this guide, let\u2019s generate an image with the prompt "),tl=s("code"),Qs=a('"a red cat playing with a ball"'),Ps=a(" using the "),Bt=s("a"),qs=a("StableDiffusionPipeline"),Ls=a(":"),kl=f(),h(xe.$$.fragment),Vl=f(),Ne=s("div"),Ct=s("img"),xl=f(),ie=s("h2"),ue=s("a"),ll=s("span"),h(Se.$$.fragment),Os=f(),sl=s("span"),Ks=a("Weighting"),Nl=f(),he=s("p"),eo=a("You\u2019ll notice there is no \u201Cball\u201D in the image! Let\u2019s use compel to upweight the concept of \u201Cball\u201D in the prompt. Create a "),De=s("a"),ol=s("code"),to=a("Compel"),lo=a(" object, and pass it a tokenizer and text encoder:"),Sl=f(),h(Re.$$.fragment),Dl=f(),Q=s("p"),so=a("compel uses "),al=s("code"),oo=a("+"),ao=a(" or "),il=s("code"),io=a("-"),ro=a(" to increase or decrease the weight of a word in the prompt. To increase the weight of \u201Cball\u201D:"),Rl=f(),h(be.$$.fragment),Fl=f(),h(Fe.$$.fragment),Yl=f(),ye=s("p"),no=a("Pass the prompt to "),rl=s("code"),po=a("compel_proc"),co=a(" to create the new prompt embeddings which are passed to the pipeline:"),zl=f(),h(Ye.$$.fragment),Hl=f(),ze=s("div"),Xt=s("img"),Al=f(),ge=s("p"),fo=a("To downweight parts of the prompt, use the "),nl=s("code"),mo=a("-"),uo=a(" suffix:"),Ql=f(),h(He.$$.fragment),Pl=f(),Ae=s("div"),Gt=s("img"),ql=f(),kt=s("p"),ho=a("You can even up or downweight multiple concepts in the same prompt:"),Ll=f(),h(Qe.$$.fragment),Ol=f(),Pe=s("div"),Vt=s("img"),Kl=f(),re=s("h2"),we=s("a"),pl=s("span"),h(qe.$$.fragment),bo=f(),cl=s("span"),yo=a("Blending"),es=f(),P=s("p"),go=a("You can also create a weighted "),fl=s("em"),wo=a("blend"),vo=a(" of prompts by adding "),ml=s("code"),Mo=a(".blend()"),_o=a(" to a list of prompts and passing it some weights. Your blend may not always produce the result you expect because it breaks some assumptions about how the text encoder functions, so just have fun and experiment with it!"),ts=f(),h(Le.$$.fragment),ls=f(),Oe=s("div"),xt=s("img"),ss=f(),ne=s("h2"),ve=s("a"),dl=s("span"),h(Ke.$$.fragment),Jo=f(),ul=s("span"),Eo=a("Conjunction"),os=f(),Me=s("p"),jo=a("A conjunction diffuses each prompt independently and concatenates their results by their weighted sum. Add "),hl=s("code"),Zo=a(".and()"),To=a(" to the end of a list of prompts to create a conjunction:"),as=f(),h(et.$$.fragment),is=f(),tt=s("div"),Nt=s("img"),rs=f(),pe=s("h2"),_e=s("a"),bl=s("span"),h(lt.$$.fragment),Uo=f(),yl=s("span"),$o=a("Textual inversion"),ns=f(),st=s("p"),St=s("a"),Wo=a("Textual inversion"),Io=a(" is a technique for learning a specific concept from some images which you can use to generate new images conditioned on that concept."),ps=f(),q=s("p"),Bo=a("Create a pipeline and use the "),Dt=s("a"),Co=a("load_textual_inversion()"),Xo=a(" function to load the textual inversion embeddings (feel free to browse the "),ot=s("a"),Go=a("Stable Diffusion Conceptualizer"),ko=a(" for 100+ trained concepts):"),cs=f(),h(at.$$.fragment),fs=f(),G=s("p"),Vo=a("Compel provides a "),gl=s("code"),xo=a("DiffusersTextualInversionManager"),No=a(" class to simplify prompt weighting with textual inversion. Instantiate "),wl=s("code"),So=a("DiffusersTextualInversionManager"),Do=a(" and pass it to the "),vl=s("code"),Ro=a("Compel"),Fo=a(" class:"),ms=f(),h(it.$$.fragment),ds=f(),Je=s("p"),Yo=a("Incorporate the concept to condition a prompt with using the "),Ml=s("code"),zo=a("<concept>"),Ho=a(" syntax:"),us=f(),h(rt.$$.fragment),hs=f(),nt=s("div"),Rt=s("img"),bs=f(),ce=s("h2"),Ee=s("a"),_l=s("span"),h(pt.$$.fragment),Ao=f(),Jl=s("span"),Qo=a("DreamBooth"),ys=f(),H=s("p"),Ft=s("a"),Po=a("DreamBooth"),qo=a(" is a technique for generating contextualized images of a subject given just a few images of the subject to train on. It is similar to textual inversion, but DreamBooth trains the full model whereas textual inversion only fine-tunes the text embeddings. This means you should use "),Yt=s("a"),Lo=a("from_pretrained()"),Oo=a(" to load the DreamBooth model (feel free to browse the "),ct=s("a"),Ko=a("Stable Diffusion Dreambooth Concepts Library"),ea=a(" for 100+ trained models):"),gs=f(),h(ft.$$.fragment),ws=f(),k=s("p"),ta=a("Create a "),El=s("code"),la=a("Compel"),sa=a(" class with a tokenizer and text encoder, and pass your prompt to it. Depending on the model you use, you\u2019ll need to incorporate the model\u2019s unique identifier into your prompt. For example, the "),jl=s("code"),oa=a("dndcoverart-v1"),aa=a(" model uses the identifier "),Zl=s("code"),ia=a("dndcoverart"),ra=a(":"),vs=f(),h(mt.$$.fragment),Ms=f(),dt=s("div"),zt=s("img"),_s=f(),fe=s("h2"),je=s("a"),Tl=s("span"),h(ut.$$.fragment),na=f(),Ul=s("span"),pa=a("Stable Diffusion XL"),Js=f(),Ze=s("p"),ca=a("Stable Diffusion XL (SDXL) has two tokenizers and text encoders so it\u2019s usage is a bit different. To address this, you should pass both tokenizers and encoders to the "),$l=s("code"),fa=a("Compel"),ma=a(" class:"),Es=f(),h(ht.$$.fragment),js=f(),V=s("p"),da=a("This time, let\u2019s upweight \u201Cball\u201D by a factor of 1.5 for the first prompt, and downweight \u201Cball\u201D by 0.6 for the second prompt. The "),Ht=s("a"),ua=a("StableDiffusionXLPipeline"),ha=a(" also requires "),bt=s("a"),Wl=s("code"),ba=a("pooled_prompt_embeds"),ya=a(" (and optionally "),yt=s("a"),Il=s("code"),ga=a("negative_pooled_prompt_embeds"),wa=a(") so you should pass those to the pipeline along with the conditioning tensors:"),Zs=f(),h(gt.$$.fragment),Ts=f(),me=s("div"),wt=s("div"),At=s("img"),va=f(),Qt=s("figcaption"),Ma=a('"a red cat playing with a (ball)1.5"'),_a=f(),vt=s("div"),Pt=s("img"),Ja=f(),qt=s("figcaption"),Ea=a('"a red cat playing with a (ball)0.6"'),this.h()},l(e){const r=or('[data-svelte="svelte-1phssyn"]',document.head);d=o(r,"META",{name:!0,content:!0}),r.forEach(l),W=m(e),_=o(e,"H1",{class:!0});var Mt=n(_);j=o(Mt,"A",{id:!0,class:!0,href:!0});var Bl=n(j);U=o(Bl,"SPAN",{});var ka=n(U);b(J.$$.fragment,ka),ka.forEach(l),Bl.forEach(l),x=m(Mt),$=o(Mt,"SPAN",{});var Va=n($);B=i(Va,"Prompt weighting"),Va.forEach(l),Mt.forEach(l),E=m(e),b(Z.$$.fragment,e),N=m(e),C=o(e,"P",{});var $s=n(C);O=i($s,"Prompt weighting provides a way to emphasize or de-emphasize certain parts of a prompt, allowing for more control over the generated image. A prompt can include several concepts, which gets turned into contextualized text embeddings. The embeddings are used by the model to condition its cross-attention layers to generate an image (read the Stable Diffusion "),S=o($s,"A",{href:!0,rel:!0});var xa=n(S);We=i(xa,"blog post"),xa.forEach(l),K=i($s," to learn more about how it works)."),$s.forEach(l),de=m(e),M=o(e,"P",{});var I=n(M);ee=i(I,"Prompt weighting works by increasing or decreasing the scale of the text embedding vector that corresponds to its concept in the prompt because you may not necessarily want the model to focus on all concepts equally. The easiest way to prepare the prompt-weighted embeddings is to use "),D=o(I,"A",{href:!0,rel:!0});var Na=n(D);Ie=i(Na,"Compel"),Na.forEach(l),te=i(I,", a text prompt-weighting and blending library. Once you have the prompt-weighted embeddings, you can pass them to any pipeline that has a "),R=o(I,"A",{href:!0,rel:!0});var Sa=n(R);le=o(Sa,"CODE",{});var Da=n(le);se=i(Da,"prompt_embeds"),Da.forEach(l),Sa.forEach(l),Be=i(I," (and optionally "),F=o(I,"A",{href:!0,rel:!0});var Ra=n(F);Y=o(Ra,"CODE",{});var Fa=n(Y);Ce=i(Fa,"negative_prompt_embeds"),Fa.forEach(l),Ra.forEach(l),Xe=i(I,") parameter, such as "),X=o(I,"A",{href:!0});var Ya=n(X);u=i(Ya,"StableDiffusionPipeline"),Ya.forEach(l),jt=i(I,", "),oe=o(I,"A",{href:!0});var za=n(oe);Zt=i(za,"StableDiffusionControlNetPipeline"),za.forEach(l),Tt=i(I,", and "),ae=o(I,"A",{href:!0});var Ha=n(ae);Ut=i(Ha,"StableDiffusionXLPipeline"),Ha.forEach(l),$t=i(I,"."),I.forEach(l),Ge=m(e),b(z.$$.fragment,e),ke=m(e),Wt=o(e,"P",{});var Aa=n(Wt);zs=i(Aa,"This guide will show you how to weight and blend your prompts with Compel in \u{1F917} Diffusers."),Aa.forEach(l),Cl=m(e),It=o(e,"P",{});var Qa=n(It);Hs=i(Qa,"Before you begin, make sure you have the latest version of Compel installed:"),Qa.forEach(l),Xl=m(e),b(Ve.$$.fragment,e),Gl=m(e),A=o(e,"P",{});var Lt=n(A);As=i(Lt,"For this guide, let\u2019s generate an image with the prompt "),tl=o(Lt,"CODE",{});var Pa=n(tl);Qs=i(Pa,'"a red cat playing with a ball"'),Pa.forEach(l),Ps=i(Lt," using the "),Bt=o(Lt,"A",{href:!0});var qa=n(Bt);qs=i(qa,"StableDiffusionPipeline"),qa.forEach(l),Ls=i(Lt,":"),Lt.forEach(l),kl=m(e),b(xe.$$.fragment,e),Vl=m(e),Ne=o(e,"DIV",{class:!0});var La=n(Ne);Ct=o(La,"IMG",{class:!0,src:!0}),La.forEach(l),xl=m(e),ie=o(e,"H2",{class:!0});var Ws=n(ie);ue=o(Ws,"A",{id:!0,class:!0,href:!0});var Oa=n(ue);ll=o(Oa,"SPAN",{});var Ka=n(ll);b(Se.$$.fragment,Ka),Ka.forEach(l),Oa.forEach(l),Os=m(Ws),sl=o(Ws,"SPAN",{});var ei=n(sl);Ks=i(ei,"Weighting"),ei.forEach(l),Ws.forEach(l),Nl=m(e),he=o(e,"P",{});var Is=n(he);eo=i(Is,"You\u2019ll notice there is no \u201Cball\u201D in the image! Let\u2019s use compel to upweight the concept of \u201Cball\u201D in the prompt. Create a "),De=o(Is,"A",{href:!0,rel:!0});var ti=n(De);ol=o(ti,"CODE",{});var li=n(ol);to=i(li,"Compel"),li.forEach(l),ti.forEach(l),lo=i(Is," object, and pass it a tokenizer and text encoder:"),Is.forEach(l),Sl=m(e),b(Re.$$.fragment,e),Dl=m(e),Q=o(e,"P",{});var Ot=n(Q);so=i(Ot,"compel uses "),al=o(Ot,"CODE",{});var si=n(al);oo=i(si,"+"),si.forEach(l),ao=i(Ot," or "),il=o(Ot,"CODE",{});var oi=n(il);io=i(oi,"-"),oi.forEach(l),ro=i(Ot," to increase or decrease the weight of a word in the prompt. To increase the weight of \u201Cball\u201D:"),Ot.forEach(l),Rl=m(e),b(be.$$.fragment,e),Fl=m(e),b(Fe.$$.fragment,e),Yl=m(e),ye=o(e,"P",{});var Bs=n(ye);no=i(Bs,"Pass the prompt to "),rl=o(Bs,"CODE",{});var ai=n(rl);po=i(ai,"compel_proc"),ai.forEach(l),co=i(Bs," to create the new prompt embeddings which are passed to the pipeline:"),Bs.forEach(l),zl=m(e),b(Ye.$$.fragment,e),Hl=m(e),ze=o(e,"DIV",{class:!0});var ii=n(ze);Xt=o(ii,"IMG",{class:!0,src:!0}),ii.forEach(l),Al=m(e),ge=o(e,"P",{});var Cs=n(ge);fo=i(Cs,"To downweight parts of the prompt, use the "),nl=o(Cs,"CODE",{});var ri=n(nl);mo=i(ri,"-"),ri.forEach(l),uo=i(Cs," suffix:"),Cs.forEach(l),Ql=m(e),b(He.$$.fragment,e),Pl=m(e),Ae=o(e,"DIV",{class:!0});var ni=n(Ae);Gt=o(ni,"IMG",{class:!0,src:!0}),ni.forEach(l),ql=m(e),kt=o(e,"P",{});var pi=n(kt);ho=i(pi,"You can even up or downweight multiple concepts in the same prompt:"),pi.forEach(l),Ll=m(e),b(Qe.$$.fragment,e),Ol=m(e),Pe=o(e,"DIV",{class:!0});var ci=n(Pe);Vt=o(ci,"IMG",{class:!0,src:!0}),ci.forEach(l),Kl=m(e),re=o(e,"H2",{class:!0});var Xs=n(re);we=o(Xs,"A",{id:!0,class:!0,href:!0});var fi=n(we);pl=o(fi,"SPAN",{});var mi=n(pl);b(qe.$$.fragment,mi),mi.forEach(l),fi.forEach(l),bo=m(Xs),cl=o(Xs,"SPAN",{});var di=n(cl);yo=i(di,"Blending"),di.forEach(l),Xs.forEach(l),es=m(e),P=o(e,"P",{});var Kt=n(P);go=i(Kt,"You can also create a weighted "),fl=o(Kt,"EM",{});var ui=n(fl);wo=i(ui,"blend"),ui.forEach(l),vo=i(Kt," of prompts by adding "),ml=o(Kt,"CODE",{});var hi=n(ml);Mo=i(hi,".blend()"),hi.forEach(l),_o=i(Kt," to a list of prompts and passing it some weights. Your blend may not always produce the result you expect because it breaks some assumptions about how the text encoder functions, so just have fun and experiment with it!"),Kt.forEach(l),ts=m(e),b(Le.$$.fragment,e),ls=m(e),Oe=o(e,"DIV",{class:!0});var bi=n(Oe);xt=o(bi,"IMG",{class:!0,src:!0}),bi.forEach(l),ss=m(e),ne=o(e,"H2",{class:!0});var Gs=n(ne);ve=o(Gs,"A",{id:!0,class:!0,href:!0});var yi=n(ve);dl=o(yi,"SPAN",{});var gi=n(dl);b(Ke.$$.fragment,gi),gi.forEach(l),yi.forEach(l),Jo=m(Gs),ul=o(Gs,"SPAN",{});var wi=n(ul);Eo=i(wi,"Conjunction"),wi.forEach(l),Gs.forEach(l),os=m(e),Me=o(e,"P",{});var ks=n(Me);jo=i(ks,"A conjunction diffuses each prompt independently and concatenates their results by their weighted sum. Add "),hl=o(ks,"CODE",{});var vi=n(hl);Zo=i(vi,".and()"),vi.forEach(l),To=i(ks," to the end of a list of prompts to create a conjunction:"),ks.forEach(l),as=m(e),b(et.$$.fragment,e),is=m(e),tt=o(e,"DIV",{class:!0});var Mi=n(tt);Nt=o(Mi,"IMG",{class:!0,src:!0}),Mi.forEach(l),rs=m(e),pe=o(e,"H2",{class:!0});var Vs=n(pe);_e=o(Vs,"A",{id:!0,class:!0,href:!0});var _i=n(_e);bl=o(_i,"SPAN",{});var Ji=n(bl);b(lt.$$.fragment,Ji),Ji.forEach(l),_i.forEach(l),Uo=m(Vs),yl=o(Vs,"SPAN",{});var Ei=n(yl);$o=i(Ei,"Textual inversion"),Ei.forEach(l),Vs.forEach(l),ns=m(e),st=o(e,"P",{});var ja=n(st);St=o(ja,"A",{href:!0});var ji=n(St);Wo=i(ji,"Textual inversion"),ji.forEach(l),Io=i(ja," is a technique for learning a specific concept from some images which you can use to generate new images conditioned on that concept."),ja.forEach(l),ps=m(e),q=o(e,"P",{});var el=n(q);Bo=i(el,"Create a pipeline and use the "),Dt=o(el,"A",{href:!0});var Zi=n(Dt);Co=i(Zi,"load_textual_inversion()"),Zi.forEach(l),Xo=i(el," function to load the textual inversion embeddings (feel free to browse the "),ot=o(el,"A",{href:!0,rel:!0});var Ti=n(ot);Go=i(Ti,"Stable Diffusion Conceptualizer"),Ti.forEach(l),ko=i(el," for 100+ trained concepts):"),el.forEach(l),cs=m(e),b(at.$$.fragment,e),fs=m(e),G=o(e,"P",{});var Te=n(G);Vo=i(Te,"Compel provides a "),gl=o(Te,"CODE",{});var Ui=n(gl);xo=i(Ui,"DiffusersTextualInversionManager"),Ui.forEach(l),No=i(Te," class to simplify prompt weighting with textual inversion. Instantiate "),wl=o(Te,"CODE",{});var $i=n(wl);So=i($i,"DiffusersTextualInversionManager"),$i.forEach(l),Do=i(Te," and pass it to the "),vl=o(Te,"CODE",{});var Wi=n(vl);Ro=i(Wi,"Compel"),Wi.forEach(l),Fo=i(Te," class:"),Te.forEach(l),ms=m(e),b(it.$$.fragment,e),ds=m(e),Je=o(e,"P",{});var xs=n(Je);Yo=i(xs,"Incorporate the concept to condition a prompt with using the "),Ml=o(xs,"CODE",{});var Ii=n(Ml);zo=i(Ii,"<concept>"),Ii.forEach(l),Ho=i(xs," syntax:"),xs.forEach(l),us=m(e),b(rt.$$.fragment,e),hs=m(e),nt=o(e,"DIV",{class:!0});var Bi=n(nt);Rt=o(Bi,"IMG",{class:!0,src:!0}),Bi.forEach(l),bs=m(e),ce=o(e,"H2",{class:!0});var Ns=n(ce);Ee=o(Ns,"A",{id:!0,class:!0,href:!0});var Ci=n(Ee);_l=o(Ci,"SPAN",{});var Xi=n(_l);b(pt.$$.fragment,Xi),Xi.forEach(l),Ci.forEach(l),Ao=m(Ns),Jl=o(Ns,"SPAN",{});var Gi=n(Jl);Qo=i(Gi,"DreamBooth"),Gi.forEach(l),Ns.forEach(l),ys=m(e),H=o(e,"P",{});var _t=n(H);Ft=o(_t,"A",{href:!0});var ki=n(Ft);Po=i(ki,"DreamBooth"),ki.forEach(l),qo=i(_t," is a technique for generating contextualized images of a subject given just a few images of the subject to train on. It is similar to textual inversion, but DreamBooth trains the full model whereas textual inversion only fine-tunes the text embeddings. This means you should use "),Yt=o(_t,"A",{href:!0});var Vi=n(Yt);Lo=i(Vi,"from_pretrained()"),Vi.forEach(l),Oo=i(_t," to load the DreamBooth model (feel free to browse the "),ct=o(_t,"A",{href:!0,rel:!0});var xi=n(ct);Ko=i(xi,"Stable Diffusion Dreambooth Concepts Library"),xi.forEach(l),ea=i(_t," for 100+ trained models):"),_t.forEach(l),gs=m(e),b(ft.$$.fragment,e),ws=m(e),k=o(e,"P",{});var Ue=n(k);ta=i(Ue,"Create a "),El=o(Ue,"CODE",{});var Ni=n(El);la=i(Ni,"Compel"),Ni.forEach(l),sa=i(Ue," class with a tokenizer and text encoder, and pass your prompt to it. Depending on the model you use, you\u2019ll need to incorporate the model\u2019s unique identifier into your prompt. For example, the "),jl=o(Ue,"CODE",{});var Si=n(jl);oa=i(Si,"dndcoverart-v1"),Si.forEach(l),aa=i(Ue," model uses the identifier "),Zl=o(Ue,"CODE",{});var Di=n(Zl);ia=i(Di,"dndcoverart"),Di.forEach(l),ra=i(Ue,":"),Ue.forEach(l),vs=m(e),b(mt.$$.fragment,e),Ms=m(e),dt=o(e,"DIV",{class:!0});var Ri=n(dt);zt=o(Ri,"IMG",{class:!0,src:!0}),Ri.forEach(l),_s=m(e),fe=o(e,"H2",{class:!0});var Ss=n(fe);je=o(Ss,"A",{id:!0,class:!0,href:!0});var Fi=n(je);Tl=o(Fi,"SPAN",{});var Yi=n(Tl);b(ut.$$.fragment,Yi),Yi.forEach(l),Fi.forEach(l),na=m(Ss),Ul=o(Ss,"SPAN",{});var zi=n(Ul);pa=i(zi,"Stable Diffusion XL"),zi.forEach(l),Ss.forEach(l),Js=m(e),Ze=o(e,"P",{});var Ds=n(Ze);ca=i(Ds,"Stable Diffusion XL (SDXL) has two tokenizers and text encoders so it\u2019s usage is a bit different. To address this, you should pass both tokenizers and encoders to the "),$l=o(Ds,"CODE",{});var Hi=n($l);fa=i(Hi,"Compel"),Hi.forEach(l),ma=i(Ds," class:"),Ds.forEach(l),Es=m(e),b(ht.$$.fragment,e),js=m(e),V=o(e,"P",{});var $e=n(V);da=i($e,"This time, let\u2019s upweight \u201Cball\u201D by a factor of 1.5 for the first prompt, and downweight \u201Cball\u201D by 0.6 for the second prompt. The "),Ht=o($e,"A",{href:!0});var Ai=n(Ht);ua=i(Ai,"StableDiffusionXLPipeline"),Ai.forEach(l),ha=i($e," also requires "),bt=o($e,"A",{href:!0,rel:!0});var Qi=n(bt);Wl=o(Qi,"CODE",{});var Pi=n(Wl);ba=i(Pi,"pooled_prompt_embeds"),Pi.forEach(l),Qi.forEach(l),ya=i($e," (and optionally "),yt=o($e,"A",{href:!0,rel:!0});var qi=n(yt);Il=o(qi,"CODE",{});var Li=n(Il);ga=i(Li,"negative_pooled_prompt_embeds"),Li.forEach(l),qi.forEach(l),wa=i($e,") so you should pass those to the pipeline along with the conditioning tensors:"),$e.forEach(l),Zs=m(e),b(gt.$$.fragment,e),Ts=m(e),me=o(e,"DIV",{class:!0});var Rs=n(me);wt=o(Rs,"DIV",{});var Fs=n(wt);At=o(Fs,"IMG",{class:!0,src:!0}),va=m(Fs),Qt=o(Fs,"FIGCAPTION",{class:!0});var Oi=n(Qt);Ma=i(Oi,'"a red cat playing with a (ball)1.5"'),Oi.forEach(l),Fs.forEach(l),_a=m(Rs),vt=o(Rs,"DIV",{});var Ys=n(vt);Pt=o(Ys,"IMG",{class:!0,src:!0}),Ja=m(Ys),qt=o(Ys,"FIGCAPTION",{class:!0});var Ki=n(qt);Ea=i(Ki,'"a red cat playing with a (ball)0.6"'),Ki.forEach(l),Ys.forEach(l),Rs.forEach(l),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(cr)),c(j,"id","prompt-weighting"),c(j,"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"),c(j,"href","#prompt-weighting"),c(_,"class","relative group"),c(S,"href","https://huggingface.co/blog/stable_diffusion"),c(S,"rel","nofollow"),c(D,"href","https://github.com/damian0815/compel"),c(D,"rel","nofollow"),c(R,"href","https://huggingface.co/docs/diffusers/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.__call__.prompt_embeds"),c(R,"rel","nofollow"),c(F,"href","https://huggingface.co/docs/diffusers/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.__call__.negative_prompt_embeds"),c(F,"rel","nofollow"),c(X,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),c(oe,"href","/docs/diffusers/main/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetPipeline"),c(ae,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLPipeline"),c(Bt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),c(Ct,"class","rounded-xl"),L(Ct.src,Za="https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/compel/forest_0.png")||c(Ct,"src",Za),c(Ne,"class","flex justify-center"),c(ue,"id","weighting"),c(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"),c(ue,"href","#weighting"),c(ie,"class","relative group"),c(De,"href","https://github.com/damian0815/compel/blob/main/doc/compel.md#compel-objects"),c(De,"rel","nofollow"),c(Xt,"class","rounded-xl"),L(Xt.src,Ta="https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/compel/forest_1.png")||c(Xt,"src",Ta),c(ze,"class","flex justify-center"),c(Gt,"class","rounded-xl"),L(Gt.src,Ua="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/compel-neg.png")||c(Gt,"src",Ua),c(Ae,"class","flex justify-center"),c(Vt,"class","rounded-xl"),L(Vt.src,$a="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/compel-pos-neg.png")||c(Vt,"src",$a),c(Pe,"class","flex justify-center"),c(we,"id","blending"),c(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"),c(we,"href","#blending"),c(re,"class","relative group"),c(xt,"class","rounded-xl"),L(xt.src,Wa="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/compel-blend.png")||c(xt,"src",Wa),c(Oe,"class","flex justify-center"),c(ve,"id","conjunction"),c(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"),c(ve,"href","#conjunction"),c(ne,"class","relative group"),c(Nt,"class","rounded-xl"),L(Nt.src,Ia="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/compel-conj.png")||c(Nt,"src",Ia),c(tt,"class","flex justify-center"),c(_e,"id","textual-inversion"),c(_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"),c(_e,"href","#textual-inversion"),c(pe,"class","relative group"),c(St,"href","../training/text_inversion"),c(Dt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),c(ot,"href","https://huggingface.co/spaces/sd-concepts-library/stable-diffusion-conceptualizer"),c(ot,"rel","nofollow"),c(Rt,"class","rounded-xl"),L(Rt.src,Ba="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/compel-text-inversion.png")||c(Rt,"src",Ba),c(nt,"class","flex justify-center"),c(Ee,"id","dreambooth"),c(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"),c(Ee,"href","#dreambooth"),c(ce,"class","relative group"),c(Ft,"href","../training/dreambooth"),c(Yt,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained"),c(ct,"href","https://huggingface.co/sd-dreambooth-library"),c(ct,"rel","nofollow"),c(zt,"class","rounded-xl"),L(zt.src,Ca="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/compel-dreambooth.png")||c(zt,"src",Ca),c(dt,"class","flex justify-center"),c(je,"id","stable-diffusion-xl"),c(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"),c(je,"href","#stable-diffusion-xl"),c(fe,"class","relative group"),c(Ht,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLPipeline"),c(bt,"href","https://huggingface.co/docs/diffusers/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLInpaintPipeline.__call__.pooled_prompt_embeds"),c(bt,"rel","nofollow"),c(yt,"href","https://huggingface.co/docs/diffusers/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLInpaintPipeline.__call__.negative_pooled_prompt_embeds"),c(yt,"rel","nofollow"),c(At,"class","rounded-xl"),L(At.src,Xa="https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/compel/sdxl_ball1.png")||c(At,"src",Xa),c(Qt,"class","mt-2 text-center text-sm text-gray-500"),c(Pt,"class","rounded-xl"),L(Pt.src,Ga="https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/compel/sdxl_ball2.png")||c(Pt,"src",Ga),c(qt,"class","mt-2 text-center text-sm text-gray-500"),c(me,"class","flex gap-4")},m(e,r){t(document.head,d),p(e,W,r),p(e,_,r),t(_,j),t(j,U),y(J,U,null),t(_,x),t(_,$),t($,B),p(e,E,r),y(Z,e,r),p(e,N,r),p(e,C,r),t(C,O),t(C,S),t(S,We),t(C,K),p(e,de,r),p(e,M,r),t(M,ee),t(M,D),t(D,Ie),t(M,te),t(M,R),t(R,le),t(le,se),t(M,Be),t(M,F),t(F,Y),t(Y,Ce),t(M,Xe),t(M,X),t(X,u),t(M,jt),t(M,oe),t(oe,Zt),t(M,Tt),t(M,ae),t(ae,Ut),t(M,$t),p(e,Ge,r),y(z,e,r),p(e,ke,r),p(e,Wt,r),t(Wt,zs),p(e,Cl,r),p(e,It,r),t(It,Hs),p(e,Xl,r),y(Ve,e,r),p(e,Gl,r),p(e,A,r),t(A,As),t(A,tl),t(tl,Qs),t(A,Ps),t(A,Bt),t(Bt,qs),t(A,Ls),p(e,kl,r),y(xe,e,r),p(e,Vl,r),p(e,Ne,r),t(Ne,Ct),p(e,xl,r),p(e,ie,r),t(ie,ue),t(ue,ll),y(Se,ll,null),t(ie,Os),t(ie,sl),t(sl,Ks),p(e,Nl,r),p(e,he,r),t(he,eo),t(he,De),t(De,ol),t(ol,to),t(he,lo),p(e,Sl,r),y(Re,e,r),p(e,Dl,r),p(e,Q,r),t(Q,so),t(Q,al),t(al,oo),t(Q,ao),t(Q,il),t(il,io),t(Q,ro),p(e,Rl,r),y(be,e,r),p(e,Fl,r),y(Fe,e,r),p(e,Yl,r),p(e,ye,r),t(ye,no),t(ye,rl),t(rl,po),t(ye,co),p(e,zl,r),y(Ye,e,r),p(e,Hl,r),p(e,ze,r),t(ze,Xt),p(e,Al,r),p(e,ge,r),t(ge,fo),t(ge,nl),t(nl,mo),t(ge,uo),p(e,Ql,r),y(He,e,r),p(e,Pl,r),p(e,Ae,r),t(Ae,Gt),p(e,ql,r),p(e,kt,r),t(kt,ho),p(e,Ll,r),y(Qe,e,r),p(e,Ol,r),p(e,Pe,r),t(Pe,Vt),p(e,Kl,r),p(e,re,r),t(re,we),t(we,pl),y(qe,pl,null),t(re,bo),t(re,cl),t(cl,yo),p(e,es,r),p(e,P,r),t(P,go),t(P,fl),t(fl,wo),t(P,vo),t(P,ml),t(ml,Mo),t(P,_o),p(e,ts,r),y(Le,e,r),p(e,ls,r),p(e,Oe,r),t(Oe,xt),p(e,ss,r),p(e,ne,r),t(ne,ve),t(ve,dl),y(Ke,dl,null),t(ne,Jo),t(ne,ul),t(ul,Eo),p(e,os,r),p(e,Me,r),t(Me,jo),t(Me,hl),t(hl,Zo),t(Me,To),p(e,as,r),y(et,e,r),p(e,is,r),p(e,tt,r),t(tt,Nt),p(e,rs,r),p(e,pe,r),t(pe,_e),t(_e,bl),y(lt,bl,null),t(pe,Uo),t(pe,yl),t(yl,$o),p(e,ns,r),p(e,st,r),t(st,St),t(St,Wo),t(st,Io),p(e,ps,r),p(e,q,r),t(q,Bo),t(q,Dt),t(Dt,Co),t(q,Xo),t(q,ot),t(ot,Go),t(q,ko),p(e,cs,r),y(at,e,r),p(e,fs,r),p(e,G,r),t(G,Vo),t(G,gl),t(gl,xo),t(G,No),t(G,wl),t(wl,So),t(G,Do),t(G,vl),t(vl,Ro),t(G,Fo),p(e,ms,r),y(it,e,r),p(e,ds,r),p(e,Je,r),t(Je,Yo),t(Je,Ml),t(Ml,zo),t(Je,Ho),p(e,us,r),y(rt,e,r),p(e,hs,r),p(e,nt,r),t(nt,Rt),p(e,bs,r),p(e,ce,r),t(ce,Ee),t(Ee,_l),y(pt,_l,null),t(ce,Ao),t(ce,Jl),t(Jl,Qo),p(e,ys,r),p(e,H,r),t(H,Ft),t(Ft,Po),t(H,qo),t(H,Yt),t(Yt,Lo),t(H,Oo),t(H,ct),t(ct,Ko),t(H,ea),p(e,gs,r),y(ft,e,r),p(e,ws,r),p(e,k,r),t(k,ta),t(k,El),t(El,la),t(k,sa),t(k,jl),t(jl,oa),t(k,aa),t(k,Zl),t(Zl,ia),t(k,ra),p(e,vs,r),y(mt,e,r),p(e,Ms,r),p(e,dt,r),t(dt,zt),p(e,_s,r),p(e,fe,r),t(fe,je),t(je,Tl),y(ut,Tl,null),t(fe,na),t(fe,Ul),t(Ul,pa),p(e,Js,r),p(e,Ze,r),t(Ze,ca),t(Ze,$l),t($l,fa),t(Ze,ma),p(e,Es,r),y(ht,e,r),p(e,js,r),p(e,V,r),t(V,da),t(V,Ht),t(Ht,ua),t(V,ha),t(V,bt),t(bt,Wl),t(Wl,ba),t(V,ya),t(V,yt),t(yt,Il),t(Il,ga),t(V,wa),p(e,Zs,r),y(gt,e,r),p(e,Ts,r),p(e,me,r),t(me,wt),t(wt,At),t(wt,va),t(wt,Qt),t(Qt,Ma),t(me,_a),t(me,vt),t(vt,Pt),t(vt,Ja),t(vt,qt),t(qt,Ea),Us=!0},p(e,[r]){const Mt={};r&2&&(Mt.$$scope={dirty:r,ctx:e}),z.$set(Mt);const Bl={};r&2&&(Bl.$$scope={dirty:r,ctx:e}),be.$set(Bl)},i(e){Us||(g(J.$$.fragment,e),g(Z.$$.fragment,e),g(z.$$.fragment,e),g(Ve.$$.fragment,e),g(xe.$$.fragment,e),g(Se.$$.fragment,e),g(Re.$$.fragment,e),g(be.$$.fragment,e),g(Fe.$$.fragment,e),g(Ye.$$.fragment,e),g(He.$$.fragment,e),g(Qe.$$.fragment,e),g(qe.$$.fragment,e),g(Le.$$.fragment,e),g(Ke.$$.fragment,e),g(et.$$.fragment,e),g(lt.$$.fragment,e),g(at.$$.fragment,e),g(it.$$.fragment,e),g(rt.$$.fragment,e),g(pt.$$.fragment,e),g(ft.$$.fragment,e),g(mt.$$.fragment,e),g(ut.$$.fragment,e),g(ht.$$.fragment,e),g(gt.$$.fragment,e),Us=!0)},o(e){w(J.$$.fragment,e),w(Z.$$.fragment,e),w(z.$$.fragment,e),w(Ve.$$.fragment,e),w(xe.$$.fragment,e),w(Se.$$.fragment,e),w(Re.$$.fragment,e),w(be.$$.fragment,e),w(Fe.$$.fragment,e),w(Ye.$$.fragment,e),w(He.$$.fragment,e),w(Qe.$$.fragment,e),w(qe.$$.fragment,e),w(Le.$$.fragment,e),w(Ke.$$.fragment,e),w(et.$$.fragment,e),w(lt.$$.fragment,e),w(at.$$.fragment,e),w(it.$$.fragment,e),w(rt.$$.fragment,e),w(pt.$$.fragment,e),w(ft.$$.fragment,e),w(mt.$$.fragment,e),w(ut.$$.fragment,e),w(ht.$$.fragment,e),w(gt.$$.fragment,e),Us=!1},d(e){l(d),e&&l(W),e&&l(_),v(J),e&&l(E),v(Z,e),e&&l(N),e&&l(C),e&&l(de),e&&l(M),e&&l(Ge),v(z,e),e&&l(ke),e&&l(Wt),e&&l(Cl),e&&l(It),e&&l(Xl),v(Ve,e),e&&l(Gl),e&&l(A),e&&l(kl),v(xe,e),e&&l(Vl),e&&l(Ne),e&&l(xl),e&&l(ie),v(Se),e&&l(Nl),e&&l(he),e&&l(Sl),v(Re,e),e&&l(Dl),e&&l(Q),e&&l(Rl),v(be,e),e&&l(Fl),v(Fe,e),e&&l(Yl),e&&l(ye),e&&l(zl),v(Ye,e),e&&l(Hl),e&&l(ze),e&&l(Al),e&&l(ge),e&&l(Ql),v(He,e),e&&l(Pl),e&&l(Ae),e&&l(ql),e&&l(kt),e&&l(Ll),v(Qe,e),e&&l(Ol),e&&l(Pe),e&&l(Kl),e&&l(re),v(qe),e&&l(es),e&&l(P),e&&l(ts),v(Le,e),e&&l(ls),e&&l(Oe),e&&l(ss),e&&l(ne),v(Ke),e&&l(os),e&&l(Me),e&&l(as),v(et,e),e&&l(is),e&&l(tt),e&&l(rs),e&&l(pe),v(lt),e&&l(ns),e&&l(st),e&&l(ps),e&&l(q),e&&l(cs),v(at,e),e&&l(fs),e&&l(G),e&&l(ms),v(it,e),e&&l(ds),e&&l(Je),e&&l(us),v(rt,e),e&&l(hs),e&&l(nt),e&&l(bs),e&&l(ce),v(pt),e&&l(ys),e&&l(H),e&&l(gs),v(ft,e),e&&l(ws),e&&l(k),e&&l(vs),v(mt,e),e&&l(Ms),e&&l(dt),e&&l(_s),e&&l(fe),v(ut),e&&l(Js),e&&l(Ze),e&&l(Es),v(ht,e),e&&l(js),e&&l(V),e&&l(Zs),v(gt,e),e&&l(Ts),e&&l(me)}}}const cr={local:"prompt-weighting",sections:[{local:"weighting",title:"Weighting"},{local:"blending",title:"Blending"},{local:"conjunction",title:"Conjunction"},{local:"textual-inversion",title:"Textual inversion"},{local:"dreambooth",title:"DreamBooth"},{local:"stable-diffusion-xl",title:"Stable Diffusion XL"}],title:"Prompt weighting"};function fr(Et){return ar(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class yr extends tr{constructor(d){super();lr(this,d,fr,pr,sr,{})}}export{yr as default,cr as metadata};

Xet Storage Details

Size:
50 kB
·
Xet hash:
b71433d55811d25ed9b4beaf8f104eead8b53f10ed737d4ff8d6593724d8e7c0

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