import{S as En,i as Pn,s as On,e as n,k as l,w as h,t as r,M as Bn,c as s,d as t,m as c,a as i,x as g,h as d,b as a,G as e,g as p,y as b,L as In,q as v,o as y,B as D,v as jn}from"../../../chunks/vendor-hf-doc-builder.js";import{D as q}from"../../../chunks/Docstring-hf-doc-builder.js";import{I as Ge}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function zn(Wt){let U,Qe,C,E,Te,W,Ao,Ae,Mo,Ye,P,$o,K,Fo,qo,Ze,ve,Eo,eo,ye,X,Po,J,Oo,Bo,oo,T,O,Me,H,Io,$e,jo,to,f,G,zo,Fe,So,Lo,Q,Vo,De,Ro,Wo,Ko,B,Y,Xo,Z,Jo,Ne,Ho,Go,Qo,w,ee,Yo,qe,Zo,et,Ee,ot,tt,I,oe,nt,Pe,st,it,j,te,at,Oe,rt,no,A,z,Be,ne,dt,Ie,lt,so,M,se,ct,ie,mt,ke,pt,ft,io,$,S,je,ae,ut,ze,_t,ao,u,re,ht,Se,gt,bt,de,vt,xe,yt,Dt,Nt,le,kt,ce,xt,wt,Ut,Le,Ct,Tt,k,Ve,me,At,Mt,Re,pe,$t,Ft,We,fe,qt,Et,Ke,ue,Pt,ro,F,L,Xe,_e,Ot,Je,Bt,lo,x,he,It,ge,jt,we,zt,St,Lt,V,be,Vt,He,Rt,co;return W=new Ge({}),H=new Ge({}),G=new q({props:{name:"class diffusers.UNet2DConditionModel",anchor:"diffusers.UNet2DConditionModel",parameters:[{name:"sample_size",val:": typing.Optional[int] = None"},{name:"in_channels",val:": int = 4"},{name:"out_channels",val:": int = 4"},{name:"center_input_sample",val:": bool = False"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"freq_shift",val:": int = 0"},{name:"down_block_types",val:": typing.Tuple[str] = ('CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'DownBlock2D')"},{name:"mid_block_type",val:": typing.Optional[str] = 'UNetMidBlock2DCrossAttn'"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D')"},{name:"only_cross_attention",val:": typing.Union[bool, typing.Tuple[bool]] = False"},{name:"block_out_channels",val:": typing.Tuple[int] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": typing.Union[int, typing.Tuple[int]] = 2"},{name:"downsample_padding",val:": int = 1"},{name:"mid_block_scale_factor",val:": float = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"norm_num_groups",val:": typing.Optional[int] = 32"},{name:"norm_eps",val:": float = 1e-05"},{name:"cross_attention_dim",val:": typing.Union[int, typing.Tuple[int]] = 1280"},{name:"transformer_layers_per_block",val:": typing.Union[int, typing.Tuple[int]] = 1"},{name:"encoder_hid_dim",val:": typing.Optional[int] = None"},{name:"encoder_hid_dim_type",val:": typing.Optional[str] = None"},{name:"attention_head_dim",val:": typing.Union[int, typing.Tuple[int]] = 8"},{name:"num_attention_heads",val:": typing.Union[int, typing.Tuple[int], NoneType] = None"},{name:"dual_cross_attention",val:": bool = False"},{name:"use_linear_projection",val:": bool = False"},{name:"class_embed_type",val:": typing.Optional[str] = None"},{name:"addition_embed_type",val:": typing.Optional[str] = None"},{name:"addition_time_embed_dim",val:": typing.Optional[int] = None"},{name:"num_class_embeds",val:": typing.Optional[int] = None"},{name:"upcast_attention",val:": bool = False"},{name:"resnet_time_scale_shift",val:": str = 'default'"},{name:"resnet_skip_time_act",val:": bool = False"},{name:"resnet_out_scale_factor",val:": int = 1.0"},{name:"time_embedding_type",val:": str = 'positional'"},{name:"time_embedding_dim",val:": typing.Optional[int] = None"},{name:"time_embedding_act_fn",val:": typing.Optional[str] = None"},{name:"timestep_post_act",val:": typing.Optional[str] = None"},{name:"time_cond_proj_dim",val:": typing.Optional[int] = None"},{name:"conv_in_kernel",val:": int = 3"},{name:"conv_out_kernel",val:": int = 3"},{name:"projection_class_embeddings_input_dim",val:": typing.Optional[int] = None"},{name:"attention_type",val:": str = 'default'"},{name:"class_embeddings_concat",val:": bool = False"},{name:"mid_block_only_cross_attention",val:": typing.Optional[bool] = None"},{name:"cross_attention_norm",val:": typing.Optional[str] = None"},{name:"addition_embed_type_num_heads",val:" = 64"}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code> or <code>Tuple[int, int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Height and width of input/output sample.`,name:"sample_size"},{anchor:"diffusers.UNet2DConditionModel.in_channels",description:"<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; Number of channels in the input sample.",name:"in_channels"},{anchor:"diffusers.UNet2DConditionModel.out_channels",description:"<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.UNet2DConditionModel.center_input_sample",description:"<strong>center_input_sample</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; Whether to center the input sample.",name:"center_input_sample"},{anchor:"diffusers.UNet2DConditionModel.flip_sin_to_cos",description:`<strong>flip_sin_to_cos</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to flip the sin to cos in the time embedding.`,name:"flip_sin_to_cos"},{anchor:"diffusers.UNet2DConditionModel.freq_shift",description:"<strong>freq_shift</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The frequency shift to apply to the time embedding.",name:"freq_shift"},{anchor:"diffusers.UNet2DConditionModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;DownBlock2D&quot;)</code>) &#x2014;
The tuple of downsample blocks to use.`,name:"down_block_types"},{anchor:"diffusers.UNet2DConditionModel.mid_block_type",description:`<strong>mid_block_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;UNetMidBlock2DCrossAttn&quot;</code>) &#x2014;
Block type for middle of UNet, it can be either <code>UNetMidBlock2DCrossAttn</code> or
<code>UNetMidBlock2DSimpleCrossAttn</code>. If <code>None</code>, the mid block layer is skipped.`,name:"mid_block_type"},{anchor:"diffusers.UNet2DConditionModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;UpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;)</code>) &#x2014;
The tuple of upsample blocks to use.`,name:"up_block_types"},{anchor:"diffusers.UNet2DConditionModel.only_cross_attention(bool",description:`<strong>only_cross_attention(<code>bool</code></strong> or <code>Tuple[bool]</code>, <em>optional</em>, default to <code>False</code>) &#x2014;
Whether to include self-attention in the basic transformer blocks, see
<code>BasicTransformerBlock</code>.`,name:"only_cross_attention(bool"},{anchor:"diffusers.UNet2DConditionModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(320, 640, 1280, 1280)</code>) &#x2014;
The tuple of output channels for each block.`,name:"block_out_channels"},{anchor:"diffusers.UNet2DConditionModel.layers_per_block",description:"<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014; The number of layers per block.",name:"layers_per_block"},{anchor:"diffusers.UNet2DConditionModel.downsample_padding",description:"<strong>downsample_padding</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014; The padding to use for the downsampling convolution.",name:"downsample_padding"},{anchor:"diffusers.UNet2DConditionModel.mid_block_scale_factor",description:"<strong>mid_block_scale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014; The scale factor to use for the mid block.",name:"mid_block_scale_factor"},{anchor:"diffusers.UNet2DConditionModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.UNet2DConditionModel.norm_num_groups",description:`<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014; The number of groups to use for the normalization.
If <code>None</code>, normalization and activation layers is skipped in post-processing.`,name:"norm_num_groups"},{anchor:"diffusers.UNet2DConditionModel.norm_eps",description:"<strong>norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014; The epsilon to use for the normalization.",name:"norm_eps"},{anchor:"diffusers.UNet2DConditionModel.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code> or <code>Tuple[int]</code>, <em>optional</em>, defaults to 1280) &#x2014;
The dimension of the cross attention features.`,name:"cross_attention_dim"},{anchor:"diffusers.UNet2DConditionModel.transformer_layers_per_block",description:`<strong>transformer_layers_per_block</strong> (<code>int</code> or <code>Tuple[int]</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of transformer blocks of type <code>BasicTransformerBlock</code>. Only relevant for
<code>CrossAttnDownBlock2D</code>, <code>CrossAttnUpBlock2D</code>,
<code>UNetMidBlock2DCrossAttn</code>.`,name:"transformer_layers_per_block"},{anchor:"diffusers.UNet2DConditionModel.encoder_hid_dim",description:`<strong>encoder_hid_dim</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
If <code>encoder_hid_dim_type</code> is defined, <code>encoder_hidden_states</code> will be projected from <code>encoder_hid_dim</code>
dimension to <code>cross_attention_dim</code>.`,name:"encoder_hid_dim"},{anchor:"diffusers.UNet2DConditionModel.encoder_hid_dim_type",description:`<strong>encoder_hid_dim_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If given, the <code>encoder_hidden_states</code> and potentially other embeddings are down-projected to text
embeddings of dimension <code>cross_attention</code> according to <code>encoder_hid_dim_type</code>.`,name:"encoder_hid_dim_type"},{anchor:"diffusers.UNet2DConditionModel.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014; The dimension of the attention heads.",name:"attention_head_dim"},{anchor:"diffusers.UNet2DConditionModel.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of attention heads. If not defined, defaults to <code>attention_head_dim</code>`,name:"num_attention_heads"},{anchor:"diffusers.UNet2DConditionModel.resnet_time_scale_shift",description:`<strong>resnet_time_scale_shift</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014; Time scale shift config
for ResNet blocks (see <code>ResnetBlock2D</code>). Choose from <code>default</code> or <code>scale_shift</code>.`,name:"resnet_time_scale_shift"},{anchor:"diffusers.UNet2DConditionModel.class_embed_type",description:`<strong>class_embed_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The type of class embedding to use which is ultimately summed with the time embeddings. Choose from <code>None</code>,
<code>&quot;timestep&quot;</code>, <code>&quot;identity&quot;</code>, <code>&quot;projection&quot;</code>, or <code>&quot;simple_projection&quot;</code>.`,name:"class_embed_type"},{anchor:"diffusers.UNet2DConditionModel.addition_embed_type",description:`<strong>addition_embed_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Configures an optional embedding which will be summed with the time embeddings. Choose from <code>None</code> or
&#x201C;text&#x201D;. &#x201C;text&#x201D; will use the <code>TextTimeEmbedding</code> layer.
addition_time_embed_dim &#x2014; (<code>int</code>, <em>optional</em>, defaults to <code>None</code>):
Dimension for the timestep embeddings.`,name:"addition_embed_type"},{anchor:"diffusers.UNet2DConditionModel.num_class_embeds",description:`<strong>num_class_embeds</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Input dimension of the learnable embedding matrix to be projected to <code>time_embed_dim</code>, when performing
class conditioning with <code>class_embed_type</code> equal to <code>None</code>.`,name:"num_class_embeds"},{anchor:"diffusers.UNet2DConditionModel.time_embedding_type",description:`<strong>time_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>positional</code>) &#x2014;
The type of position embedding to use for timesteps. Choose from <code>positional</code> or <code>fourier</code>.`,name:"time_embedding_type"},{anchor:"diffusers.UNet2DConditionModel.time_embedding_dim",description:`<strong>time_embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
An optional override for the dimension of the projected time embedding.`,name:"time_embedding_dim"},{anchor:"diffusers.UNet2DConditionModel.time_embedding_act_fn",description:`<strong>time_embedding_act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional activation function to use only once on the time embeddings before they are passed to the rest of
the UNet. Choose from <code>silu</code>, <code>mish</code>, <code>gelu</code>, and <code>swish</code>.`,name:"time_embedding_act_fn"},{anchor:"diffusers.UNet2DConditionModel.timestep_post_act",description:`<strong>timestep_post_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The second activation function to use in timestep embedding. Choose from <code>silu</code>, <code>mish</code> and <code>gelu</code>.`,name:"timestep_post_act"},{anchor:"diffusers.UNet2DConditionModel.time_cond_proj_dim",description:`<strong>time_cond_proj_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The dimension of <code>cond_proj</code> layer in the timestep embedding.`,name:"time_cond_proj_dim"},{anchor:"diffusers.UNet2DConditionModel.conv_in_kernel",description:"<strong>conv_in_kernel</strong> (<code>int</code>, <em>optional</em>, default to <code>3</code>) &#x2014; The kernel size of <code>conv_in</code> layer.",name:"conv_in_kernel"},{anchor:"diffusers.UNet2DConditionModel.conv_out_kernel",description:"<strong>conv_out_kernel</strong> (<code>int</code>, <em>optional</em>, default to <code>3</code>) &#x2014; The kernel size of <code>conv_out</code> layer.",name:"conv_out_kernel"},{anchor:"diffusers.UNet2DConditionModel.projection_class_embeddings_input_dim",description:`<strong>projection_class_embeddings_input_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; The dimension of the <code>class_labels</code> input when
<code>class_embed_type=&quot;projection&quot;</code>. Required when <code>class_embed_type=&quot;projection&quot;</code>.`,name:"projection_class_embeddings_input_dim"},{anchor:"diffusers.UNet2DConditionModel.class_embeddings_concat",description:`<strong>class_embeddings_concat</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; Whether to concatenate the time
embeddings with the class embeddings.`,name:"class_embeddings_concat"},{anchor:"diffusers.UNet2DConditionModel.mid_block_only_cross_attention",description:`<strong>mid_block_only_cross_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether to use cross attention with the mid block when using the <code>UNetMidBlock2DSimpleCrossAttn</code>. If
<code>only_cross_attention</code> is given as a single boolean and <code>mid_block_only_cross_attention</code> is <code>None</code>, the
<code>only_cross_attention</code> value is used as the value for <code>mid_block_only_cross_attention</code>. Default to <code>False</code>
otherwise.`,name:"mid_block_only_cross_attention"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/models/unet_2d_condition.py#L63"}}),Y=new q({props:{name:"forward",anchor:"diffusers.UNet2DConditionModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{name:"encoder_hidden_states",val:": Tensor"},{name:"class_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"timestep_cond",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"added_cond_kwargs",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"down_block_additional_residuals",val:": typing.Optional[typing.Tuple[torch.Tensor]] = None"},{name:"mid_block_additional_residual",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.forward.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
The noisy input tensor with the following shape <code>(batch, channel, height, width)</code>.`,name:"sample"},{anchor:"diffusers.UNet2DConditionModel.forward.timestep",description:"<strong>timestep</strong> (<code>torch.FloatTensor</code> or <code>float</code> or <code>int</code>) &#x2014; The number of timesteps to denoise an input.",name:"timestep"},{anchor:"diffusers.UNet2DConditionModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>torch.FloatTensor</code>) &#x2014;
The encoder hidden states with shape <code>(batch, sequence_length, feature_dim)</code>.`,name:"encoder_hidden_states"},{anchor:"diffusers.UNet2DConditionModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.Tensor</code>) &#x2014;
A cross-attention mask of shape <code>(batch, sequence_length)</code> is applied to <code>encoder_hidden_states</code>. If
<code>True</code> the mask is kept, otherwise if <code>False</code> it is discarded. Mask will be converted into a bias,
which adds large negative values to the attention scores corresponding to &#x201C;discard&#x201D; tokens.`,name:"encoder_attention_mask"},{anchor:"diffusers.UNet2DConditionModel.forward.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/v0.20.0/en/api/models/unet2d-cond#diffusers.models.unet_2d_condition.UNet2DConditionOutput">UNet2DConditionOutput</a> instead of a plain
tuple.`,name:"return_dict"},{anchor:"diffusers.UNet2DConditionModel.forward.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>.
added_cond_kwargs &#x2014; (<code>dict</code>, <em>optional</em>):
A kwargs dictionary containin additional embeddings that if specified are added to the embeddings that
are passed along to the UNet blocks.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/models/unet_2d_condition.py#L709",returnDescription:`
<p>If <code>return_dict</code> is True, an <a
  href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.models.unet_2d_condition.UNet2DConditionOutput"
>UNet2DConditionOutput</a> is returned, otherwise
a <code>tuple</code> is returned where the first element is the sample tensor.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.models.unet_2d_condition.UNet2DConditionOutput"
>UNet2DConditionOutput</a> or <code>tuple</code></p>
`}}),ee=new q({props:{name:"set_attention_slice",anchor:"diffusers.UNet2DConditionModel.set_attention_slice",parameters:[{name:"slice_size",val:""}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.set_attention_slice.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code> or <code>list(int)</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, input to the attention heads is halved, so attention is computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory is saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/models/unet_2d_condition.py#L640"}}),oe=new q({props:{name:"set_attn_processor",anchor:"diffusers.UNet2DConditionModel.set_attn_processor",parameters:[{name:"processor",val:": typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.XFormersAttnAddedKVProcessor, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.LoRAAttnProcessor2_0, diffusers.models.attention_processor.LoRAAttnAddedKVProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor, typing.Dict[str, typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.XFormersAttnAddedKVProcessor, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.LoRAAttnProcessor2_0, diffusers.models.attention_processor.LoRAAttnAddedKVProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor]]]"}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.set_attn_processor.processor",description:`<strong>processor</strong> (<code>dict</code> of <code>AttentionProcessor</code> or only <code>AttentionProcessor</code>) &#x2014;
The instantiated processor class or a dictionary of processor classes that will be set as the processor
for <strong>all</strong> <code>Attention</code> layers.</p>
<p>If <code>processor</code> is a dict, the key needs to define the path to the corresponding cross attention
processor. This is strongly recommended when setting trainable attention processors.`,name:"processor"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/models/unet_2d_condition.py#L600"}}),te=new q({props:{name:"set_default_attn_processor",anchor:"diffusers.UNet2DConditionModel.set_default_attn_processor",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/models/unet_2d_condition.py#L634"}}),ne=new Ge({}),se=new q({props:{name:"class diffusers.models.unet_2d_condition.UNet2DConditionOutput",anchor:"diffusers.models.unet_2d_condition.UNet2DConditionOutput",parameters:[{name:"sample",val:": FloatTensor = None"}],parametersDescription:[{anchor:"diffusers.models.unet_2d_condition.UNet2DConditionOutput.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
The hidden states output conditioned on <code>encoder_hidden_states</code> input. Output of last layer of model.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/models/unet_2d_condition.py#L51"}}),ae=new Ge({}),re=new q({props:{name:"class diffusers.FlaxUNet2DConditionModel",anchor:"diffusers.FlaxUNet2DConditionModel",parameters:[{name:"sample_size",val:": int = 32"},{name:"in_channels",val:": int = 4"},{name:"out_channels",val:": int = 4"},{name:"down_block_types",val:": typing.Tuple[str] = ('CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'DownBlock2D')"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D')"},{name:"only_cross_attention",val:": typing.Union[bool, typing.Tuple[bool]] = False"},{name:"block_out_channels",val:": typing.Tuple[int] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": int = 2"},{name:"attention_head_dim",val:": typing.Union[int, typing.Tuple[int]] = 8"},{name:"num_attention_heads",val:": typing.Union[int, typing.Tuple[int], NoneType] = None"},{name:"cross_attention_dim",val:": int = 1280"},{name:"dropout",val:": float = 0.0"},{name:"use_linear_projection",val:": bool = False"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"freq_shift",val:": int = 0"},{name:"use_memory_efficient_attention",val:": bool = False"},{name:"parent",val:": typing.Union[typing.Type[flax.linen.module.Module], typing.Type[flax.core.scope.Scope], typing.Type[flax.linen.module._Sentinel], NoneType] = <flax.linen.module._Sentinel object at 0x7f1c1b998b20>"},{name:"name",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"diffusers.FlaxUNet2DConditionModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The size of the input sample.`,name:"sample_size"},{anchor:"diffusers.FlaxUNet2DConditionModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of channels in the input sample.`,name:"in_channels"},{anchor:"diffusers.FlaxUNet2DConditionModel.out_channels",description:`<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of channels in the output.`,name:"out_channels"},{anchor:"diffusers.FlaxUNet2DConditionModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;FlaxCrossAttnDownBlock2D&quot;, &quot;FlaxCrossAttnDownBlock2D&quot;, &quot;FlaxCrossAttnDownBlock2D&quot;, &quot;FlaxDownBlock2D&quot;)</code>) &#x2014;
The tuple of downsample blocks to use.`,name:"down_block_types"},{anchor:"diffusers.FlaxUNet2DConditionModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;FlaxUpBlock2D&quot;, &quot;FlaxCrossAttnUpBlock2D&quot;, &quot;FlaxCrossAttnUpBlock2D&quot;, &quot;FlaxCrossAttnUpBlock2D&quot;)</code>) &#x2014;
The tuple of upsample blocks to use.`,name:"up_block_types"},{anchor:"diffusers.FlaxUNet2DConditionModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(320, 640, 1280, 1280)</code>) &#x2014;
The tuple of output channels for each block.`,name:"block_out_channels"},{anchor:"diffusers.FlaxUNet2DConditionModel.layers_per_block",description:`<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The number of layers per block.`,name:"layers_per_block"},{anchor:"diffusers.FlaxUNet2DConditionModel.attention_head_dim",description:`<strong>attention_head_dim</strong> (<code>int</code> or <code>Tuple[int]</code>, <em>optional</em>, defaults to 8) &#x2014;
The dimension of the attention heads.`,name:"attention_head_dim"},{anchor:"diffusers.FlaxUNet2DConditionModel.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code> or <code>Tuple[int]</code>, <em>optional</em>) &#x2014;
The number of attention heads.`,name:"num_attention_heads"},{anchor:"diffusers.FlaxUNet2DConditionModel.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
The dimension of the cross attention features.`,name:"cross_attention_dim"},{anchor:"diffusers.FlaxUNet2DConditionModel.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
Dropout probability for down, up and bottleneck blocks.`,name:"dropout"},{anchor:"diffusers.FlaxUNet2DConditionModel.flip_sin_to_cos",description:`<strong>flip_sin_to_cos</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to flip the sin to cos in the time embedding.`,name:"flip_sin_to_cos"},{anchor:"diffusers.FlaxUNet2DConditionModel.freq_shift",description:"<strong>freq_shift</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The frequency shift to apply to the time embedding.",name:"freq_shift"},{anchor:"diffusers.FlaxUNet2DConditionModel.use_memory_efficient_attention",description:`<strong>use_memory_efficient_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Enable memory efficient attention as described <a href="https://arxiv.org/abs/2112.05682" rel="nofollow">here</a>.`,name:"use_memory_efficient_attention"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/models/unet_2d_condition_flax.py#L49"}}),_e=new Ge({}),he=new q({props:{name:"class diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput",anchor:"diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput",parameters:[{name:"sample",val:": Array"}],parametersDescription:[{anchor:"diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput.sample",description:`<strong>sample</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
The hidden states output conditioned on <code>encoder_hidden_states</code> input. Output of last layer of model.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/models/unet_2d_condition_flax.py#L36"}}),be=new q({props:{name:"replace",anchor:"diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/flax/struct.py#L111"}}),{c(){U=n("meta"),Qe=l(),C=n("h1"),E=n("a"),Te=n("span"),h(W.$$.fragment),Ao=l(),Ae=n("span"),Mo=r("UNet2DConditionModel"),Ye=l(),P=n("p"),$o=r("The "),K=n("a"),Fo=r("UNet"),qo=r(" model was originally introduced by Ronneberger et al for biomedical image segmentation, but it is also commonly used in \u{1F917} Diffusers because it outputs images that are the same size as the input. It is one of the most important components of a diffusion system because it facilitates the actual diffusion process. There are several variants of the UNet model in \u{1F917} Diffusers, depending on it\u2019s number of dimensions and whether it is a conditional model or not. This is a 2D UNet conditional model."),Ze=l(),ve=n("p"),Eo=r("The abstract from the paper is:"),eo=l(),ye=n("p"),X=n("em"),Po=r("There is large consent that successful training of deep networks requires many thousand annotated training samples. In this paper, we present a network and training strategy that relies on the strong use of data augmentation to use the available annotated samples more efficiently. The architecture consists of a contracting path to capture context and a symmetric expanding path that enables precise localization. We show that such a network can be trained end-to-end from very few images and outperforms the prior best method (a sliding-window convolutional network) on the ISBI challenge for segmentation of neuronal structures in electron microscopic stacks. Using the same network trained on transmitted light microscopy images (phase contrast and DIC) we won the ISBI cell tracking challenge 2015 in these categories by a large margin. Moreover, the network is fast. Segmentation of a 512x512 image takes less than a second on a recent GPU. The full implementation (based on Caffe) and the trained networks are available at "),J=n("a"),Oo=r("http://lmb.informatik.uni-freiburg.de/people/ronneber/u-net"),Bo=r("."),oo=l(),T=n("h2"),O=n("a"),Me=n("span"),h(H.$$.fragment),Io=l(),$e=n("span"),jo=r("UNet2DConditionModel"),to=l(),f=n("div"),h(G.$$.fragment),zo=l(),Fe=n("p"),So=r(`A conditional 2D UNet model that takes a noisy sample, conditional state, and a timestep and returns a sample
shaped output.`),Lo=l(),Q=n("p"),Vo=r("This model inherits from "),De=n("a"),Ro=r("ModelMixin"),Wo=r(`. Check the superclass documentation for it\u2019s generic methods implemented
for all models (such as downloading or saving).`),Ko=l(),B=n("div"),h(Y.$$.fragment),Xo=l(),Z=n("p"),Jo=r("The "),Ne=n("a"),Ho=r("UNet2DConditionModel"),Go=r(" forward method."),Qo=l(),w=n("div"),h(ee.$$.fragment),Yo=l(),qe=n("p"),Zo=r("Enable sliced attention computation."),et=l(),Ee=n("p"),ot=r(`When this option is enabled, the attention module splits the input tensor in slices to compute attention in
several steps. This is useful for saving some memory in exchange for a small decrease in speed.`),tt=l(),I=n("div"),h(oe.$$.fragment),nt=l(),Pe=n("p"),st=r("Sets the attention processor to use to compute attention."),it=l(),j=n("div"),h(te.$$.fragment),at=l(),Oe=n("p"),rt=r("Disables custom attention processors and sets the default attention implementation."),no=l(),A=n("h2"),z=n("a"),Be=n("span"),h(ne.$$.fragment),dt=l(),Ie=n("span"),lt=r("UNet2DConditionOutput"),so=l(),M=n("div"),h(se.$$.fragment),ct=l(),ie=n("p"),mt=r("The output of "),ke=n("a"),pt=r("UNet2DConditionModel"),ft=r("."),io=l(),$=n("h2"),S=n("a"),je=n("span"),h(ae.$$.fragment),ut=l(),ze=n("span"),_t=r("FlaxUNet2DConditionModel"),ao=l(),u=n("div"),h(re.$$.fragment),ht=l(),Se=n("p"),gt=r(`A conditional 2D UNet model that takes a noisy sample, conditional state, and a timestep and returns a sample
shaped output.`),bt=l(),de=n("p"),vt=r("This model inherits from "),xe=n("a"),yt=r("FlaxModelMixin"),Dt=r(`. Check the superclass documentation for it\u2019s generic methods
implemented for all models (such as downloading or saving).`),Nt=l(),le=n("p"),kt=r("This model is also a Flax Linen "),ce=n("a"),xt=r("flax.linen.Module"),wt=r(`
subclass. Use it as a regular Flax Linen module and refer to the Flax documentation for all matters related to its
general usage and behavior.`),Ut=l(),Le=n("p"),Ct=r("Inherent JAX features such as the following are supported:"),Tt=l(),k=n("ul"),Ve=n("li"),me=n("a"),At=r("Just-In-Time (JIT) compilation"),Mt=l(),Re=n("li"),pe=n("a"),$t=r("Automatic Differentiation"),Ft=l(),We=n("li"),fe=n("a"),qt=r("Vectorization"),Et=l(),Ke=n("li"),ue=n("a"),Pt=r("Parallelization"),ro=l(),F=n("h2"),L=n("a"),Xe=n("span"),h(_e.$$.fragment),Ot=l(),Je=n("span"),Bt=r("FlaxUNet2DConditionOutput"),lo=l(),x=n("div"),h(he.$$.fragment),It=l(),ge=n("p"),jt=r("The output of "),we=n("a"),zt=r("FlaxUNet2DConditionModel"),St=r("."),Lt=l(),V=n("div"),h(be.$$.fragment),Vt=l(),He=n("p"),Rt=r("\u201CReturns a new object replacing the specified fields with new values."),this.h()},l(o){const m=Bn('[data-svelte="svelte-1phssyn"]',document.head);U=s(m,"META",{name:!0,content:!0}),m.forEach(t),Qe=c(o),C=s(o,"H1",{class:!0});var mo=i(C);E=s(mo,"A",{id:!0,class:!0,href:!0});var Kt=i(E);Te=s(Kt,"SPAN",{});var Xt=i(Te);g(W.$$.fragment,Xt),Xt.forEach(t),Kt.forEach(t),Ao=c(mo),Ae=s(mo,"SPAN",{});var Jt=i(Ae);Mo=d(Jt,"UNet2DConditionModel"),Jt.forEach(t),mo.forEach(t),Ye=c(o),P=s(o,"P",{});var po=i(P);$o=d(po,"The "),K=s(po,"A",{href:!0,rel:!0});var Ht=i(K);Fo=d(Ht,"UNet"),Ht.forEach(t),qo=d(po," model was originally introduced by Ronneberger et al for biomedical image segmentation, but it is also commonly used in \u{1F917} Diffusers because it outputs images that are the same size as the input. It is one of the most important components of a diffusion system because it facilitates the actual diffusion process. There are several variants of the UNet model in \u{1F917} Diffusers, depending on it\u2019s number of dimensions and whether it is a conditional model or not. This is a 2D UNet conditional model."),po.forEach(t),Ze=c(o),ve=s(o,"P",{});var Gt=i(ve);Eo=d(Gt,"The abstract from the paper is:"),Gt.forEach(t),eo=c(o),ye=s(o,"P",{});var Qt=i(ye);X=s(Qt,"EM",{});var fo=i(X);Po=d(fo,"There is large consent that successful training of deep networks requires many thousand annotated training samples. In this paper, we present a network and training strategy that relies on the strong use of data augmentation to use the available annotated samples more efficiently. The architecture consists of a contracting path to capture context and a symmetric expanding path that enables precise localization. We show that such a network can be trained end-to-end from very few images and outperforms the prior best method (a sliding-window convolutional network) on the ISBI challenge for segmentation of neuronal structures in electron microscopic stacks. Using the same network trained on transmitted light microscopy images (phase contrast and DIC) we won the ISBI cell tracking challenge 2015 in these categories by a large margin. Moreover, the network is fast. Segmentation of a 512x512 image takes less than a second on a recent GPU. The full implementation (based on Caffe) and the trained networks are available at "),J=s(fo,"A",{href:!0,rel:!0});var Yt=i(J);Oo=d(Yt,"http://lmb.informatik.uni-freiburg.de/people/ronneber/u-net"),Yt.forEach(t),Bo=d(fo,"."),fo.forEach(t),Qt.forEach(t),oo=c(o),T=s(o,"H2",{class:!0});var uo=i(T);O=s(uo,"A",{id:!0,class:!0,href:!0});var Zt=i(O);Me=s(Zt,"SPAN",{});var en=i(Me);g(H.$$.fragment,en),en.forEach(t),Zt.forEach(t),Io=c(uo),$e=s(uo,"SPAN",{});var on=i($e);jo=d(on,"UNet2DConditionModel"),on.forEach(t),uo.forEach(t),to=c(o),f=s(o,"DIV",{class:!0});var _=i(f);g(G.$$.fragment,_),zo=c(_),Fe=s(_,"P",{});var tn=i(Fe);So=d(tn,`A conditional 2D UNet model that takes a noisy sample, conditional state, and a timestep and returns a sample
shaped output.`),tn.forEach(t),Lo=c(_),Q=s(_,"P",{});var _o=i(Q);Vo=d(_o,"This model inherits from "),De=s(_o,"A",{href:!0});var nn=i(De);Ro=d(nn,"ModelMixin"),nn.forEach(t),Wo=d(_o,`. Check the superclass documentation for it\u2019s generic methods implemented
for all models (such as downloading or saving).`),_o.forEach(t),Ko=c(_),B=s(_,"DIV",{class:!0});var ho=i(B);g(Y.$$.fragment,ho),Xo=c(ho),Z=s(ho,"P",{});var go=i(Z);Jo=d(go,"The "),Ne=s(go,"A",{href:!0});var sn=i(Ne);Ho=d(sn,"UNet2DConditionModel"),sn.forEach(t),Go=d(go," forward method."),go.forEach(t),ho.forEach(t),Qo=c(_),w=s(_,"DIV",{class:!0});var Ue=i(w);g(ee.$$.fragment,Ue),Yo=c(Ue),qe=s(Ue,"P",{});var an=i(qe);Zo=d(an,"Enable sliced attention computation."),an.forEach(t),et=c(Ue),Ee=s(Ue,"P",{});var rn=i(Ee);ot=d(rn,`When this option is enabled, the attention module splits the input tensor in slices to compute attention in
several steps. This is useful for saving some memory in exchange for a small decrease in speed.`),rn.forEach(t),Ue.forEach(t),tt=c(_),I=s(_,"DIV",{class:!0});var bo=i(I);g(oe.$$.fragment,bo),nt=c(bo),Pe=s(bo,"P",{});var dn=i(Pe);st=d(dn,"Sets the attention processor to use to compute attention."),dn.forEach(t),bo.forEach(t),it=c(_),j=s(_,"DIV",{class:!0});var vo=i(j);g(te.$$.fragment,vo),at=c(vo),Oe=s(vo,"P",{});var ln=i(Oe);rt=d(ln,"Disables custom attention processors and sets the default attention implementation."),ln.forEach(t),vo.forEach(t),_.forEach(t),no=c(o),A=s(o,"H2",{class:!0});var yo=i(A);z=s(yo,"A",{id:!0,class:!0,href:!0});var cn=i(z);Be=s(cn,"SPAN",{});var mn=i(Be);g(ne.$$.fragment,mn),mn.forEach(t),cn.forEach(t),dt=c(yo),Ie=s(yo,"SPAN",{});var pn=i(Ie);lt=d(pn,"UNet2DConditionOutput"),pn.forEach(t),yo.forEach(t),so=c(o),M=s(o,"DIV",{class:!0});var Do=i(M);g(se.$$.fragment,Do),ct=c(Do),ie=s(Do,"P",{});var No=i(ie);mt=d(No,"The output of "),ke=s(No,"A",{href:!0});var fn=i(ke);pt=d(fn,"UNet2DConditionModel"),fn.forEach(t),ft=d(No,"."),No.forEach(t),Do.forEach(t),io=c(o),$=s(o,"H2",{class:!0});var ko=i($);S=s(ko,"A",{id:!0,class:!0,href:!0});var un=i(S);je=s(un,"SPAN",{});var _n=i(je);g(ae.$$.fragment,_n),_n.forEach(t),un.forEach(t),ut=c(ko),ze=s(ko,"SPAN",{});var hn=i(ze);_t=d(hn,"FlaxUNet2DConditionModel"),hn.forEach(t),ko.forEach(t),ao=c(o),u=s(o,"DIV",{class:!0});var N=i(u);g(re.$$.fragment,N),ht=c(N),Se=s(N,"P",{});var gn=i(Se);gt=d(gn,`A conditional 2D UNet model that takes a noisy sample, conditional state, and a timestep and returns a sample
shaped output.`),gn.forEach(t),bt=c(N),de=s(N,"P",{});var xo=i(de);vt=d(xo,"This model inherits from "),xe=s(xo,"A",{href:!0});var bn=i(xe);yt=d(bn,"FlaxModelMixin"),bn.forEach(t),Dt=d(xo,`. Check the superclass documentation for it\u2019s generic methods
implemented for all models (such as downloading or saving).`),xo.forEach(t),Nt=c(N),le=s(N,"P",{});var wo=i(le);kt=d(wo,"This model is also a Flax Linen "),ce=s(wo,"A",{href:!0,rel:!0});var vn=i(ce);xt=d(vn,"flax.linen.Module"),vn.forEach(t),wt=d(wo,`
subclass. Use it as a regular Flax Linen module and refer to the Flax documentation for all matters related to its
general usage and behavior.`),wo.forEach(t),Ut=c(N),Le=s(N,"P",{});var yn=i(Le);Ct=d(yn,"Inherent JAX features such as the following are supported:"),yn.forEach(t),Tt=c(N),k=s(N,"UL",{});var R=i(k);Ve=s(R,"LI",{});var Dn=i(Ve);me=s(Dn,"A",{href:!0,rel:!0});var Nn=i(me);At=d(Nn,"Just-In-Time (JIT) compilation"),Nn.forEach(t),Dn.forEach(t),Mt=c(R),Re=s(R,"LI",{});var kn=i(Re);pe=s(kn,"A",{href:!0,rel:!0});var xn=i(pe);$t=d(xn,"Automatic Differentiation"),xn.forEach(t),kn.forEach(t),Ft=c(R),We=s(R,"LI",{});var wn=i(We);fe=s(wn,"A",{href:!0,rel:!0});var Un=i(fe);qt=d(Un,"Vectorization"),Un.forEach(t),wn.forEach(t),Et=c(R),Ke=s(R,"LI",{});var Cn=i(Ke);ue=s(Cn,"A",{href:!0,rel:!0});var Tn=i(ue);Pt=d(Tn,"Parallelization"),Tn.forEach(t),Cn.forEach(t),R.forEach(t),N.forEach(t),ro=c(o),F=s(o,"H2",{class:!0});var Uo=i(F);L=s(Uo,"A",{id:!0,class:!0,href:!0});var An=i(L);Xe=s(An,"SPAN",{});var Mn=i(Xe);g(_e.$$.fragment,Mn),Mn.forEach(t),An.forEach(t),Ot=c(Uo),Je=s(Uo,"SPAN",{});var $n=i(Je);Bt=d($n,"FlaxUNet2DConditionOutput"),$n.forEach(t),Uo.forEach(t),lo=c(o),x=s(o,"DIV",{class:!0});var Ce=i(x);g(he.$$.fragment,Ce),It=c(Ce),ge=s(Ce,"P",{});var Co=i(ge);jt=d(Co,"The output of "),we=s(Co,"A",{href:!0});var Fn=i(we);zt=d(Fn,"FlaxUNet2DConditionModel"),Fn.forEach(t),St=d(Co,"."),Co.forEach(t),Lt=c(Ce),V=s(Ce,"DIV",{class:!0});var To=i(V);g(be.$$.fragment,To),Vt=c(To),He=s(To,"P",{});var qn=i(He);Rt=d(qn,"\u201CReturns a new object replacing the specified fields with new values."),qn.forEach(t),To.forEach(t),Ce.forEach(t),this.h()},h(){a(U,"name","hf:doc:metadata"),a(U,"content",JSON.stringify(Sn)),a(E,"id","unet2dconditionmodel"),a(E,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),a(E,"href","#unet2dconditionmodel"),a(C,"class","relative group"),a(K,"href","https://huggingface.co/papers/1505.04597"),a(K,"rel","nofollow"),a(J,"href","http://lmb.informatik.uni-freiburg.de/people/ronneber/u-net"),a(J,"rel","nofollow"),a(O,"id","diffusers.UNet2DConditionModel"),a(O,"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"),a(O,"href","#diffusers.UNet2DConditionModel"),a(T,"class","relative group"),a(De,"href","/docs/diffusers/v0.20.0/en/api/models/overview#diffusers.ModelMixin"),a(Ne,"href","/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel"),a(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(f,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(z,"id","diffusers.models.unet_2d_condition.UNet2DConditionOutput"),a(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"),a(z,"href","#diffusers.models.unet_2d_condition.UNet2DConditionOutput"),a(A,"class","relative group"),a(ke,"href","/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel"),a(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(S,"id","diffusers.FlaxUNet2DConditionModel"),a(S,"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"),a(S,"href","#diffusers.FlaxUNet2DConditionModel"),a($,"class","relative group"),a(xe,"href","/docs/diffusers/v0.20.0/en/api/models/overview#diffusers.FlaxModelMixin"),a(ce,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),a(ce,"rel","nofollow"),a(me,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),a(me,"rel","nofollow"),a(pe,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),a(pe,"rel","nofollow"),a(fe,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),a(fe,"rel","nofollow"),a(ue,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),a(ue,"rel","nofollow"),a(u,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(L,"id","diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),a(L,"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"),a(L,"href","#diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),a(F,"class","relative group"),a(we,"href","/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.FlaxUNet2DConditionModel"),a(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(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(o,m){e(document.head,U),p(o,Qe,m),p(o,C,m),e(C,E),e(E,Te),b(W,Te,null),e(C,Ao),e(C,Ae),e(Ae,Mo),p(o,Ye,m),p(o,P,m),e(P,$o),e(P,K),e(K,Fo),e(P,qo),p(o,Ze,m),p(o,ve,m),e(ve,Eo),p(o,eo,m),p(o,ye,m),e(ye,X),e(X,Po),e(X,J),e(J,Oo),e(X,Bo),p(o,oo,m),p(o,T,m),e(T,O),e(O,Me),b(H,Me,null),e(T,Io),e(T,$e),e($e,jo),p(o,to,m),p(o,f,m),b(G,f,null),e(f,zo),e(f,Fe),e(Fe,So),e(f,Lo),e(f,Q),e(Q,Vo),e(Q,De),e(De,Ro),e(Q,Wo),e(f,Ko),e(f,B),b(Y,B,null),e(B,Xo),e(B,Z),e(Z,Jo),e(Z,Ne),e(Ne,Ho),e(Z,Go),e(f,Qo),e(f,w),b(ee,w,null),e(w,Yo),e(w,qe),e(qe,Zo),e(w,et),e(w,Ee),e(Ee,ot),e(f,tt),e(f,I),b(oe,I,null),e(I,nt),e(I,Pe),e(Pe,st),e(f,it),e(f,j),b(te,j,null),e(j,at),e(j,Oe),e(Oe,rt),p(o,no,m),p(o,A,m),e(A,z),e(z,Be),b(ne,Be,null),e(A,dt),e(A,Ie),e(Ie,lt),p(o,so,m),p(o,M,m),b(se,M,null),e(M,ct),e(M,ie),e(ie,mt),e(ie,ke),e(ke,pt),e(ie,ft),p(o,io,m),p(o,$,m),e($,S),e(S,je),b(ae,je,null),e($,ut),e($,ze),e(ze,_t),p(o,ao,m),p(o,u,m),b(re,u,null),e(u,ht),e(u,Se),e(Se,gt),e(u,bt),e(u,de),e(de,vt),e(de,xe),e(xe,yt),e(de,Dt),e(u,Nt),e(u,le),e(le,kt),e(le,ce),e(ce,xt),e(le,wt),e(u,Ut),e(u,Le),e(Le,Ct),e(u,Tt),e(u,k),e(k,Ve),e(Ve,me),e(me,At),e(k,Mt),e(k,Re),e(Re,pe),e(pe,$t),e(k,Ft),e(k,We),e(We,fe),e(fe,qt),e(k,Et),e(k,Ke),e(Ke,ue),e(ue,Pt),p(o,ro,m),p(o,F,m),e(F,L),e(L,Xe),b(_e,Xe,null),e(F,Ot),e(F,Je),e(Je,Bt),p(o,lo,m),p(o,x,m),b(he,x,null),e(x,It),e(x,ge),e(ge,jt),e(ge,we),e(we,zt),e(ge,St),e(x,Lt),e(x,V),b(be,V,null),e(V,Vt),e(V,He),e(He,Rt),co=!0},p:In,i(o){co||(v(W.$$.fragment,o),v(H.$$.fragment,o),v(G.$$.fragment,o),v(Y.$$.fragment,o),v(ee.$$.fragment,o),v(oe.$$.fragment,o),v(te.$$.fragment,o),v(ne.$$.fragment,o),v(se.$$.fragment,o),v(ae.$$.fragment,o),v(re.$$.fragment,o),v(_e.$$.fragment,o),v(he.$$.fragment,o),v(be.$$.fragment,o),co=!0)},o(o){y(W.$$.fragment,o),y(H.$$.fragment,o),y(G.$$.fragment,o),y(Y.$$.fragment,o),y(ee.$$.fragment,o),y(oe.$$.fragment,o),y(te.$$.fragment,o),y(ne.$$.fragment,o),y(se.$$.fragment,o),y(ae.$$.fragment,o),y(re.$$.fragment,o),y(_e.$$.fragment,o),y(he.$$.fragment,o),y(be.$$.fragment,o),co=!1},d(o){t(U),o&&t(Qe),o&&t(C),D(W),o&&t(Ye),o&&t(P),o&&t(Ze),o&&t(ve),o&&t(eo),o&&t(ye),o&&t(oo),o&&t(T),D(H),o&&t(to),o&&t(f),D(G),D(Y),D(ee),D(oe),D(te),o&&t(no),o&&t(A),D(ne),o&&t(so),o&&t(M),D(se),o&&t(io),o&&t($),D(ae),o&&t(ao),o&&t(u),D(re),o&&t(ro),o&&t(F),D(_e),o&&t(lo),o&&t(x),D(he),D(be)}}}const Sn={local:"unet2dconditionmodel",sections:[{local:"diffusers.UNet2DConditionModel",title:"UNet2DConditionModel"},{local:"diffusers.models.unet_2d_condition.UNet2DConditionOutput",title:"UNet2DConditionOutput"},{local:"diffusers.FlaxUNet2DConditionModel",title:"FlaxUNet2DConditionModel"},{local:"diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput",title:"FlaxUNet2DConditionOutput"}],title:"UNet2DConditionModel"};function Ln(Wt){return jn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kn extends En{constructor(U){super();Pn(this,U,Ln,zn,On,{})}}export{Kn as default,Sn as metadata};
