Diffusers documentation
HiDreamImageTransformer2DModel
You are viewing main version, which requires installation from source. If you'd like
regular pip install, checkout the latest stable version (v0.33.1).
HiDreamImageTransformer2DModel
A Transformer model for image-like data from HiDream-I1.
The model can be loaded with the following code snippet.
from diffusers import HiDreamImageTransformer2DModel
transformer = HiDreamImageTransformer2DModel.from_pretrained("HiDream-ai/HiDream-I1-Full", subfolder="transformer", torch_dtype=torch.bfloat16)
HiDreamImageTransformer2DModel
class diffusers.HiDreamImageTransformer2DModel
< source >( patch_size: typing.Optional[int] = Nonein_channels: int = 64out_channels: typing.Optional[int] = Nonenum_layers: int = 16num_single_layers: int = 32attention_head_dim: int = 128num_attention_heads: int = 20caption_channels: typing.List[int] = Nonetext_emb_dim: int = 2048num_routed_experts: int = 4num_activated_experts: int = 2axes_dims_rope: typing.Tuple[int, int] = (32, 32)max_resolution: typing.Tuple[int, int] = (128, 128)llama_layers: typing.List[int] = None )
Transformer2DModelOutput
class diffusers.models.modeling_outputs.Transformer2DModelOutput
< source >( sample: torch.Tensor )
Parameters
- sample (
torch.Tensor
of shape(batch_size, num_channels, height, width)
or(batch size, num_vector_embeds - 1, num_latent_pixels)
if Transformer2DModel is discrete) — The hidden states output conditioned on theencoder_hidden_states
input. If discrete, returns probability distributions for the unnoised latent pixels.
The output of Transformer2DModel.