EasyAnimateTransformer3DModel¶
A Diffusion Transformer model for 3D data from EasyAnimate was introduced by Alibaba PAI.
The model can be loaded with the following code snippet.
from mindone.diffusers import EasyAnimateTransformer3DModel
transformer = EasyAnimateTransformer3DModel.from_pretrained("alibaba-pai/EasyAnimateV5.1-12b-zh", subfolder="transformer", mindspore_dtype=ms.float16)
mindone.diffusers.EasyAnimateTransformer3DModel
¶
Bases: ModelMixin
, ConfigMixin
A Transformer model for video-like data in EasyAnimate.
PARAMETER | DESCRIPTION |
---|---|
num_attention_heads |
The number of heads to use for multi-head attention.
TYPE:
|
attention_head_dim |
The number of channels in each head.
TYPE:
|
in_channels |
The number of channels in the input.
TYPE:
|
out_channels |
The number of channels in the output.
TYPE:
|
patch_size |
The size of the patches to use in the patch embedding layer.
TYPE:
|
sample_width |
The width of the input latents.
TYPE:
|
sample_height |
The height of the input latents.
TYPE:
|
activation_fn |
Activation function to use in feed-forward.
TYPE:
|
timestep_activation_fn |
Activation function to use when generating the timestep embeddings.
TYPE:
|
num_layers |
The number of layers of Transformer blocks to use.
TYPE:
|
mmdit_layers |
The number of layers of Multi Modal Transformer blocks to use.
TYPE:
|
dropout |
The dropout probability to use.
TYPE:
|
time_embed_dim |
Output dimension of timestep embeddings.
TYPE:
|
text_embed_dim |
Input dimension of text embeddings from the text encoder.
TYPE:
|
norm_eps |
The epsilon value to use in normalization layers.
TYPE:
|
norm_elementwise_affine |
Whether to use elementwise affine in normalization layers.
TYPE:
|
flip_sin_to_cos |
Whether to flip the sin to cos in the time embedding.
TYPE:
|
time_position_encoding_type |
Type of time position encoding.
TYPE:
|
after_norm |
Flag to apply normalization after.
TYPE:
|
resize_inpaint_mask_directly |
Flag to resize inpaint mask directly.
TYPE:
|
enable_text_attention_mask |
Flag to enable text attention mask.
TYPE:
|
add_noise_in_inpaint_model |
Flag to add noise in inpaint model.
TYPE:
|
Source code in mindone/diffusers/models/transformers/transformer_easyanimate.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
|
mindone.diffusers.models.modeling_outputs.Transformer2DModelOutput
dataclass
¶
Bases: BaseOutput
The output of [Transformer2DModel
].
PARAMETER | DESCRIPTION |
---|---|
`(batch |
The hidden states output conditioned on the
TYPE:
|
Source code in mindone/diffusers/models/modeling_outputs.py
22 23 24 25 26 27 28 29 30 31 32 33 34 |
|