diffsynth 2.2.0__py3-none-any.whl → 2.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- diffsynth/configs/model_configs.py +24 -1
- diffsynth/configs/vram_management_module_maps.py +22 -0
- diffsynth/core/attention/attention.py +1 -1
- diffsynth/core/quant/backends/entropack.py +2 -2
- diffsynth/diffusion/dmd2.py +327 -573
- diffsynth/diffusion/flow_match.py +16 -1
- diffsynth/diffusion/parsers.py +16 -18
- diffsynth/diffusion/runner.py +7 -4
- diffsynth/models/diffsynth_music_dit.py +4 -2
- diffsynth/models/ernie_image_dit.py +0 -1
- diffsynth/models/hidream_o1_image_dit.py +1 -1
- diffsynth/models/krea2_dit.py +10 -5
- diffsynth/models/minimax_h3_controlnet.py +1 -1
- diffsynth/models/minimax_h3_image_dit.py +336 -0
- diffsynth/models/minimax_h3_image_vae.py +375 -0
- diffsynth/models/sensenova_u1_dit.py +1 -1
- diffsynth/models/yue2_mot.py +2 -2
- diffsynth/pipelines/minimax_h3_image.py +560 -0
- diffsynth/pipelines/sensenova_u1_image.py +1 -1
- diffsynth/pipelines/stable_diffusion_xl.py +7 -4
- diffsynth/utils/lora/general.py +11 -3
- diffsynth/utils/state_dict_converters/minimax_h3_image_vae.py +16 -0
- diffsynth/version.py +1 -1
- {diffsynth-2.2.0.dist-info → diffsynth-2.2.1.dist-info}/METADATA +7 -3
- {diffsynth-2.2.0.dist-info → diffsynth-2.2.1.dist-info}/RECORD +28 -24
- {diffsynth-2.2.0.dist-info → diffsynth-2.2.1.dist-info}/WHEEL +0 -0
- {diffsynth-2.2.0.dist-info → diffsynth-2.2.1.dist-info}/licenses/LICENSE +0 -0
- {diffsynth-2.2.0.dist-info → diffsynth-2.2.1.dist-info}/top_level.txt +0 -0
|
@@ -1743,6 +1743,29 @@ minimax_music3_series = [
|
|
|
1743
1743
|
},
|
|
1744
1744
|
]
|
|
1745
1745
|
|
|
1746
|
+
minimax_h3_image_series = [
|
|
1747
|
+
{
|
|
1748
|
+
# Example: ModelConfig(model_id="MiniMax/MiniMax-H3-Image", origin_file_pattern="transformer/model*.safetensors")
|
|
1749
|
+
# Example: ModelConfig(path="./models/train/MiniMax-H3-Image-full-split/epoch-4.safetensors")
|
|
1750
|
+
"model_hash": "cbc654a2ff91b53b57e2556904bdbc5e",
|
|
1751
|
+
"model_name": "minimax_h3_image_dit",
|
|
1752
|
+
"model_class": "diffsynth.models.minimax_h3_image_dit.MiniMaxH3ImageDiT",
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
# Example: ModelConfig(model_id="MiniMax/MiniMax-H3-Image", origin_file_pattern="pdd_fused_heads.safetensors")
|
|
1756
|
+
"model_hash": "af836167abebf4a4701ab436f291a972",
|
|
1757
|
+
"model_name": "minimax_h3_image_pdd_heads",
|
|
1758
|
+
"model_class": "diffsynth.models.minimax_h3_image_dit.MiniMaxH3ImagePDDHeads",
|
|
1759
|
+
},
|
|
1760
|
+
{
|
|
1761
|
+
# Example: ModelConfig(model_id="MiniMax/MiniMax-H3-Image", origin_file_pattern="vae/diffusion_pytorch_model.safetensors")
|
|
1762
|
+
"model_hash": "e16b57e3180a14235ffcaad014ce2772",
|
|
1763
|
+
"model_name": "minimax_h3_image_vae",
|
|
1764
|
+
"model_class": "diffsynth.models.minimax_h3_image_vae.MiniMaxH3ImageVAE",
|
|
1765
|
+
"state_dict_converter": "diffsynth.utils.state_dict_converters.minimax_h3_image_vae.MiniMaxH3ImageVAEStateDictConverter",
|
|
1766
|
+
},
|
|
1767
|
+
]
|
|
1768
|
+
|
|
1746
1769
|
sensenova_u1_series = [
|
|
1747
1770
|
{
|
|
1748
1771
|
# Example: ModelConfig(model_id="SenseNova/SenseNova-U1.5-8B-MoT", origin_file_pattern="model*.safetensors")
|
|
@@ -1857,5 +1880,5 @@ MODEL_CONFIGS = (
|
|
|
1857
1880
|
stable_diffusion_xl_series + stable_diffusion_series + qwen_image_series + qwen_video_edit_series + wan_series + flux_series + flux2_series + ernie_image_series
|
|
1858
1881
|
+ z_image_series + ltx2_series + anima_series + mova_series + joyai_image_series + boogu_image_series + ace_step_series + hidream_o1_image_series
|
|
1859
1882
|
+ image_metrics_series + ideogram4_series + krea2_series + lingbot_video_series + minimax_h3_series + minimax_music3_series + sensenova_u1_series
|
|
1860
|
-
+ yue2_series + qwen_image_21_series + flux3_series + moss_image_series + fibo_series
|
|
1883
|
+
+ yue2_series + qwen_image_21_series + flux3_series + moss_image_series + fibo_series + minimax_h3_image_series
|
|
1861
1884
|
)
|
|
@@ -10,6 +10,24 @@ flux_general_vram_config = {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
VRAM_MANAGEMENT_MODULE_MAPS = {
|
|
13
|
+
"diffsynth.models.minimax_h3_image_dit.MiniMaxH3ImageDiT": {
|
|
14
|
+
"torch.nn.Linear": "diffsynth.core.vram.layers.AutoWrappedLinear",
|
|
15
|
+
"torch.nn.RMSNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
16
|
+
},
|
|
17
|
+
"diffsynth.models.minimax_h3_image_dit.MiniMaxH3ImagePDDHeads": {
|
|
18
|
+
"diffsynth.models.minimax_h3_image_dit._MiniMaxH3ImagePDDHeadParameters": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
19
|
+
},
|
|
20
|
+
"diffsynth.models.minimax_h3_image_vae.MiniMaxH3ImageVAE": {
|
|
21
|
+
"torch.nn.Linear": "diffsynth.core.vram.layers.AutoWrappedLinear",
|
|
22
|
+
"torch.nn.LayerNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
23
|
+
"torch.nn.RMSNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
24
|
+
"torch.nn.Conv2d": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
25
|
+
"torch.nn.Conv3d": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
26
|
+
"torch.nn.GroupNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
27
|
+
"diffsynth.models.minimax_h3_video_vae.BaseConv3d": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
28
|
+
"diffsynth.models.minimax_h3_video_vae.WarpedTensor": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
29
|
+
"diffsynth.models.minimax_h3_video_vae.TemporalIsolatedSpatialGroupNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
30
|
+
},
|
|
13
31
|
"diffsynth.models.minimax_h3_dit.MiniMaxH3DiT": {
|
|
14
32
|
"torch.nn.Linear": "diffsynth.core.vram.layers.AutoWrappedLinear",
|
|
15
33
|
"torch.nn.RMSNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
@@ -115,6 +133,9 @@ VRAM_MANAGEMENT_MODULE_MAPS = {
|
|
|
115
133
|
"diffsynth.models.wan_video_animate_adapter.ConvLayer": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
116
134
|
"diffsynth.models.wan_video_animate_adapter.FusedLeakyReLU": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
117
135
|
"diffsynth.models.wan_video_animate_adapter.RMSNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
136
|
+
"diffsynth.models.wan_video_animate_adapter.Blur": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
137
|
+
"diffsynth.models.wan_video_animate_adapter.EqualConv2d": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
138
|
+
"diffsynth.models.wan_video_animate_adapter.Direction": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
118
139
|
"torch.nn.Linear": "diffsynth.core.vram.layers.AutoWrappedLinear",
|
|
119
140
|
"torch.nn.LayerNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
120
141
|
"torch.nn.Conv1d": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
@@ -150,6 +171,7 @@ VRAM_MANAGEMENT_MODULE_MAPS = {
|
|
|
150
171
|
"torch.nn.LayerNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
151
172
|
"diffsynth.models.wan_video_dit.RMSNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
152
173
|
"torch.nn.Conv2d": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
174
|
+
"torch.nn.MultiheadAttention": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
153
175
|
},
|
|
154
176
|
"diffsynth.models.wan_video_image_encoder.WanImageEncoder": {
|
|
155
177
|
"diffsynth.models.wan_video_image_encoder.VisionTransformer": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
@@ -15,7 +15,7 @@ def initialize_attention_priority():
|
|
|
15
15
|
if os.environ.get('DIFFSYNTH_ATTENTION_IMPLEMENTATION') is not None:
|
|
16
16
|
return os.environ.get('DIFFSYNTH_ATTENTION_IMPLEMENTATION').strip().lower()
|
|
17
17
|
else:
|
|
18
|
-
for name in ["customized_fa_kernel", "flash_attention_4", "flash_attention_3", "flash_attention_2", "
|
|
18
|
+
for name in ["customized_fa_kernel", "flash_attention_4", "flash_attention_3", "flash_attention_2", "xformers"]:
|
|
19
19
|
if name in list_attention_implementations():
|
|
20
20
|
return name
|
|
21
21
|
return "torch"
|
|
@@ -45,13 +45,13 @@ if ENTROPACK_AVAILABLE:
|
|
|
45
45
|
@dataclass
|
|
46
46
|
class EntroPackINT8CodedConfig(BackendConfig, ep.LatticeRANSConfig):
|
|
47
47
|
linear_cls = ep.CompressedINT8Linear
|
|
48
|
-
use_convrot: bool =
|
|
48
|
+
use_convrot: bool = True
|
|
49
49
|
convrot_groupsize: int = 256
|
|
50
50
|
|
|
51
51
|
@dataclass
|
|
52
52
|
class EntroPackINT8RawConfig(BackendConfig, ep.RawConfig):
|
|
53
53
|
linear_cls = ep.CompressedINT8Linear
|
|
54
|
-
use_convrot: bool =
|
|
54
|
+
use_convrot: bool = True
|
|
55
55
|
convrot_groupsize: int = 256
|
|
56
56
|
|
|
57
57
|
|