% tinyrox says don't edit this manually, but it can't stop you!
\name{unet_sdxl_native}
\alias{unet_sdxl_native}
\title{Native SDXL UNet}
\usage{
unet_sdxl_native(in_channels = 4L, out_channels = 4L,
                 block_out_channels = c(320L, 640L, 1280L),
                 layers_per_block = 2L,
                 transformer_layers_per_block = c(0L, 2L, 10L),
                 cross_attention_dim = 2048L, attention_head_dim = 64L,
                 addition_embed_dim = 1280L, addition_time_embed_dim = 256L)
}
\arguments{
\item{in_channels}{Input channels (default 4 for latent space)}

\item{out_channels}{Output channels (default 4)}

\item{block_out_channels}{Channel multipliers per block}

\item{layers_per_block}{Number of ResBlocks per down/up block}

\item{transformer_layers_per_block}{Transformer depth per block}

\item{cross_attention_dim}{Context dimension from text encoder}

\item{attention_head_dim}{Dimension per attention head}

\item{addition_embed_dim}{Dimension for additional embeddings}

\item{addition_time_embed_dim}{Dimension for time embedding projection}
}
\value{
An nn_module representing the SDXL UNet
}
\description{
Native R torch implementation of SDXL UNet2DConditionModel.
SDXL has a different architecture from SD21:
- 3 down/up blocks (not 4)
- Variable transformer depth per block
- Additional conditioning via add_embedding
}
