% tinyrox says don't edit this manually, but it can't stop you!
\name{unet_native}
\alias{unet_native}
\title{Native UNet for Stable Diffusion}
\usage{
unet_native(in_channels = 4L, out_channels = 4L,
            block_out_channels = c(320L, 640L, 1280L, 1280L),
            layers_per_block = 2L, cross_attention_dim = 1024L,
            attention_head_dim = 64L)
}
\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{cross_attention_dim}{Context dimension from text encoder}

\item{attention_head_dim}{Dimension per attention head}
}
\value{
An nn_module representing the UNet
}
\description{
Native R torch implementation of UNet2DConditionModel.
Replaces TorchScript for better GPU compatibility.
}
