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 r,r as d,A as po,h as a,f as o,c as n,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,w,M,Ft,ve,Gt="Processor for implementing the LoRA attention mechanism.",Ue,G,He,C,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,we,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,Ce,Zt=`Processor for performing attention-related computations with extra learnable key and value matrices for the text
encoder.`,et,se,tt,T,re,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,ne,st,R,ie,Et,ke,to=`Processor for implementing the LoRA attention mechanism with extra learnable key and value matrices for the text
encoder.`,rt,ae,nt,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,ro="Processor for implementing memory efficient attention using xFormers for the Custom Diffusion method.",lt,pe,mt,K,ue,Wt,ze,no="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:": Optional = None"},{name:"rank",val:": int = 4"},{name:"network_alpha",val:": Optional = 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:": Optional = None"},{name:"rank",val:": int = 4"},{name:"network_alpha",val:": Optional = 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:": Optional = None"},{name:"cross_attention_dim",val:": Optional = 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:": Optional = None"},{name:"cross_attention_dim",val:": Optional = 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"}}),re=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"}}),ne=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:": Optional = None"},{name:"rank",val:": int = 4"},{name:"network_alpha",val:": Optional = 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:": Optional = 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:": Optional = None"},{name:"network_alpha",val:": Optional = 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:": Optional = None"},{name:"cross_attention_dim",val:": Optional = None"},{name:"out_bias",val:": bool = True"},{name:"dropout",val:": float = 0.0"},{name:"attention_op",val:": Optional = 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=r(),P=i("p"),$e=r(),d(E.$$.fragment),Ne=r(),I=i("p"),I.textContent=Bt,qe=r(),d(O.$$.fragment),Ee=r(),x=i("div"),d(S.$$.fragment),Dt=r(),Ae=i("p"),Ae.textContent=Ut,Ie=r(),d(W.$$.fragment),Oe=r(),y=i("div"),d(j.$$.fragment),Tt=r(),be=i("p"),be.textContent=Ht,Se=r(),d(B.$$.fragment),We=r(),v=i("div"),d(U.$$.fragment),Rt=r(),Pe=i("p"),Pe.textContent=Mt,zt=r(),d(N.$$.fragment),je=r(),d(H.$$.fragment),Be=r(),w=i("div"),d(M.$$.fragment),Ft=r(),ve=i("p"),ve.textContent=Gt,Ue=r(),d(G.$$.fragment),He=r(),C=i("div"),d(J.$$.fragment),Vt=r(),xe=i("p"),xe.textContent=Jt,Me=r(),d(Q.$$.fragment),Ge=r(),L=i("div"),d(Y.$$.fragment),Kt=r(),ye=i("p"),ye.textContent=Qt,Je=r(),d(Z.$$.fragment),Qe=r(),k=i("div"),d(ee.$$.fragment),Xt=r(),we=i("p"),we.textContent=Yt,Ye=r(),d(te.$$.fragment),Ze=r(),D=i("div"),d(oe.$$.fragment),Nt=r(),Ce=i("p"),Ce.textContent=Zt,et=r(),d(se.$$.fragment),tt=r(),T=i("div"),d(re.$$.fragment),qt=r(),Le=i("p"),Le.textContent=eo,ot=r(),d(ne.$$.fragment),st=r(),R=i("div"),d(ie.$$.fragment),Et=r(),ke=i("p"),ke.textContent=to,rt=r(),d(ae.$$.fragment),nt=r(),z=i("div"),d(de.$$.fragment),It=r(),De=i("p"),De.textContent=oo,it=r(),d(ce.$$.fragment),at=r(),F=i("div"),d(le.$$.fragment),Ot=r(),Te=i("p"),Te.textContent=so,dt=r(),d(me.$$.fragment),ct=r(),V=i("div"),d(fe.$$.fragment),St=r(),Re=i("p"),Re.textContent=ro,lt=r(),d(pe.$$.fragment),mt=r(),K=i("div"),d(ue.$$.fragment),Wt=r(),ze=i("p"),ze.textContent=no,ft=r(),d(_e.$$.fragment),pt=r(),X=i("div"),d(ge.$$.fragment),jt=r(),Fe=i("p"),Fe.textContent=io,ut=r(),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=n(e),P=a(e,"P",{}),g(P).forEach(o),$e=n(e),c(E.$$.fragment,e),Ne=n(e),I=a(e,"P",{"data-svelte-h":!0}),$(I)!=="svelte-itqz7g"&&(I.textContent=Bt),qe=n(e),c(O.$$.fragment,e),Ee=n(e),x=a(e,"DIV",{class:!0});var he=g(x);c(S.$$.fragment,he),Dt=n(he),Ae=a(he,"P",{"data-svelte-h":!0}),$(Ae)!=="svelte-12lirf9"&&(Ae.textContent=Ut),he.forEach(o),Ie=n(e),c(W.$$.fragment,e),Oe=n(e),y=a(e,"DIV",{class:!0});var gt=g(y);c(j.$$.fragment,gt),Tt=n(gt),be=a(gt,"P",{"data-svelte-h":!0}),$(be)!=="svelte-zp073y"&&(be.textContent=Ht),gt.forEach(o),Se=n(e),c(B.$$.fragment,e),We=n(e),v=a(e,"DIV",{class:!0});var Ve=g(v);c(U.$$.fragment,Ve),Rt=n(Ve),Pe=a(Ve,"P",{"data-svelte-h":!0}),$(Pe)!=="svelte-168rx5w"&&(Pe.textContent=Mt),zt=n(Ve),c(N.$$.fragment,Ve),Ve.forEach(o),je=n(e),c(H.$$.fragment,e),Be=n(e),w=a(e,"DIV",{class:!0});var ht=g(w);c(M.$$.fragment,ht),Ft=n(ht),ve=a(ht,"P",{"data-svelte-h":!0}),$(ve)!=="svelte-z73n2i"&&(ve.textContent=Gt),ht.forEach(o),Ue=n(e),c(G.$$.fragment,e),He=n(e),C=a(e,"DIV",{class:!0});var $t=g(C);c(J.$$.fragment,$t),Vt=n($t),xe=a($t,"P",{"data-svelte-h":!0}),$(xe)!=="svelte-yo3yo9"&&(xe.textContent=Jt),$t.forEach(o),Me=n(e),c(Q.$$.fragment,e),Ge=n(e),L=a(e,"DIV",{class:!0});var At=g(L);c(Y.$$.fragment,At),Kt=n(At),ye=a(At,"P",{"data-svelte-h":!0}),$(ye)!=="svelte-1gjwzkd"&&(ye.textContent=Qt),At.forEach(o),Je=n(e),c(Z.$$.fragment,e),Qe=n(e),k=a(e,"DIV",{class:!0});var bt=g(k);c(ee.$$.fragment,bt),Xt=n(bt),we=a(bt,"P",{"data-svelte-h":!0}),$(we)!=="svelte-pottg0"&&(we.textContent=Yt),bt.forEach(o),Ye=n(e),c(te.$$.fragment,e),Ze=n(e),D=a(e,"DIV",{class:!0});var Pt=g(D);c(oe.$$.fragment,Pt),Nt=n(Pt),Ce=a(Pt,"P",{"data-svelte-h":!0}),$(Ce)!=="svelte-yqqibm"&&(Ce.textContent=Zt),Pt.forEach(o),et=n(e),c(se.$$.fragment,e),tt=n(e),T=a(e,"DIV",{class:!0});var vt=g(T);c(re.$$.fragment,vt),qt=n(vt),Le=a(vt,"P",{"data-svelte-h":!0}),$(Le)!=="svelte-hw86c4"&&(Le.textContent=eo),vt.forEach(o),ot=n(e),c(ne.$$.fragment,e),st=n(e),R=a(e,"DIV",{class:!0});var xt=g(R);c(ie.$$.fragment,xt),Et=n(xt),ke=a(xt,"P",{"data-svelte-h":!0}),$(ke)!=="svelte-zfgvyc"&&(ke.textContent=to),xt.forEach(o),rt=n(e),c(ae.$$.fragment,e),nt=n(e),z=a(e,"DIV",{class:!0});var yt=g(z);c(de.$$.fragment,yt),It=n(yt),De=a(yt,"P",{"data-svelte-h":!0}),$(De)!=="svelte-10td8ls"&&(De.textContent=oo),yt.forEach(o),it=n(e),c(ce.$$.fragment,e),at=n(e),F=a(e,"DIV",{class:!0});var wt=g(F);c(le.$$.fragment,wt),Ot=n(wt),Te=a(wt,"P",{"data-svelte-h":!0}),$(Te)!=="svelte-yqwtom"&&(Te.textContent=so),wt.forEach(o),dt=n(e),c(me.$$.fragment,e),ct=n(e),V=a(e,"DIV",{class:!0});var Ct=g(V);c(fe.$$.fragment,Ct),St=n(Ct),Re=a(Ct,"P",{"data-svelte-h":!0}),$(Re)!=="svelte-10eh8wb"&&(Re.textContent=ro),Ct.forEach(o),lt=n(e),c(pe.$$.fragment,e),mt=n(e),K=a(e,"DIV",{class:!0});var Lt=g(K);c(ue.$$.fragment,Lt),Wt=n(Lt),ze=a(Lt,"P",{"data-svelte-h":!0}),$(ze)!=="svelte-16xjg0o"&&(ze.textContent=no),Lt.forEach(o),ft=n(e),c(_e.$$.fragment,e),pt=n(e),X=a(e,"DIV",{class:!0});var kt=g(X);c(ge.$$.fragment,kt),jt=n(kt),Fe=a(kt,"P",{"data-svelte-h":!0}),$(Fe)!=="svelte-15dojbg"&&(Fe.textContent=io),kt.forEach(o),ut=n(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(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(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(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,w,t),m(M,w,null),l(w,Ft),l(w,ve),s(e,Ue,t),m(G,e,t),s(e,He,t),s(e,C,t),m(J,C,null),l(C,Vt),l(C,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,we),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,Ce),s(e,et,t),m(se,e,t),s(e,tt,t),s(e,T,t),m(re,T,null),l(T,qt),l(T,Le),s(e,ot,t),m(ne,e,t),s(e,st,t),s(e,R,t),m(ie,R,null),l(R,Et),l(R,ke),s(e,rt,t),m(ae,e,t),s(e,nt,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(re.$$.fragment,e),f(ne.$$.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(re.$$.fragment,e),p(ne.$$.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(w),o(Ue),o(He),o(C),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(rt),o(nt),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(re),u(ne,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};
