SkyReelsV2Transformer3DModel¶
A Diffusion Transformer model for 3D video-like data was introduced in SkyReels-V2 by the Skywork AI.
The model can be loaded with the following code snippet.
from mindone.diffusers import SkyReelsV2Transformer3DModel
transformer = SkyReelsV2Transformer3DModel.from_pretrained("Skywork/SkyReels-V2-DF-1.3B-540P-Diffusers", subfolder="transformer", mindspore_dtype=ms.bfloat16)
mindone.diffusers.SkyReelsV2Transformer3DModel
¶
Bases: ModelMixin, ConfigMixin, PeftAdapterMixin, FromOriginalModelMixin, CacheMixin, AttentionMixin
A Transformer model for video-like data used in the Wan-based SkyReels-V2 model.
| PARAMETER | DESCRIPTION |
|---|---|
patch_size
|
3D patch dimensions for video embedding (t_patch, h_patch, w_patch).
TYPE:
|
num_attention_heads
|
Fixed length for text embeddings.
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:
|
text_dim
|
Input dimension for text embeddings.
TYPE:
|
freq_dim
|
Dimension for sinusoidal time embeddings.
TYPE:
|
ffn_dim
|
Intermediate dimension in feed-forward network.
TYPE:
|
num_layers
|
The number of layers of transformer blocks to use.
TYPE:
|
window_size
|
Window size for local attention (-1 indicates global attention).
TYPE:
|
cross_attn_norm
|
Enable cross-attention normalization.
TYPE:
|
qk_norm
|
Enable query/key normalization.
TYPE:
|
eps
|
Epsilon value for normalization layers.
TYPE:
|
inject_sample_info
|
Whether to inject sample information into the model.
TYPE:
|
image_dim
|
The dimension of the image embeddings.
TYPE:
|
added_kv_proj_dim
|
The dimension of the added key/value projection.
TYPE:
|
rope_max_seq_len
|
The maximum sequence length for the rotary embeddings.
TYPE:
|
pos_embed_seq_len
|
The sequence length for the positional embeddings.
TYPE:
|
Source code in mindone/diffusers/models/transformers/transformer_skyreels_v2.py
517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 | |
mindone.diffusers.models.modeling_outputs.Transformer2DModelOutput
dataclass
¶
Bases: BaseOutput
The output of [Transformer2DModel].
| PARAMETER | DESCRIPTION |
|---|---|
`
|
The hidden states output conditioned on the
TYPE:
|
Source code in mindone/diffusers/models/modeling_outputs.py
24 25 26 27 28 29 30 31 32 33 34 35 36 | |