import{S as zs,i as Fs,s as Hs,e as s,k as r,w as v,t as d,M as Bs,c as a,d as n,m as l,a as i,x,h as c,b as o,G as e,g as f,y as A,q as w,o as E,B as y,v as Ws,L as Rs}from"../../../../chunks/vendor-hf-doc-builder.js";import{D as Se}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Vs}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as it}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ks}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Js(ot){let m,M,b,g,k;return g=new Vs({props:{code:`import torch
from diffusers import StableDiffusionAttendAndExcitePipeline

pipe = StableDiffusionAttendAndExcitePipeline.from_pretrained(
    "CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16
).to("cuda")


prompt = "a cat and a frog"

# use get_indices function to find out indices of the tokens you want to alter
pipe.get_indices(prompt)

token_indices = [2, 5]
seed = 6141
generator = torch.Generator("cuda").manual_seed(seed)

images = pipe(
    prompt=prompt,
    token_indices=token_indices,
    guidance_scale=7.5,
    generator=generator,
    num_inference_steps=50,
    max_iter_to_alter=25,
).images

image = images[0]
image.save(f"../images/{prompt}_{seed}.png")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionAttendAndExcitePipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionAttendAndExcitePipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a cat and a frog&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># use get_indices function to find out indices of the tokens you want to alter</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.get_indices(prompt)
{<span class="hljs-number">0</span>: <span class="hljs-string">&#x27;&lt;|startoftext|&gt;&#x27;</span>, <span class="hljs-number">1</span>: <span class="hljs-string">&#x27;a&lt;/w&gt;&#x27;</span>, <span class="hljs-number">2</span>: <span class="hljs-string">&#x27;cat&lt;/w&gt;&#x27;</span>, <span class="hljs-number">3</span>: <span class="hljs-string">&#x27;and&lt;/w&gt;&#x27;</span>, <span class="hljs-number">4</span>: <span class="hljs-string">&#x27;a&lt;/w&gt;&#x27;</span>, <span class="hljs-number">5</span>: <span class="hljs-string">&#x27;frog&lt;/w&gt;&#x27;</span>, <span class="hljs-number">6</span>: <span class="hljs-string">&#x27;&lt;|endoftext|&gt;&#x27;</span>}

<span class="hljs-meta">&gt;&gt;&gt; </span>token_indices = [<span class="hljs-number">2</span>, <span class="hljs-number">5</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>seed = <span class="hljs-number">6141</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generator = torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(seed)

<span class="hljs-meta">&gt;&gt;&gt; </span>images = pipe(
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    token_indices=token_indices,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">7.5</span>,
<span class="hljs-meta">... </span>    generator=generator,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">50</span>,
<span class="hljs-meta">... </span>    max_iter_to_alter=<span class="hljs-number">25</span>,
<span class="hljs-meta">... </span>).images

<span class="hljs-meta">&gt;&gt;&gt; </span>image = images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">f&quot;../images/<span class="hljs-subst">{prompt}</span>_<span class="hljs-subst">{seed}</span>.png&quot;</span>)`}}),{c(){m=s("p"),M=d("Examples:"),b=r(),v(g.$$.fragment)},l(u){m=a(u,"P",{});var S=i(m);M=c(S,"Examples:"),S.forEach(n),b=l(u),x(g.$$.fragment,u)},m(u,S){f(u,m,S),e(m,M),f(u,b,S),A(g,u,S),k=!0},p:Rs,i(u){k||(w(g.$$.fragment,u),k=!0)},o(u){E(g.$$.fragment,u),k=!1},d(u){u&&n(m),u&&n(b),y(g,u)}}}function Ys(ot){let m,M,b,g,k,u,S,je,Tt,rt,C,G,Te,Q,Ct,Ce,It,lt,O,Lt,X,qt,Nt,dt,be,Mt,ct,ve,Ie,Gt,pt,xe,Ot,ft,P,Le,Z,Ut,Vt,qe,ee,zt,Ft,Ne,te,Ht,Bt,Me,ne,Wt,ut,I,U,Ge,se,Rt,Oe,Kt,ht,V,Ue,$,Ve,Jt,Yt,ze,Qt,Xt,Ae,Zt,en,we,tn,nn,Fe,D,He,ae,sn,an,Be,We,on,rn,Ee,ln,dn,ye,ie,cn,mt,L,z,Re,oe,pn,Ke,fn,gt,re,_t,q,F,Je,le,un,Ye,hn,bt,h,de,mn,Qe,gn,_n,ce,bn,Pe,vn,xn,An,j,pe,wn,Xe,En,yn,H,Pn,B,fe,$n,ue,Dn,Ze,kn,Sn,jn,W,he,Tn,N,Cn,et,In,Ln,tt,qn,Nn,Mn,T,me,Gn,nt,On,Un,st,Vn,zn,R,ge,Fn,at,Hn,vt;return u=new it({}),Q=new it({}),se=new it({}),oe=new it({}),re=new Vs({props:{code:`import torch
from diffusers import StableDiffusionAttendAndExcitePipeline

model_id = "CompVis/stable-diffusion-v1-4"
pipe = StableDiffusionAttendAndExcitePipeline.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda")
pipe = pipe.to("cuda")

prompt = "a cat and a frog"

# use get_indices function to find out indices of the tokens you want to alter
pipe.get_indices(prompt)

token_indices = [2, 5]
seed = 6141
generator = torch.Generator("cuda").manual_seed(seed)

images = pipe(
    prompt=prompt,
    token_indices=token_indices,
    guidance_scale=7.5,
    generator=generator,
    num_inference_steps=50,
    max_iter_to_alter=25,
).images

image = images[0]
image.save(f"../images/{prompt}_{seed}.png")`,highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionAttendAndExcitePipeline

model_id = <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>
pipe = StableDiffusionAttendAndExcitePipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;a cat and a frog&quot;</span>

<span class="hljs-comment"># use get_indices function to find out indices of the tokens you want to alter</span>
pipe.get_indices(prompt)

token_indices = [<span class="hljs-number">2</span>, <span class="hljs-number">5</span>]
seed = <span class="hljs-number">6141</span>
generator = torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(seed)

images = pipe(
    prompt=prompt,
    token_indices=token_indices,
    guidance_scale=<span class="hljs-number">7.5</span>,
    generator=generator,
    num_inference_steps=<span class="hljs-number">50</span>,
    max_iter_to_alter=<span class="hljs-number">25</span>,
).images

image = images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">f&quot;../images/<span class="hljs-subst">{prompt}</span>_<span class="hljs-subst">{seed}</span>.png&quot;</span>)`}}),le=new it({}),de=new Se({props:{name:"class diffusers.StableDiffusionAttendAndExcitePipeline",anchor:"diffusers.StableDiffusionAttendAndExcitePipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPFeatureExtractor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPFeatureExtractor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py#L162"}}),pe=new Se({props:{name:"__call__",anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"token_indices",val:": typing.List[int]"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"max_iter_to_alter",val:": int = 25"},{name:"thresholds",val:": dict = {0: 0.05, 10: 0.5, 20: 0.8}"},{name:"scale_factor",val:": int = 20"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>.
instead.`,name:"prompt"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.token_indices",description:`<strong>token_indices</strong> (<code>List[int]</code>) &#x2014;
The token indices to alter with attend-and-excite.`,name:"token_indices"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code>. instead. If not defined, one has to pass <code>negative_prompt_embeds</code>. instead.
Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttnProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py" rel="nofollow">diffusers.cross_attention</a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.max_iter_to_alter",description:`<strong>max_iter_to_alter</strong> (<code>int</code>, <em>optional</em>, defaults to <code>25</code>) &#x2014;
Number of denoising steps to apply attend-and-excite. The first <max_iter_to_alter> denoising steps are
where the attend-and-excite is applied. I.e. if <code>max_iter_to_alter</code> is 25 and there are a total of <code>30</code>
denoising steps, the first 25 denoising steps will apply attend-and-excite and the last 5 will not
apply attend-and-excite.</max_iter_to_alter>`,name:"max_iter_to_alter"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.thresholds",description:`<strong>thresholds</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>{0 -- 0.05, 10: 0.5, 20: 0.8}</code>):
Dictionary defining the iterations and desired thresholds to apply iterative latent refinement in.`,name:"thresholds"},{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.scale_factor",description:`<strong>scale_factor</strong> (<code>int</code>, <em>optional</em>, default to 20) &#x2014;
Scale factor that controls the step size of each Attend and Excite update.`,name:"scale_factor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py#L669",returnDescription:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`. :type attention_store: object</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),H=new Ks({props:{anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.__call__.example",$$slots:{default:[Js]},$$scope:{ctx:ot}}}),fe=new Se({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py#L243"}}),he=new Se({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py#L251"}}),me=new Se({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py#L233"}}),ge=new Se({props:{name:"get_indices",anchor:"diffusers.StableDiffusionAttendAndExcitePipeline.get_indices",parameters:[{name:"prompt",val:": str"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py#L663"}}),{c(){m=s("meta"),M=r(),b=s("h1"),g=s("a"),k=s("span"),v(u.$$.fragment),S=r(),je=s("span"),Tt=d("Attend and Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Models"),rt=r(),C=s("h2"),G=s("a"),Te=s("span"),v(Q.$$.fragment),Ct=r(),Ce=s("span"),It=d("Overview"),lt=r(),O=s("p"),Lt=d("Attend and Excite for Stable Diffusion was proposed in "),X=s("a"),qt=d("Attend-and-Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Models"),Nt=d(" and provides textual attention control over the image generation."),dt=r(),be=s("p"),Mt=d("The abstract of the paper is the following:"),ct=r(),ve=s("p"),Ie=s("em"),Gt=d("Text-to-image diffusion models have recently received a lot of interest for their astonishing ability to produce high-fidelity images from text only. However, achieving one-shot generation that aligns with the user\u2019s intent is nearly impossible, yet small changes to the input prompt often result in very different images. This leaves the user with little semantic control. To put the user in control, we show how to interact with the diffusion process to flexibly steer it along semantic directions. This semantic guidance (SEGA) allows for subtle and extensive edits, changes in composition and style, as well as optimizing the overall artistic conception. We demonstrate SEGA\u2019s effectiveness on a variety of tasks and provide evidence for its versatility and flexibility."),pt=r(),xe=s("p"),Ot=d("Resources"),ft=r(),P=s("ul"),Le=s("li"),Z=s("a"),Ut=d("Project Page"),Vt=r(),qe=s("li"),ee=s("a"),zt=d("Paper"),Ft=r(),Ne=s("li"),te=s("a"),Ht=d("Original Code"),Bt=r(),Me=s("li"),ne=s("a"),Wt=d("Demo"),ut=r(),I=s("h2"),U=s("a"),Ge=s("span"),v(se.$$.fragment),Rt=r(),Oe=s("span"),Kt=d("Available Pipelines:"),ht=r(),V=s("table"),Ue=s("thead"),$=s("tr"),Ve=s("th"),Jt=d("Pipeline"),Yt=r(),ze=s("th"),Qt=d("Tasks"),Xt=r(),Ae=s("th"),Zt=d("Colab"),en=r(),we=s("th"),tn=d("Demo"),nn=r(),Fe=s("tbody"),D=s("tr"),He=s("td"),ae=s("a"),sn=d("pipeline_semantic_stable_diffusion_attend_and_excite.py"),an=r(),Be=s("td"),We=s("em"),on=d("Text-to-Image Generation"),rn=r(),Ee=s("td"),ln=d("-"),dn=r(),ye=s("td"),ie=s("a"),cn=d("https://huggingface.co/spaces/AttendAndExcite/Attend-and-Excite"),mt=r(),L=s("h3"),z=s("a"),Re=s("span"),v(oe.$$.fragment),pn=r(),Ke=s("span"),fn=d("Usage example"),gt=r(),v(re.$$.fragment),_t=r(),q=s("h2"),F=s("a"),Je=s("span"),v(le.$$.fragment),un=r(),Ye=s("span"),hn=d("StableDiffusionAttendAndExcitePipeline"),bt=r(),h=s("div"),v(de.$$.fragment),mn=r(),Qe=s("p"),gn=d("Pipeline for text-to-image generation using Stable Diffusion and Attend and Excite."),_n=r(),ce=s("p"),bn=d("This model inherits from "),Pe=s("a"),vn=d("DiffusionPipeline"),xn=d(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),An=r(),j=s("div"),v(pe.$$.fragment),wn=r(),Xe=s("p"),En=d("Function invoked when calling the pipeline for generation."),yn=r(),v(H.$$.fragment),Pn=r(),B=s("div"),v(fe.$$.fragment),$n=r(),ue=s("p"),Dn=d("Disable sliced VAE decoding. If "),Ze=s("code"),kn=d("enable_vae_slicing"),Sn=d(` was previously invoked, this method will go back to
computing decoding in one step.`),jn=r(),W=s("div"),v(he.$$.fragment),Tn=r(),N=s("p"),Cn=d(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),et=s("code"),In=d("torch.device('meta') and loaded to GPU only when their specific submodule has its "),Ln=d("forward"),tt=s("code"),qn=d("method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),Nn=d("enable_model_cpu_offload`, but performance is lower."),Mn=r(),T=s("div"),v(me.$$.fragment),Gn=r(),nt=s("p"),On=d("Enable sliced VAE decoding."),Un=r(),st=s("p"),Vn=d(`When this option is enabled, the VAE will split the input tensor in slices to compute decoding in several
steps. This is useful to save some memory and allow larger batch sizes.`),zn=r(),R=s("div"),v(ge.$$.fragment),Fn=r(),at=s("p"),Hn=d("Utility function to list the indices of the tokens you wish to alte"),this.h()},l(t){const p=Bs('[data-svelte="svelte-1phssyn"]',document.head);m=a(p,"META",{name:!0,content:!0}),p.forEach(n),M=l(t),b=a(t,"H1",{class:!0});var _e=i(b);g=a(_e,"A",{id:!0,class:!0,href:!0});var Bn=i(g);k=a(Bn,"SPAN",{});var Wn=i(k);x(u.$$.fragment,Wn),Wn.forEach(n),Bn.forEach(n),S=l(_e),je=a(_e,"SPAN",{});var Rn=i(je);Tt=c(Rn,"Attend and Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Models"),Rn.forEach(n),_e.forEach(n),rt=l(t),C=a(t,"H2",{class:!0});var xt=i(C);G=a(xt,"A",{id:!0,class:!0,href:!0});var Kn=i(G);Te=a(Kn,"SPAN",{});var Jn=i(Te);x(Q.$$.fragment,Jn),Jn.forEach(n),Kn.forEach(n),Ct=l(xt),Ce=a(xt,"SPAN",{});var Yn=i(Ce);It=c(Yn,"Overview"),Yn.forEach(n),xt.forEach(n),lt=l(t),O=a(t,"P",{});var At=i(O);Lt=c(At,"Attend and Excite for Stable Diffusion was proposed in "),X=a(At,"A",{href:!0,rel:!0});var Qn=i(X);qt=c(Qn,"Attend-and-Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Models"),Qn.forEach(n),Nt=c(At," and provides textual attention control over the image generation."),At.forEach(n),dt=l(t),be=a(t,"P",{});var Xn=i(be);Mt=c(Xn,"The abstract of the paper is the following:"),Xn.forEach(n),ct=l(t),ve=a(t,"P",{});var Zn=i(ve);Ie=a(Zn,"EM",{});var es=i(Ie);Gt=c(es,"Text-to-image diffusion models have recently received a lot of interest for their astonishing ability to produce high-fidelity images from text only. However, achieving one-shot generation that aligns with the user\u2019s intent is nearly impossible, yet small changes to the input prompt often result in very different images. This leaves the user with little semantic control. To put the user in control, we show how to interact with the diffusion process to flexibly steer it along semantic directions. This semantic guidance (SEGA) allows for subtle and extensive edits, changes in composition and style, as well as optimizing the overall artistic conception. We demonstrate SEGA\u2019s effectiveness on a variety of tasks and provide evidence for its versatility and flexibility."),es.forEach(n),Zn.forEach(n),pt=l(t),xe=a(t,"P",{});var ts=i(xe);Ot=c(ts,"Resources"),ts.forEach(n),ft=l(t),P=a(t,"UL",{});var K=i(P);Le=a(K,"LI",{});var ns=i(Le);Z=a(ns,"A",{href:!0,rel:!0});var ss=i(Z);Ut=c(ss,"Project Page"),ss.forEach(n),ns.forEach(n),Vt=l(K),qe=a(K,"LI",{});var as=i(qe);ee=a(as,"A",{href:!0,rel:!0});var is=i(ee);zt=c(is,"Paper"),is.forEach(n),as.forEach(n),Ft=l(K),Ne=a(K,"LI",{});var os=i(Ne);te=a(os,"A",{href:!0,rel:!0});var rs=i(te);Ht=c(rs,"Original Code"),rs.forEach(n),os.forEach(n),Bt=l(K),Me=a(K,"LI",{});var ls=i(Me);ne=a(ls,"A",{href:!0,rel:!0});var ds=i(ne);Wt=c(ds,"Demo"),ds.forEach(n),ls.forEach(n),K.forEach(n),ut=l(t),I=a(t,"H2",{class:!0});var wt=i(I);U=a(wt,"A",{id:!0,class:!0,href:!0});var cs=i(U);Ge=a(cs,"SPAN",{});var ps=i(Ge);x(se.$$.fragment,ps),ps.forEach(n),cs.forEach(n),Rt=l(wt),Oe=a(wt,"SPAN",{});var fs=i(Oe);Kt=c(fs,"Available Pipelines:"),fs.forEach(n),wt.forEach(n),ht=l(t),V=a(t,"TABLE",{});var Et=i(V);Ue=a(Et,"THEAD",{});var us=i(Ue);$=a(us,"TR",{});var J=i($);Ve=a(J,"TH",{});var hs=i(Ve);Jt=c(hs,"Pipeline"),hs.forEach(n),Yt=l(J),ze=a(J,"TH",{});var ms=i(ze);Qt=c(ms,"Tasks"),ms.forEach(n),Xt=l(J),Ae=a(J,"TH",{align:!0});var gs=i(Ae);Zt=c(gs,"Colab"),gs.forEach(n),en=l(J),we=a(J,"TH",{align:!0});var _s=i(we);tn=c(_s,"Demo"),_s.forEach(n),J.forEach(n),us.forEach(n),nn=l(Et),Fe=a(Et,"TBODY",{});var bs=i(Fe);D=a(bs,"TR",{});var Y=i(D);He=a(Y,"TD",{});var vs=i(He);ae=a(vs,"A",{href:!0,rel:!0});var xs=i(ae);sn=c(xs,"pipeline_semantic_stable_diffusion_attend_and_excite.py"),xs.forEach(n),vs.forEach(n),an=l(Y),Be=a(Y,"TD",{});var As=i(Be);We=a(As,"EM",{});var ws=i(We);on=c(ws,"Text-to-Image Generation"),ws.forEach(n),As.forEach(n),rn=l(Y),Ee=a(Y,"TD",{align:!0});var Es=i(Ee);ln=c(Es,"-"),Es.forEach(n),dn=l(Y),ye=a(Y,"TD",{align:!0});var ys=i(ye);ie=a(ys,"A",{href:!0,rel:!0});var Ps=i(ie);cn=c(Ps,"https://huggingface.co/spaces/AttendAndExcite/Attend-and-Excite"),Ps.forEach(n),ys.forEach(n),Y.forEach(n),bs.forEach(n),Et.forEach(n),mt=l(t),L=a(t,"H3",{class:!0});var yt=i(L);z=a(yt,"A",{id:!0,class:!0,href:!0});var $s=i(z);Re=a($s,"SPAN",{});var Ds=i(Re);x(oe.$$.fragment,Ds),Ds.forEach(n),$s.forEach(n),pn=l(yt),Ke=a(yt,"SPAN",{});var ks=i(Ke);fn=c(ks,"Usage example"),ks.forEach(n),yt.forEach(n),gt=l(t),x(re.$$.fragment,t),_t=l(t),q=a(t,"H2",{class:!0});var Pt=i(q);F=a(Pt,"A",{id:!0,class:!0,href:!0});var Ss=i(F);Je=a(Ss,"SPAN",{});var js=i(Je);x(le.$$.fragment,js),js.forEach(n),Ss.forEach(n),un=l(Pt),Ye=a(Pt,"SPAN",{});var Ts=i(Ye);hn=c(Ts,"StableDiffusionAttendAndExcitePipeline"),Ts.forEach(n),Pt.forEach(n),bt=l(t),h=a(t,"DIV",{class:!0});var _=i(h);x(de.$$.fragment,_),mn=l(_),Qe=a(_,"P",{});var Cs=i(Qe);gn=c(Cs,"Pipeline for text-to-image generation using Stable Diffusion and Attend and Excite."),Cs.forEach(n),_n=l(_),ce=a(_,"P",{});var $t=i(ce);bn=c($t,"This model inherits from "),Pe=a($t,"A",{href:!0});var Is=i(Pe);vn=c(Is,"DiffusionPipeline"),Is.forEach(n),xn=c($t,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),$t.forEach(n),An=l(_),j=a(_,"DIV",{class:!0});var $e=i(j);x(pe.$$.fragment,$e),wn=l($e),Xe=a($e,"P",{});var Ls=i(Xe);En=c(Ls,"Function invoked when calling the pipeline for generation."),Ls.forEach(n),yn=l($e),x(H.$$.fragment,$e),$e.forEach(n),Pn=l(_),B=a(_,"DIV",{class:!0});var Dt=i(B);x(fe.$$.fragment,Dt),$n=l(Dt),ue=a(Dt,"P",{});var kt=i(ue);Dn=c(kt,"Disable sliced VAE decoding. If "),Ze=a(kt,"CODE",{});var qs=i(Ze);kn=c(qs,"enable_vae_slicing"),qs.forEach(n),Sn=c(kt,` was previously invoked, this method will go back to
computing decoding in one step.`),kt.forEach(n),Dt.forEach(n),jn=l(_),W=a(_,"DIV",{class:!0});var St=i(W);x(he.$$.fragment,St),Tn=l(St),N=a(St,"P",{});var De=i(N);Cn=c(De,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),et=a(De,"CODE",{});var Ns=i(et);In=c(Ns,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),Ns.forEach(n),Ln=c(De,"forward"),tt=a(De,"CODE",{});var Ms=i(tt);qn=c(Ms,"method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),Ms.forEach(n),Nn=c(De,"enable_model_cpu_offload`, but performance is lower."),De.forEach(n),St.forEach(n),Mn=l(_),T=a(_,"DIV",{class:!0});var ke=i(T);x(me.$$.fragment,ke),Gn=l(ke),nt=a(ke,"P",{});var Gs=i(nt);On=c(Gs,"Enable sliced VAE decoding."),Gs.forEach(n),Un=l(ke),st=a(ke,"P",{});var Os=i(st);Vn=c(Os,`When this option is enabled, the VAE will split the input tensor in slices to compute decoding in several
steps. This is useful to save some memory and allow larger batch sizes.`),Os.forEach(n),ke.forEach(n),zn=l(_),R=a(_,"DIV",{class:!0});var jt=i(R);x(ge.$$.fragment,jt),Fn=l(jt),at=a(jt,"P",{});var Us=i(at);Hn=c(Us,"Utility function to list the indices of the tokens you wish to alte"),Us.forEach(n),jt.forEach(n),_.forEach(n),this.h()},h(){o(m,"name","hf:doc:metadata"),o(m,"content",JSON.stringify(Qs)),o(g,"id","attend-and-excite-attentionbased-semantic-guidance-for-texttoimage-diffusion-models"),o(g,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),o(g,"href","#attend-and-excite-attentionbased-semantic-guidance-for-texttoimage-diffusion-models"),o(b,"class","relative group"),o(G,"id","overview"),o(G,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),o(G,"href","#overview"),o(C,"class","relative group"),o(X,"href","https://attendandexcite.github.io/Attend-and-Excite/"),o(X,"rel","nofollow"),o(Z,"href","https://attendandexcite.github.io/Attend-and-Excite/"),o(Z,"rel","nofollow"),o(ee,"href","https://arxiv.org/abs/2301.13826"),o(ee,"rel","nofollow"),o(te,"href","https://github.com/AttendAndExcite/Attend-and-Excite"),o(te,"rel","nofollow"),o(ne,"href","https://huggingface.co/spaces/AttendAndExcite/Attend-and-Excite"),o(ne,"rel","nofollow"),o(U,"id","available-pipelines"),o(U,"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"),o(U,"href","#available-pipelines"),o(I,"class","relative group"),o(Ae,"align","center"),o(we,"align","center"),o(ae,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_semantic_stable_diffusion_attend_and_excite"),o(ae,"rel","nofollow"),o(Ee,"align","center"),o(ie,"href","https://huggingface.co/spaces/AttendAndExcite/Attend-and-Excite"),o(ie,"rel","nofollow"),o(ye,"align","center"),o(z,"id","usage-example"),o(z,"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"),o(z,"href","#usage-example"),o(L,"class","relative group"),o(F,"id","diffusers.StableDiffusionAttendAndExcitePipeline"),o(F,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),o(F,"href","#diffusers.StableDiffusionAttendAndExcitePipeline"),o(q,"class","relative group"),o(Pe,"href","/docs/diffusers/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),o(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),o(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),o(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),o(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),o(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),o(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,p){e(document.head,m),f(t,M,p),f(t,b,p),e(b,g),e(g,k),A(u,k,null),e(b,S),e(b,je),e(je,Tt),f(t,rt,p),f(t,C,p),e(C,G),e(G,Te),A(Q,Te,null),e(C,Ct),e(C,Ce),e(Ce,It),f(t,lt,p),f(t,O,p),e(O,Lt),e(O,X),e(X,qt),e(O,Nt),f(t,dt,p),f(t,be,p),e(be,Mt),f(t,ct,p),f(t,ve,p),e(ve,Ie),e(Ie,Gt),f(t,pt,p),f(t,xe,p),e(xe,Ot),f(t,ft,p),f(t,P,p),e(P,Le),e(Le,Z),e(Z,Ut),e(P,Vt),e(P,qe),e(qe,ee),e(ee,zt),e(P,Ft),e(P,Ne),e(Ne,te),e(te,Ht),e(P,Bt),e(P,Me),e(Me,ne),e(ne,Wt),f(t,ut,p),f(t,I,p),e(I,U),e(U,Ge),A(se,Ge,null),e(I,Rt),e(I,Oe),e(Oe,Kt),f(t,ht,p),f(t,V,p),e(V,Ue),e(Ue,$),e($,Ve),e(Ve,Jt),e($,Yt),e($,ze),e(ze,Qt),e($,Xt),e($,Ae),e(Ae,Zt),e($,en),e($,we),e(we,tn),e(V,nn),e(V,Fe),e(Fe,D),e(D,He),e(He,ae),e(ae,sn),e(D,an),e(D,Be),e(Be,We),e(We,on),e(D,rn),e(D,Ee),e(Ee,ln),e(D,dn),e(D,ye),e(ye,ie),e(ie,cn),f(t,mt,p),f(t,L,p),e(L,z),e(z,Re),A(oe,Re,null),e(L,pn),e(L,Ke),e(Ke,fn),f(t,gt,p),A(re,t,p),f(t,_t,p),f(t,q,p),e(q,F),e(F,Je),A(le,Je,null),e(q,un),e(q,Ye),e(Ye,hn),f(t,bt,p),f(t,h,p),A(de,h,null),e(h,mn),e(h,Qe),e(Qe,gn),e(h,_n),e(h,ce),e(ce,bn),e(ce,Pe),e(Pe,vn),e(ce,xn),e(h,An),e(h,j),A(pe,j,null),e(j,wn),e(j,Xe),e(Xe,En),e(j,yn),A(H,j,null),e(h,Pn),e(h,B),A(fe,B,null),e(B,$n),e(B,ue),e(ue,Dn),e(ue,Ze),e(Ze,kn),e(ue,Sn),e(h,jn),e(h,W),A(he,W,null),e(W,Tn),e(W,N),e(N,Cn),e(N,et),e(et,In),e(N,Ln),e(N,tt),e(tt,qn),e(N,Nn),e(h,Mn),e(h,T),A(me,T,null),e(T,Gn),e(T,nt),e(nt,On),e(T,Un),e(T,st),e(st,Vn),e(h,zn),e(h,R),A(ge,R,null),e(R,Fn),e(R,at),e(at,Hn),vt=!0},p(t,[p]){const _e={};p&2&&(_e.$$scope={dirty:p,ctx:t}),H.$set(_e)},i(t){vt||(w(u.$$.fragment,t),w(Q.$$.fragment,t),w(se.$$.fragment,t),w(oe.$$.fragment,t),w(re.$$.fragment,t),w(le.$$.fragment,t),w(de.$$.fragment,t),w(pe.$$.fragment,t),w(H.$$.fragment,t),w(fe.$$.fragment,t),w(he.$$.fragment,t),w(me.$$.fragment,t),w(ge.$$.fragment,t),vt=!0)},o(t){E(u.$$.fragment,t),E(Q.$$.fragment,t),E(se.$$.fragment,t),E(oe.$$.fragment,t),E(re.$$.fragment,t),E(le.$$.fragment,t),E(de.$$.fragment,t),E(pe.$$.fragment,t),E(H.$$.fragment,t),E(fe.$$.fragment,t),E(he.$$.fragment,t),E(me.$$.fragment,t),E(ge.$$.fragment,t),vt=!1},d(t){n(m),t&&n(M),t&&n(b),y(u),t&&n(rt),t&&n(C),y(Q),t&&n(lt),t&&n(O),t&&n(dt),t&&n(be),t&&n(ct),t&&n(ve),t&&n(pt),t&&n(xe),t&&n(ft),t&&n(P),t&&n(ut),t&&n(I),y(se),t&&n(ht),t&&n(V),t&&n(mt),t&&n(L),y(oe),t&&n(gt),y(re,t),t&&n(_t),t&&n(q),y(le),t&&n(bt),t&&n(h),y(de),y(pe),y(H),y(fe),y(he),y(me),y(ge)}}}const Qs={local:"attend-and-excite-attentionbased-semantic-guidance-for-texttoimage-diffusion-models",sections:[{local:"overview",title:"Overview"},{local:"available-pipelines",sections:[{local:"usage-example",title:"Usage example"}],title:"Available Pipelines:"},{local:"diffusers.StableDiffusionAttendAndExcitePipeline",title:"StableDiffusionAttendAndExcitePipeline"}],title:"Attend and Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Models"};function Xs(ot){return Ws(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class aa extends zs{constructor(m){super();Fs(this,m,Xs,Ys,Hs,{})}}export{aa as default,Qs as metadata};
