import{s as ao,o as co,n as lo}from"../chunks/scheduler.182ea377.js";import{S as mo,i as fo,g as i,s as n,r as d,A as po,h as a,f as o,c as r,j as g,u as c,x as $,k as h,y as l,a as s,v as m,d as f,t as p,w as u}from"../chunks/index.abf12888.js";import{T as uo}from"../chunks/Tip.230e2334.js";import{D as b}from"../chunks/Docstring.93f6f462.js";import{H as A}from"../chunks/Heading.16916d63.js";function _o(Xe){let _,q="This API is currently 🧪 experimental in nature and can change in future.";return{c(){_=i("p"),_.textContent=q},l(P){_=a(P,"P",{"data-svelte-h":!0}),$(_)!=="svelte-2dfli5"&&(_.textContent=q)},m(P,$e){s(P,_,$e)},p:lo,d(P){P&&o(_)}}}function go(Xe){let _,q,P,$e,E,Ne,I,Bt="An attention processor is a class for applying different types of attention mechanisms.",qe,O,Ee,x,S,Dt,Ae,Ut="Default processor for performing attention-related computations.",Ie,W,Oe,y,j,Tt,be,Ht="Processor for implementing scaled dot-product attention (enabled by default if you’re using PyTorch 2.0).",Se,B,We,v,U,Rt,Pe,Mt=`Processor for implementing scaled dot-product attention (enabled by default if you’re using PyTorch 2.0).
It uses fused projection layers. For self-attention modules, all projection matrices (i.e., query,
key, value) are fused. For cross-attention modules, key and value projection matrices are fused.`,zt,N,je,H,Be,C,M,Ft,ve,Gt="Processor for implementing the LoRA attention mechanism.",Ue,G,He,w,J,Vt,xe,Jt=`Processor for implementing the LoRA attention mechanism using PyTorch 2.0’s memory-efficient scaled dot-product
attention.`,Me,Q,Ge,L,Y,Kt,ye,Qt="Processor for implementing attention for the Custom Diffusion method.",Je,Z,Qe,k,ee,Xt,Ce,Yt=`Processor for implementing attention for the Custom Diffusion method using PyTorch 2.0’s memory-efficient scaled
dot-product attention.`,Ye,te,Ze,D,oe,Nt,we,Zt=`Processor for performing attention-related computations with extra learnable key and value matrices for the text
encoder.`,et,se,tt,T,ne,qt,Le,eo=`Processor for performing scaled dot-product attention (enabled by default if you’re using PyTorch 2.0), with extra
learnable key and value matrices for the text encoder.`,ot,re,st,R,ie,Et,ke,to=`Processor for implementing the LoRA attention mechanism with extra learnable key and value matrices for the text
encoder.`,nt,ae,rt,z,de,It,De,oo="Processor for implementing memory efficient attention using xFormers.",it,ce,at,F,le,Ot,Te,so="Processor for implementing the LoRA attention mechanism with memory efficient attention using xFormers.",dt,me,ct,V,fe,St,Re,no="Processor for implementing memory efficient attention using xFormers for the Custom Diffusion method.",lt,pe,mt,K,ue,Wt,ze,ro="Processor for implementing sliced attention.",ft,_e,pt,X,ge,jt,Fe,io="Processor for implementing sliced attention with extra learnable key and value matrices for the text encoder.",ut,Ke,_t;return E=new A({props:{title:"Attention Processor",local:"attention-processor",headingTag:"h1"}}),O=new A({props:{title:"AttnProcessor",local:"diffusers.models.attention_processor.AttnProcessor",headingTag:"h2"}}),S=new b({props:{name:"class diffusers.models.attention_processor.AttnProcessor",anchor:"diffusers.models.attention_processor.AttnProcessor",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L710"}}),W=new A({props:{title:"AttnProcessor2_0",local:"diffusers.models.attention_processor.AttnProcessor2_0",headingTag:"h2"}}),j=new b({props:{name:"class diffusers.models.attention_processor.AttnProcessor2_0",anchor:"diffusers.models.attention_processor.AttnProcessor2_0",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1182"}}),B=new A({props:{title:"FusedAttnProcessor2_0",local:"diffusers.models.attention_processor.FusedAttnProcessor2_0",headingTag:"h2"}}),U=new b({props:{name:"class diffusers.models.attention_processor.FusedAttnProcessor2_0",anchor:"diffusers.models.attention_processor.FusedAttnProcessor2_0",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1267"}}),N=new uo({props:{warning:!0,$$slots:{default:[_o]},$$scope:{ctx:Xe}}}),H=new A({props:{title:"LoRAAttnProcessor",local:"diffusers.models.attention_processor.LoRAAttnProcessor",headingTag:"h2"}}),M=new b({props:{name:"class diffusers.models.attention_processor.LoRAAttnProcessor",anchor:"diffusers.models.attention_processor.LoRAAttnProcessor",parameters:[{name:"hidden_size",val:": int"},{name:"cross_attention_dim",val:": typing.Optional[int] = None"},{name:"rank",val:": int = 4"},{name:"network_alpha",val:": typing.Optional[int] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.models.attention_processor.LoRAAttnProcessor.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The hidden size of the attention layer.`,name:"hidden_size"},{anchor:"diffusers.models.attention_processor.LoRAAttnProcessor.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of channels in the <code>encoder_hidden_states</code>.`,name:"cross_attention_dim"},{anchor:"diffusers.models.attention_processor.LoRAAttnProcessor.rank",description:`<strong>rank</strong> (<code>int</code>, defaults to 4) &#x2014;
The dimension of the LoRA update matrices.`,name:"rank"},{anchor:"diffusers.models.attention_processor.LoRAAttnProcessor.network_alpha",description:`<strong>network_alpha</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Equivalent to <code>alpha</code> but it&#x2019;s usage is specific to Kohya (A1111) style LoRAs.`,name:"network_alpha"},{anchor:"diffusers.models.attention_processor.LoRAAttnProcessor.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>) &#x2014;
Additional keyword arguments to pass to the <code>LoRALinearLayer</code> layers.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1803"}}),G=new A({props:{title:"LoRAAttnProcessor2_0",local:"diffusers.models.attention_processor.LoRAAttnProcessor2_0",headingTag:"h2"}}),J=new b({props:{name:"class diffusers.models.attention_processor.LoRAAttnProcessor2_0",anchor:"diffusers.models.attention_processor.LoRAAttnProcessor2_0",parameters:[{name:"hidden_size",val:": int"},{name:"cross_attention_dim",val:": typing.Optional[int] = None"},{name:"rank",val:": int = 4"},{name:"network_alpha",val:": typing.Optional[int] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.models.attention_processor.LoRAAttnProcessor2_0.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>) &#x2014;
The hidden size of the attention layer.`,name:"hidden_size"},{anchor:"diffusers.models.attention_processor.LoRAAttnProcessor2_0.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of channels in the <code>encoder_hidden_states</code>.`,name:"cross_attention_dim"},{anchor:"diffusers.models.attention_processor.LoRAAttnProcessor2_0.rank",description:`<strong>rank</strong> (<code>int</code>, defaults to 4) &#x2014;
The dimension of the LoRA update matrices.`,name:"rank"},{anchor:"diffusers.models.attention_processor.LoRAAttnProcessor2_0.network_alpha",description:`<strong>network_alpha</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Equivalent to <code>alpha</code> but it&#x2019;s usage is specific to Kohya (A1111) style LoRAs.`,name:"network_alpha"},{anchor:"diffusers.models.attention_processor.LoRAAttnProcessor2_0.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>) &#x2014;
Additional keyword arguments to pass to the <code>LoRALinearLayer</code> layers.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1875"}}),Q=new A({props:{title:"CustomDiffusionAttnProcessor",local:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor",headingTag:"h2"}}),Y=new b({props:{name:"class diffusers.models.attention_processor.CustomDiffusionAttnProcessor",anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor",parameters:[{name:"train_kv",val:": bool = True"},{name:"train_q_out",val:": bool = True"},{name:"hidden_size",val:": typing.Optional[int] = None"},{name:"cross_attention_dim",val:": typing.Optional[int] = None"},{name:"out_bias",val:": bool = True"},{name:"dropout",val:": float = 0.0"}],parametersDescription:[{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor.train_kv",description:`<strong>train_kv</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to newly train the key and value matrices corresponding to the text features.`,name:"train_kv"},{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor.train_q_out",description:`<strong>train_q_out</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to newly train query matrices corresponding to the latent image features.`,name:"train_q_out"},{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The hidden size of the attention layer.`,name:"hidden_size"},{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The number of channels in the <code>encoder_hidden_states</code>.`,name:"cross_attention_dim"},{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor.out_bias",description:`<strong>out_bias</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to include the bias parameter in <code>train_q_out</code>.`,name:"out_bias"},{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability to use.`,name:"dropout"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L779"}}),Z=new A({props:{title:"CustomDiffusionAttnProcessor2_0",local:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0",headingTag:"h2"}}),ee=new b({props:{name:"class diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0",anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0",parameters:[{name:"train_kv",val:": bool = True"},{name:"train_q_out",val:": bool = True"},{name:"hidden_size",val:": typing.Optional[int] = None"},{name:"cross_attention_dim",val:": typing.Optional[int] = None"},{name:"out_bias",val:": bool = True"},{name:"dropout",val:": float = 0.0"}],parametersDescription:[{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0.train_kv",description:`<strong>train_kv</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to newly train the key and value matrices corresponding to the text features.`,name:"train_kv"},{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0.train_q_out",description:`<strong>train_q_out</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to newly train query matrices corresponding to the latent image features.`,name:"train_q_out"},{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The hidden size of the attention layer.`,name:"hidden_size"},{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The number of channels in the <code>encoder_hidden_states</code>.`,name:"cross_attention_dim"},{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0.out_bias",description:`<strong>out_bias</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to include the bias parameter in <code>train_q_out</code>.`,name:"out_bias"},{anchor:"diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability to use.`,name:"dropout"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1480"}}),te=new A({props:{title:"AttnAddedKVProcessor",local:"diffusers.models.attention_processor.AttnAddedKVProcessor",headingTag:"h2"}}),oe=new b({props:{name:"class diffusers.models.attention_processor.AttnAddedKVProcessor",anchor:"diffusers.models.attention_processor.AttnAddedKVProcessor",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L883"}}),se=new A({props:{title:"AttnAddedKVProcessor2_0",local:"diffusers.models.attention_processor.AttnAddedKVProcessor2_0",headingTag:"h2"}}),ne=new b({props:{name:"class diffusers.models.attention_processor.AttnAddedKVProcessor2_0",anchor:"diffusers.models.attention_processor.AttnAddedKVProcessor2_0",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L947"}}),re=new A({props:{title:"LoRAAttnAddedKVProcessor",local:"diffusers.models.attention_processor.LoRAAttnAddedKVProcessor",headingTag:"h2"}}),ie=new b({props:{name:"class diffusers.models.attention_processor.LoRAAttnAddedKVProcessor",anchor:"diffusers.models.attention_processor.LoRAAttnAddedKVProcessor",parameters:[{name:"hidden_size",val:": int"},{name:"cross_attention_dim",val:": typing.Optional[int] = None"},{name:"rank",val:": int = 4"},{name:"network_alpha",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.models.attention_processor.LoRAAttnAddedKVProcessor.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The hidden size of the attention layer.`,name:"hidden_size"},{anchor:"diffusers.models.attention_processor.LoRAAttnAddedKVProcessor.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The number of channels in the <code>encoder_hidden_states</code>.`,name:"cross_attention_dim"},{anchor:"diffusers.models.attention_processor.LoRAAttnAddedKVProcessor.rank",description:`<strong>rank</strong> (<code>int</code>, defaults to 4) &#x2014;
The dimension of the LoRA update matrices.`,name:"rank"},{anchor:"diffusers.models.attention_processor.LoRAAttnAddedKVProcessor.network_alpha",description:`<strong>network_alpha</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Equivalent to <code>alpha</code> but it&#x2019;s usage is specific to Kohya (A1111) style LoRAs.`,name:"network_alpha"},{anchor:"diffusers.models.attention_processor.LoRAAttnAddedKVProcessor.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>) &#x2014;
Additional keyword arguments to pass to the <code>LoRALinearLayer</code> layers.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L2029"}}),ae=new A({props:{title:"XFormersAttnProcessor",local:"diffusers.models.attention_processor.XFormersAttnProcessor",headingTag:"h2"}}),de=new b({props:{name:"class diffusers.models.attention_processor.XFormersAttnProcessor",anchor:"diffusers.models.attention_processor.XFormersAttnProcessor",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.models.attention_processor.XFormersAttnProcessor.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The base
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.AttentionOpBase" rel="nofollow">operator</a> to
use as the attention operator. It is recommended to set to <code>None</code>, and allow xFormers to choose the best
operator.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1091"}}),ce=new A({props:{title:"LoRAXFormersAttnProcessor",local:"diffusers.models.attention_processor.LoRAXFormersAttnProcessor",headingTag:"h2"}}),le=new b({props:{name:"class diffusers.models.attention_processor.LoRAXFormersAttnProcessor",anchor:"diffusers.models.attention_processor.LoRAXFormersAttnProcessor",parameters:[{name:"hidden_size",val:": int"},{name:"cross_attention_dim",val:": int"},{name:"rank",val:": int = 4"},{name:"attention_op",val:": typing.Optional[typing.Callable] = None"},{name:"network_alpha",val:": typing.Optional[int] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.models.attention_processor.LoRAXFormersAttnProcessor.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The hidden size of the attention layer.`,name:"hidden_size"},{anchor:"diffusers.models.attention_processor.LoRAXFormersAttnProcessor.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of channels in the <code>encoder_hidden_states</code>.`,name:"cross_attention_dim"},{anchor:"diffusers.models.attention_processor.LoRAXFormersAttnProcessor.rank",description:`<strong>rank</strong> (<code>int</code>, defaults to 4) &#x2014;
The dimension of the LoRA update matrices.`,name:"rank"},{anchor:"diffusers.models.attention_processor.LoRAXFormersAttnProcessor.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The base
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.AttentionOpBase" rel="nofollow">operator</a> to
use as the attention operator. It is recommended to set to <code>None</code>, and allow xFormers to choose the best
operator.`,name:"attention_op"},{anchor:"diffusers.models.attention_processor.LoRAXFormersAttnProcessor.network_alpha",description:`<strong>network_alpha</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Equivalent to <code>alpha</code> but it&#x2019;s usage is specific to Kohya (A1111) style LoRAs.`,name:"network_alpha"},{anchor:"diffusers.models.attention_processor.LoRAXFormersAttnProcessor.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>) &#x2014;
Additional keyword arguments to pass to the <code>LoRALinearLayer</code> layers.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1950"}}),me=new A({props:{title:"CustomDiffusionXFormersAttnProcessor",local:"diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor",headingTag:"h2"}}),fe=new b({props:{name:"class diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor",anchor:"diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor",parameters:[{name:"train_kv",val:": bool = True"},{name:"train_q_out",val:": bool = False"},{name:"hidden_size",val:": typing.Optional[int] = None"},{name:"cross_attention_dim",val:": typing.Optional[int] = None"},{name:"out_bias",val:": bool = True"},{name:"dropout",val:": float = 0.0"},{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor.train_kv",description:`<strong>train_kv</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to newly train the key and value matrices corresponding to the text features.`,name:"train_kv"},{anchor:"diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor.train_q_out",description:`<strong>train_q_out</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to newly train query matrices corresponding to the latent image features.`,name:"train_q_out"},{anchor:"diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The hidden size of the attention layer.`,name:"hidden_size"},{anchor:"diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The number of channels in the <code>encoder_hidden_states</code>.`,name:"cross_attention_dim"},{anchor:"diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor.out_bias",description:`<strong>out_bias</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to include the bias parameter in <code>train_q_out</code>.`,name:"out_bias"},{anchor:"diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability to use.`,name:"dropout"},{anchor:"diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The base
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.AttentionOpBase" rel="nofollow">operator</a> to use
as the attention operator. It is recommended to set to <code>None</code>, and allow xFormers to choose the best operator.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1364"}}),pe=new A({props:{title:"SlicedAttnProcessor",local:"diffusers.models.attention_processor.SlicedAttnProcessor",headingTag:"h2"}}),ue=new b({props:{name:"class diffusers.models.attention_processor.SlicedAttnProcessor",anchor:"diffusers.models.attention_processor.SlicedAttnProcessor",parameters:[{name:"slice_size",val:": int"}],parametersDescription:[{anchor:"diffusers.models.attention_processor.SlicedAttnProcessor.slice_size",description:`<strong>slice_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of steps to compute attention. Uses as many slices as <code>attention_head_dim // slice_size</code>, and
<code>attention_head_dim</code> must be a multiple of the <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1594"}}),_e=new A({props:{title:"SlicedAttnAddedKVProcessor",local:"diffusers.models.attention_processor.SlicedAttnAddedKVProcessor",headingTag:"h2"}}),ge=new b({props:{name:"class diffusers.models.attention_processor.SlicedAttnAddedKVProcessor",anchor:"diffusers.models.attention_processor.SlicedAttnAddedKVProcessor",parameters:[{name:"slice_size",val:""}],parametersDescription:[{anchor:"diffusers.models.attention_processor.SlicedAttnAddedKVProcessor.slice_size",description:`<strong>slice_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of steps to compute attention. Uses as many slices as <code>attention_head_dim // slice_size</code>, and
<code>attention_head_dim</code> must be a multiple of the <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1681"}}),{c(){_=i("meta"),q=n(),P=i("p"),$e=n(),d(E.$$.fragment),Ne=n(),I=i("p"),I.textContent=Bt,qe=n(),d(O.$$.fragment),Ee=n(),x=i("div"),d(S.$$.fragment),Dt=n(),Ae=i("p"),Ae.textContent=Ut,Ie=n(),d(W.$$.fragment),Oe=n(),y=i("div"),d(j.$$.fragment),Tt=n(),be=i("p"),be.textContent=Ht,Se=n(),d(B.$$.fragment),We=n(),v=i("div"),d(U.$$.fragment),Rt=n(),Pe=i("p"),Pe.textContent=Mt,zt=n(),d(N.$$.fragment),je=n(),d(H.$$.fragment),Be=n(),C=i("div"),d(M.$$.fragment),Ft=n(),ve=i("p"),ve.textContent=Gt,Ue=n(),d(G.$$.fragment),He=n(),w=i("div"),d(J.$$.fragment),Vt=n(),xe=i("p"),xe.textContent=Jt,Me=n(),d(Q.$$.fragment),Ge=n(),L=i("div"),d(Y.$$.fragment),Kt=n(),ye=i("p"),ye.textContent=Qt,Je=n(),d(Z.$$.fragment),Qe=n(),k=i("div"),d(ee.$$.fragment),Xt=n(),Ce=i("p"),Ce.textContent=Yt,Ye=n(),d(te.$$.fragment),Ze=n(),D=i("div"),d(oe.$$.fragment),Nt=n(),we=i("p"),we.textContent=Zt,et=n(),d(se.$$.fragment),tt=n(),T=i("div"),d(ne.$$.fragment),qt=n(),Le=i("p"),Le.textContent=eo,ot=n(),d(re.$$.fragment),st=n(),R=i("div"),d(ie.$$.fragment),Et=n(),ke=i("p"),ke.textContent=to,nt=n(),d(ae.$$.fragment),rt=n(),z=i("div"),d(de.$$.fragment),It=n(),De=i("p"),De.textContent=oo,it=n(),d(ce.$$.fragment),at=n(),F=i("div"),d(le.$$.fragment),Ot=n(),Te=i("p"),Te.textContent=so,dt=n(),d(me.$$.fragment),ct=n(),V=i("div"),d(fe.$$.fragment),St=n(),Re=i("p"),Re.textContent=no,lt=n(),d(pe.$$.fragment),mt=n(),K=i("div"),d(ue.$$.fragment),Wt=n(),ze=i("p"),ze.textContent=ro,ft=n(),d(_e.$$.fragment),pt=n(),X=i("div"),d(ge.$$.fragment),jt=n(),Fe=i("p"),Fe.textContent=io,ut=n(),Ke=i("p"),this.h()},l(e){const t=po("svelte-u9bgzb",document.head);_=a(t,"META",{name:!0,content:!0}),t.forEach(o),q=r(e),P=a(e,"P",{}),g(P).forEach(o),$e=r(e),c(E.$$.fragment,e),Ne=r(e),I=a(e,"P",{"data-svelte-h":!0}),$(I)!=="svelte-itqz7g"&&(I.textContent=Bt),qe=r(e),c(O.$$.fragment,e),Ee=r(e),x=a(e,"DIV",{class:!0});var he=g(x);c(S.$$.fragment,he),Dt=r(he),Ae=a(he,"P",{"data-svelte-h":!0}),$(Ae)!=="svelte-12lirf9"&&(Ae.textContent=Ut),he.forEach(o),Ie=r(e),c(W.$$.fragment,e),Oe=r(e),y=a(e,"DIV",{class:!0});var gt=g(y);c(j.$$.fragment,gt),Tt=r(gt),be=a(gt,"P",{"data-svelte-h":!0}),$(be)!=="svelte-zp073y"&&(be.textContent=Ht),gt.forEach(o),Se=r(e),c(B.$$.fragment,e),We=r(e),v=a(e,"DIV",{class:!0});var Ve=g(v);c(U.$$.fragment,Ve),Rt=r(Ve),Pe=a(Ve,"P",{"data-svelte-h":!0}),$(Pe)!=="svelte-168rx5w"&&(Pe.textContent=Mt),zt=r(Ve),c(N.$$.fragment,Ve),Ve.forEach(o),je=r(e),c(H.$$.fragment,e),Be=r(e),C=a(e,"DIV",{class:!0});var ht=g(C);c(M.$$.fragment,ht),Ft=r(ht),ve=a(ht,"P",{"data-svelte-h":!0}),$(ve)!=="svelte-z73n2i"&&(ve.textContent=Gt),ht.forEach(o),Ue=r(e),c(G.$$.fragment,e),He=r(e),w=a(e,"DIV",{class:!0});var $t=g(w);c(J.$$.fragment,$t),Vt=r($t),xe=a($t,"P",{"data-svelte-h":!0}),$(xe)!=="svelte-yo3yo9"&&(xe.textContent=Jt),$t.forEach(o),Me=r(e),c(Q.$$.fragment,e),Ge=r(e),L=a(e,"DIV",{class:!0});var At=g(L);c(Y.$$.fragment,At),Kt=r(At),ye=a(At,"P",{"data-svelte-h":!0}),$(ye)!=="svelte-1gjwzkd"&&(ye.textContent=Qt),At.forEach(o),Je=r(e),c(Z.$$.fragment,e),Qe=r(e),k=a(e,"DIV",{class:!0});var bt=g(k);c(ee.$$.fragment,bt),Xt=r(bt),Ce=a(bt,"P",{"data-svelte-h":!0}),$(Ce)!=="svelte-pottg0"&&(Ce.textContent=Yt),bt.forEach(o),Ye=r(e),c(te.$$.fragment,e),Ze=r(e),D=a(e,"DIV",{class:!0});var Pt=g(D);c(oe.$$.fragment,Pt),Nt=r(Pt),we=a(Pt,"P",{"data-svelte-h":!0}),$(we)!=="svelte-yqqibm"&&(we.textContent=Zt),Pt.forEach(o),et=r(e),c(se.$$.fragment,e),tt=r(e),T=a(e,"DIV",{class:!0});var vt=g(T);c(ne.$$.fragment,vt),qt=r(vt),Le=a(vt,"P",{"data-svelte-h":!0}),$(Le)!=="svelte-hw86c4"&&(Le.textContent=eo),vt.forEach(o),ot=r(e),c(re.$$.fragment,e),st=r(e),R=a(e,"DIV",{class:!0});var xt=g(R);c(ie.$$.fragment,xt),Et=r(xt),ke=a(xt,"P",{"data-svelte-h":!0}),$(ke)!=="svelte-zfgvyc"&&(ke.textContent=to),xt.forEach(o),nt=r(e),c(ae.$$.fragment,e),rt=r(e),z=a(e,"DIV",{class:!0});var yt=g(z);c(de.$$.fragment,yt),It=r(yt),De=a(yt,"P",{"data-svelte-h":!0}),$(De)!=="svelte-10td8ls"&&(De.textContent=oo),yt.forEach(o),it=r(e),c(ce.$$.fragment,e),at=r(e),F=a(e,"DIV",{class:!0});var Ct=g(F);c(le.$$.fragment,Ct),Ot=r(Ct),Te=a(Ct,"P",{"data-svelte-h":!0}),$(Te)!=="svelte-yqwtom"&&(Te.textContent=so),Ct.forEach(o),dt=r(e),c(me.$$.fragment,e),ct=r(e),V=a(e,"DIV",{class:!0});var wt=g(V);c(fe.$$.fragment,wt),St=r(wt),Re=a(wt,"P",{"data-svelte-h":!0}),$(Re)!=="svelte-10eh8wb"&&(Re.textContent=no),wt.forEach(o),lt=r(e),c(pe.$$.fragment,e),mt=r(e),K=a(e,"DIV",{class:!0});var Lt=g(K);c(ue.$$.fragment,Lt),Wt=r(Lt),ze=a(Lt,"P",{"data-svelte-h":!0}),$(ze)!=="svelte-16xjg0o"&&(ze.textContent=ro),Lt.forEach(o),ft=r(e),c(_e.$$.fragment,e),pt=r(e),X=a(e,"DIV",{class:!0});var kt=g(X);c(ge.$$.fragment,kt),jt=r(kt),Fe=a(kt,"P",{"data-svelte-h":!0}),$(Fe)!=="svelte-15dojbg"&&(Fe.textContent=io),kt.forEach(o),ut=r(e),Ke=a(e,"P",{}),g(Ke).forEach(o),this.h()},h(){h(_,"name","hf:doc:metadata"),h(_,"content",ho),h(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){l(document.head,_),s(e,q,t),s(e,P,t),s(e,$e,t),m(E,e,t),s(e,Ne,t),s(e,I,t),s(e,qe,t),m(O,e,t),s(e,Ee,t),s(e,x,t),m(S,x,null),l(x,Dt),l(x,Ae),s(e,Ie,t),m(W,e,t),s(e,Oe,t),s(e,y,t),m(j,y,null),l(y,Tt),l(y,be),s(e,Se,t),m(B,e,t),s(e,We,t),s(e,v,t),m(U,v,null),l(v,Rt),l(v,Pe),l(v,zt),m(N,v,null),s(e,je,t),m(H,e,t),s(e,Be,t),s(e,C,t),m(M,C,null),l(C,Ft),l(C,ve),s(e,Ue,t),m(G,e,t),s(e,He,t),s(e,w,t),m(J,w,null),l(w,Vt),l(w,xe),s(e,Me,t),m(Q,e,t),s(e,Ge,t),s(e,L,t),m(Y,L,null),l(L,Kt),l(L,ye),s(e,Je,t),m(Z,e,t),s(e,Qe,t),s(e,k,t),m(ee,k,null),l(k,Xt),l(k,Ce),s(e,Ye,t),m(te,e,t),s(e,Ze,t),s(e,D,t),m(oe,D,null),l(D,Nt),l(D,we),s(e,et,t),m(se,e,t),s(e,tt,t),s(e,T,t),m(ne,T,null),l(T,qt),l(T,Le),s(e,ot,t),m(re,e,t),s(e,st,t),s(e,R,t),m(ie,R,null),l(R,Et),l(R,ke),s(e,nt,t),m(ae,e,t),s(e,rt,t),s(e,z,t),m(de,z,null),l(z,It),l(z,De),s(e,it,t),m(ce,e,t),s(e,at,t),s(e,F,t),m(le,F,null),l(F,Ot),l(F,Te),s(e,dt,t),m(me,e,t),s(e,ct,t),s(e,V,t),m(fe,V,null),l(V,St),l(V,Re),s(e,lt,t),m(pe,e,t),s(e,mt,t),s(e,K,t),m(ue,K,null),l(K,Wt),l(K,ze),s(e,ft,t),m(_e,e,t),s(e,pt,t),s(e,X,t),m(ge,X,null),l(X,jt),l(X,Fe),s(e,ut,t),s(e,Ke,t),_t=!0},p(e,[t]){const he={};t&2&&(he.$$scope={dirty:t,ctx:e}),N.$set(he)},i(e){_t||(f(E.$$.fragment,e),f(O.$$.fragment,e),f(S.$$.fragment,e),f(W.$$.fragment,e),f(j.$$.fragment,e),f(B.$$.fragment,e),f(U.$$.fragment,e),f(N.$$.fragment,e),f(H.$$.fragment,e),f(M.$$.fragment,e),f(G.$$.fragment,e),f(J.$$.fragment,e),f(Q.$$.fragment,e),f(Y.$$.fragment,e),f(Z.$$.fragment,e),f(ee.$$.fragment,e),f(te.$$.fragment,e),f(oe.$$.fragment,e),f(se.$$.fragment,e),f(ne.$$.fragment,e),f(re.$$.fragment,e),f(ie.$$.fragment,e),f(ae.$$.fragment,e),f(de.$$.fragment,e),f(ce.$$.fragment,e),f(le.$$.fragment,e),f(me.$$.fragment,e),f(fe.$$.fragment,e),f(pe.$$.fragment,e),f(ue.$$.fragment,e),f(_e.$$.fragment,e),f(ge.$$.fragment,e),_t=!0)},o(e){p(E.$$.fragment,e),p(O.$$.fragment,e),p(S.$$.fragment,e),p(W.$$.fragment,e),p(j.$$.fragment,e),p(B.$$.fragment,e),p(U.$$.fragment,e),p(N.$$.fragment,e),p(H.$$.fragment,e),p(M.$$.fragment,e),p(G.$$.fragment,e),p(J.$$.fragment,e),p(Q.$$.fragment,e),p(Y.$$.fragment,e),p(Z.$$.fragment,e),p(ee.$$.fragment,e),p(te.$$.fragment,e),p(oe.$$.fragment,e),p(se.$$.fragment,e),p(ne.$$.fragment,e),p(re.$$.fragment,e),p(ie.$$.fragment,e),p(ae.$$.fragment,e),p(de.$$.fragment,e),p(ce.$$.fragment,e),p(le.$$.fragment,e),p(me.$$.fragment,e),p(fe.$$.fragment,e),p(pe.$$.fragment,e),p(ue.$$.fragment,e),p(_e.$$.fragment,e),p(ge.$$.fragment,e),_t=!1},d(e){e&&(o(q),o(P),o($e),o(Ne),o(I),o(qe),o(Ee),o(x),o(Ie),o(Oe),o(y),o(Se),o(We),o(v),o(je),o(Be),o(C),o(Ue),o(He),o(w),o(Me),o(Ge),o(L),o(Je),o(Qe),o(k),o(Ye),o(Ze),o(D),o(et),o(tt),o(T),o(ot),o(st),o(R),o(nt),o(rt),o(z),o(it),o(at),o(F),o(dt),o(ct),o(V),o(lt),o(mt),o(K),o(ft),o(pt),o(X),o(ut),o(Ke)),o(_),u(E,e),u(O,e),u(S),u(W,e),u(j),u(B,e),u(U),u(N),u(H,e),u(M),u(G,e),u(J),u(Q,e),u(Y),u(Z,e),u(ee),u(te,e),u(oe),u(se,e),u(ne),u(re,e),u(ie),u(ae,e),u(de),u(ce,e),u(le),u(me,e),u(fe),u(pe,e),u(ue),u(_e,e),u(ge)}}}const ho='{"title":"Attention Processor","local":"attention-processor","sections":[{"title":"AttnProcessor","local":"diffusers.models.attention_processor.AttnProcessor","sections":[],"depth":2},{"title":"AttnProcessor2_0","local":"diffusers.models.attention_processor.AttnProcessor2_0","sections":[],"depth":2},{"title":"FusedAttnProcessor2_0","local":"diffusers.models.attention_processor.FusedAttnProcessor2_0","sections":[],"depth":2},{"title":"LoRAAttnProcessor","local":"diffusers.models.attention_processor.LoRAAttnProcessor","sections":[],"depth":2},{"title":"LoRAAttnProcessor2_0","local":"diffusers.models.attention_processor.LoRAAttnProcessor2_0","sections":[],"depth":2},{"title":"CustomDiffusionAttnProcessor","local":"diffusers.models.attention_processor.CustomDiffusionAttnProcessor","sections":[],"depth":2},{"title":"CustomDiffusionAttnProcessor2_0","local":"diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0","sections":[],"depth":2},{"title":"AttnAddedKVProcessor","local":"diffusers.models.attention_processor.AttnAddedKVProcessor","sections":[],"depth":2},{"title":"AttnAddedKVProcessor2_0","local":"diffusers.models.attention_processor.AttnAddedKVProcessor2_0","sections":[],"depth":2},{"title":"LoRAAttnAddedKVProcessor","local":"diffusers.models.attention_processor.LoRAAttnAddedKVProcessor","sections":[],"depth":2},{"title":"XFormersAttnProcessor","local":"diffusers.models.attention_processor.XFormersAttnProcessor","sections":[],"depth":2},{"title":"LoRAXFormersAttnProcessor","local":"diffusers.models.attention_processor.LoRAXFormersAttnProcessor","sections":[],"depth":2},{"title":"CustomDiffusionXFormersAttnProcessor","local":"diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor","sections":[],"depth":2},{"title":"SlicedAttnProcessor","local":"diffusers.models.attention_processor.SlicedAttnProcessor","sections":[],"depth":2},{"title":"SlicedAttnAddedKVProcessor","local":"diffusers.models.attention_processor.SlicedAttnAddedKVProcessor","sections":[],"depth":2}],"depth":1}';function $o(Xe){return co(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class yo extends mo{constructor(_){super(),fo(this,_,$o,go,ao,{})}}export{yo as component};
