Buckets:
LongCatImageTransformer2DModel
The model can be loaded with the following code snippet.
from diffusers import LongCatImageTransformer2DModel
transformer = LongCatImageTransformer2DModel.from_pretrained("meituan-longcat/LongCat-Image ", subfolder="transformer", torch_dtype=torch.bfloat16)
LongCatImageTransformer2DModel[[diffusers.LongCatImageTransformer2DModel]]
The Transformer model introduced in Longcat-Image.
- hidden_states (
torch.FloatTensorof shape(batch size, channel, height, width)) -- Inputhidden_states. - encoder_hidden_states (
torch.FloatTensorof shape(batch size, sequence_len, embed_dims)) -- Conditional embeddings (embeddings computed from the input conditions such as prompts) to use. - timestep (
torch.LongTensor) -- Used to indicate denoising step. - img_ids (
torch.Tensor) -- Image position ids used to compute the rotary positional embeddings. - txt_ids (
torch.Tensor) -- Text position ids used to compute the rotary positional embeddings. - guidance (
torch.Tensor, optional) -- Guidance scale embedding used for guidance-distilled variants of the model. - return_dict (
bool, optional, defaults toTrue) -- Whether or not to return a~models.transformer_2d.Transformer2DModelOutputinstead of a plain tuple.Ifreturn_dictis True, an~models.transformer_2d.Transformer2DModelOutputis returned, otherwise atuplewhere the first element is the sample tensor.
The forward method.
Xet Storage Details
- Size:
- 1.52 kB
- Xet hash:
- 0c2dcdcadc9912bfe29f1546d06f00fad8e78a6d4bd98416aea707f9ec0c5e35
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.