diffsynth 2.0.3__tar.gz → 2.0.4__tar.gz

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.
Files changed (412) hide show
  1. {diffsynth-2.0.3/diffsynth.egg-info → diffsynth-2.0.4}/PKG-INFO +1 -1
  2. {diffsynth-2.0.3 → diffsynth-2.0.4}/README.md +8 -1
  3. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/loader/config.py +2 -1
  4. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/loader/file.py +15 -6
  5. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/loader/model.py +5 -3
  6. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/diffusion/base_pipeline.py +1 -0
  7. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/model_loader.py +4 -3
  8. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/pipelines/flux2_image.py +13 -2
  9. {diffsynth-2.0.3 → diffsynth-2.0.4/diffsynth.egg-info}/PKG-INFO +1 -1
  10. diffsynth-2.0.4/diffsynth.egg-info/SOURCES.txt +119 -0
  11. {diffsynth-2.0.3 → diffsynth-2.0.4}/pyproject.toml +1 -1
  12. diffsynth-2.0.3/data/style/move.py +0 -13
  13. diffsynth-2.0.3/data/style/test.py +0 -57
  14. diffsynth-2.0.3/diffsynth.egg-info/SOURCES.txt +0 -431
  15. diffsynth-2.0.3/examples/dev_tools/fix_path.py +0 -43
  16. diffsynth-2.0.3/examples/dev_tools/unit_test.py +0 -121
  17. diffsynth-2.0.3/examples/flux/model_inference/FLEX.2-preview.py +0 -50
  18. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-Kontext-dev.py +0 -54
  19. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-Krea-dev.py +0 -27
  20. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-dev-AttriCtrl.py +0 -19
  21. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-dev-Controlnet-Inpainting-Beta.py +0 -37
  22. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-dev-Controlnet-Union-alpha.py +0 -40
  23. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-dev-Controlnet-Upscaler.py +0 -33
  24. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-dev-EliGen.py +0 -133
  25. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-dev-IP-Adapter.py +0 -24
  26. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-dev-InfiniteYou.py +0 -61
  27. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-dev-LoRA-Encoder.py +0 -38
  28. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-dev-LoRA-Fusion.py +0 -38
  29. diffsynth-2.0.3/examples/flux/model_inference/FLUX.1-dev.py +0 -26
  30. diffsynth-2.0.3/examples/flux/model_inference/Nexus-Gen-Editing.py +0 -37
  31. diffsynth-2.0.3/examples/flux/model_inference/Nexus-Gen-Generation.py +0 -32
  32. diffsynth-2.0.3/examples/flux/model_inference/Step1X-Edit.py +0 -32
  33. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLEX.2-preview.py +0 -61
  34. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-Kontext-dev.py +0 -65
  35. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-Krea-dev.py +0 -38
  36. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-dev-AttriCtrl.py +0 -30
  37. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-dev-Controlnet-Inpainting-Beta.py +0 -48
  38. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-dev-Controlnet-Union-alpha.py +0 -50
  39. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-dev-Controlnet-Upscaler.py +0 -44
  40. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-dev-EliGen.py +0 -144
  41. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-dev-IP-Adapter.py +0 -35
  42. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-dev-InfiniteYou.py +0 -73
  43. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-dev-LoRA-Encoder.py +0 -49
  44. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-dev-LoRA-Fusion.py +0 -38
  45. diffsynth-2.0.3/examples/flux/model_inference_low_vram/FLUX.1-dev.py +0 -37
  46. diffsynth-2.0.3/examples/flux/model_inference_low_vram/Nexus-Gen-Editing.py +0 -48
  47. diffsynth-2.0.3/examples/flux/model_inference_low_vram/Nexus-Gen-Generation.py +0 -43
  48. diffsynth-2.0.3/examples/flux/model_inference_low_vram/Step1X-Edit.py +0 -43
  49. diffsynth-2.0.3/examples/flux/model_training/train.py +0 -193
  50. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLEX.2-preview.py +0 -20
  51. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLUX.1-Kontext-dev.py +0 -26
  52. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLUX.1-Krea-dev.py +0 -20
  53. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLUX.1-dev-AttriCtrl.py +0 -21
  54. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLUX.1-dev-Controlnet-Inpainting-Beta.py +0 -31
  55. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLUX.1-dev-Controlnet-Union-alpha.py +0 -31
  56. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLUX.1-dev-Controlnet-Upscaler.py +0 -30
  57. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLUX.1-dev-IP-Adapter.py +0 -28
  58. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLUX.1-dev-InfiniteYou.py +0 -33
  59. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLUX.1-dev-LoRA-Encoder.py +0 -24
  60. diffsynth-2.0.3/examples/flux/model_training/validate_full/FLUX.1-dev.py +0 -20
  61. diffsynth-2.0.3/examples/flux/model_training/validate_full/Nexus-Gen.py +0 -28
  62. diffsynth-2.0.3/examples/flux/model_training/validate_full/Step1X-Edit.py +0 -25
  63. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLEX.2-preview.py +0 -18
  64. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLUX.1-Kontext-dev.py +0 -24
  65. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLUX.1-Krea-dev.py +0 -18
  66. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLUX.1-dev-AttriCtrl.py +0 -19
  67. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLUX.1-dev-Controlnet-Inpainting-Beta.py +0 -29
  68. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLUX.1-dev-Controlnet-Union-alpha.py +0 -29
  69. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLUX.1-dev-Controlnet-Upscaler.py +0 -28
  70. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLUX.1-dev-EliGen.py +0 -33
  71. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLUX.1-dev-IP-Adapter.py +0 -26
  72. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLUX.1-dev-InfiniteYou.py +0 -28
  73. diffsynth-2.0.3/examples/flux/model_training/validate_lora/FLUX.1-dev.py +0 -18
  74. diffsynth-2.0.3/examples/flux/model_training/validate_lora/Nexus-Gen.py +0 -26
  75. diffsynth-2.0.3/examples/flux/model_training/validate_lora/Step1X-Edit.py +0 -23
  76. diffsynth-2.0.3/examples/flux2/model_inference/FLUX.2-dev.py +0 -27
  77. diffsynth-2.0.3/examples/flux2/model_inference_low_vram/FLUX.2-dev.py +0 -27
  78. diffsynth-2.0.3/examples/flux2/model_training/train.py +0 -143
  79. diffsynth-2.0.3/examples/flux2/model_training/validate_lora/FLUX.2-dev.py +0 -28
  80. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-2512.py +0 -17
  81. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Blockwise-ControlNet-Canny.py +0 -31
  82. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Blockwise-ControlNet-Depth.py +0 -32
  83. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Blockwise-ControlNet-Inpaint.py +0 -33
  84. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Distill-DMD2.py +0 -25
  85. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Distill-Full.py +0 -17
  86. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Distill-LoRA.py +0 -20
  87. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Edit-2509.py +0 -31
  88. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Edit-2511.py +0 -44
  89. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Edit-Lowres-Fix.py +0 -25
  90. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Edit.py +0 -25
  91. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-EliGen-Poster.py +0 -114
  92. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-EliGen-V2.py +0 -106
  93. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-EliGen.py +0 -107
  94. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-In-Context-Control-Union.py +0 -35
  95. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-Layered.py +0 -36
  96. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image-i2L.py +0 -110
  97. diffsynth-2.0.3/examples/qwen_image/model_inference/Qwen-Image.py +0 -17
  98. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-2512.py +0 -28
  99. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Blockwise-ControlNet-Canny.py +0 -42
  100. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Blockwise-ControlNet-Depth.py +0 -43
  101. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Blockwise-ControlNet-Inpaint.py +0 -44
  102. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Distill-DMD2.py +0 -36
  103. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Distill-Full.py +0 -28
  104. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Distill-LoRA.py +0 -31
  105. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Edit-2509.py +0 -43
  106. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Edit-2511.py +0 -54
  107. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Edit-Lowres-Fix.py +0 -37
  108. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Edit.py +0 -37
  109. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-EliGen-Poster.py +0 -125
  110. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-EliGen-V2.py +0 -117
  111. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-EliGen.py +0 -118
  112. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-In-Context-Control-Union.py +0 -46
  113. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-Layered.py +0 -46
  114. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image-i2L.py +0 -134
  115. diffsynth-2.0.3/examples/qwen_image/model_inference_low_vram/Qwen-Image.py +0 -28
  116. diffsynth-2.0.3/examples/qwen_image/model_training/scripts/Qwen-Image-Blockwise-ControlNet-Initialize.py +0 -13
  117. diffsynth-2.0.3/examples/qwen_image/model_training/scripts/Qwen-Image-Blockwise-ControlNet-Inpaint-Initialize.py +0 -12
  118. diffsynth-2.0.3/examples/qwen_image/model_training/special/fp8_training/validate.py +0 -18
  119. diffsynth-2.0.3/examples/qwen_image/model_training/special/simple/train.py +0 -76
  120. diffsynth-2.0.3/examples/qwen_image/model_training/special/split_training/validate.py +0 -18
  121. diffsynth-2.0.3/examples/qwen_image/model_training/train.py +0 -169
  122. diffsynth-2.0.3/examples/qwen_image/model_training/validate_full/Qwen-Image-2512.py +0 -20
  123. diffsynth-2.0.3/examples/qwen_image/model_training/validate_full/Qwen-Image-Blockwise-ControlNet-Canny.py +0 -31
  124. diffsynth-2.0.3/examples/qwen_image/model_training/validate_full/Qwen-Image-Blockwise-ControlNet-Depth.py +0 -31
  125. diffsynth-2.0.3/examples/qwen_image/model_training/validate_full/Qwen-Image-Blockwise-ControlNet-Inpaint.py +0 -32
  126. diffsynth-2.0.3/examples/qwen_image/model_training/validate_full/Qwen-Image-Distill-Full.py +0 -20
  127. diffsynth-2.0.3/examples/qwen_image/model_training/validate_full/Qwen-Image-Edit-2509.py +0 -26
  128. diffsynth-2.0.3/examples/qwen_image/model_training/validate_full/Qwen-Image-Edit-2511.py +0 -26
  129. diffsynth-2.0.3/examples/qwen_image/model_training/validate_full/Qwen-Image-Edit.py +0 -23
  130. diffsynth-2.0.3/examples/qwen_image/model_training/validate_full/Qwen-Image-Layered.py +0 -28
  131. diffsynth-2.0.3/examples/qwen_image/model_training/validate_full/Qwen-Image.py +0 -20
  132. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-2512.py +0 -18
  133. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-Blockwise-ControlNet-Canny.py +0 -32
  134. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-Blockwise-ControlNet-Depth.py +0 -33
  135. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-Blockwise-ControlNet-Inpaint.py +0 -34
  136. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-Distill-Full.py +0 -18
  137. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-Distill-LoRA.py +0 -23
  138. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-Edit-2509.py +0 -24
  139. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-Edit-2511.py +0 -24
  140. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-Edit.py +0 -21
  141. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-EliGen-Poster.py +0 -29
  142. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-EliGen.py +0 -29
  143. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-In-Context-Control-Union.py +0 -19
  144. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image-Layered.py +0 -27
  145. diffsynth-2.0.3/examples/qwen_image/model_training/validate_lora/Qwen-Image.py +0 -18
  146. diffsynth-2.0.3/examples/wanvideo/acceleration/unified_sequence_parallel.py +0 -26
  147. diffsynth-2.0.3/examples/wanvideo/model_inference/LongCat-Video.py +0 -35
  148. diffsynth-2.0.3/examples/wanvideo/model_inference/Video-As-Prompt-Wan2.1-14B.py +0 -49
  149. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-1.3b-speedcontrol-v1.py +0 -34
  150. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-FLF2V-14B-720P.py +0 -36
  151. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-Fun-1.3B-Control.py +0 -34
  152. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-Fun-1.3B-InP.py +0 -36
  153. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-Fun-14B-Control.py +0 -34
  154. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-Fun-14B-InP.py +0 -36
  155. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-Fun-V1.1-1.3B-Control-Camera.py +0 -44
  156. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-Fun-V1.1-1.3B-Control.py +0 -36
  157. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-Fun-V1.1-1.3B-InP.py +0 -36
  158. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-Fun-V1.1-14B-Control-Camera.py +0 -44
  159. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-Fun-V1.1-14B-Control.py +0 -36
  160. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-Fun-V1.1-14B-InP.py +0 -36
  161. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-I2V-14B-480P.py +0 -34
  162. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-I2V-14B-720P.py +0 -35
  163. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-T2V-1.3B.py +0 -34
  164. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-T2V-14B.py +0 -24
  165. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-VACE-1.3B-Preview.py +0 -52
  166. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-VACE-1.3B.py +0 -53
  167. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.1-VACE-14B.py +0 -54
  168. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.2-Animate-14B.py +0 -62
  169. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.2-Fun-A14B-Control-Camera.py +0 -43
  170. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.2-Fun-A14B-Control.py +0 -35
  171. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.2-Fun-A14B-InP.py +0 -35
  172. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.2-I2V-A14B.py +0 -33
  173. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.2-S2V-14B.py +0 -73
  174. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.2-S2V-14B_multi_clips.py +0 -124
  175. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.2-T2V-A14B.py +0 -24
  176. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.2-TI2V-5B.py +0 -43
  177. diffsynth-2.0.3/examples/wanvideo/model_inference/Wan2.2-VACE-Fun-A14B.py +0 -68
  178. diffsynth-2.0.3/examples/wanvideo/model_inference/krea-realtime-video.py +0 -25
  179. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/LongCat-Video.py +0 -46
  180. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Video-As-Prompt-Wan2.1-14B.py +0 -62
  181. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-1.3b-speedcontrol-v1.py +0 -45
  182. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-FLF2V-14B-720P.py +0 -47
  183. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-Fun-1.3B-Control.py +0 -45
  184. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-Fun-1.3B-InP.py +0 -47
  185. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-Fun-14B-Control.py +0 -45
  186. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-Fun-14B-InP.py +0 -47
  187. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-Fun-V1.1-1.3B-Control-Camera.py +0 -55
  188. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-Fun-V1.1-1.3B-Control.py +0 -47
  189. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-Fun-V1.1-1.3B-InP.py +0 -47
  190. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-Fun-V1.1-14B-Control-Camera.py +0 -55
  191. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-Fun-V1.1-14B-Control.py +0 -47
  192. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-Fun-V1.1-14B-InP.py +0 -47
  193. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-I2V-14B-480P.py +0 -45
  194. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-I2V-14B-720P.py +0 -46
  195. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-T2V-1.3B.py +0 -45
  196. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-T2V-14B.py +0 -35
  197. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-VACE-1.3B-Preview.py +0 -63
  198. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-VACE-1.3B.py +0 -64
  199. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.1-VACE-14B.py +0 -65
  200. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.2-Animate-14B.py +0 -74
  201. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.2-Fun-A14B-Control-Camera.py +0 -55
  202. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.2-Fun-A14B-Control.py +0 -46
  203. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.2-Fun-A14B-InP.py +0 -46
  204. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.2-I2V-A14B.py +0 -44
  205. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.2-S2V-14B.py +0 -84
  206. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.2-S2V-14B_multi_clips.py +0 -133
  207. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.2-T2V-A14B.py +0 -35
  208. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.2-TI2V-5B.py +0 -54
  209. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/Wan2.2-VACE-Fun-A14B.py +0 -65
  210. diffsynth-2.0.3/examples/wanvideo/model_inference_low_vram/krea-realtime-video.py +0 -36
  211. diffsynth-2.0.3/examples/wanvideo/model_training/special/direct_distill/validate.py +0 -23
  212. diffsynth-2.0.3/examples/wanvideo/model_training/special/fp8_training/validate.py +0 -28
  213. diffsynth-2.0.3/examples/wanvideo/model_training/special/low_vram_training/validate.py +0 -28
  214. diffsynth-2.0.3/examples/wanvideo/model_training/special/split_training/validate.py +0 -28
  215. diffsynth-2.0.3/examples/wanvideo/model_training/train.py +0 -185
  216. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/LongCat-Video.py +0 -25
  217. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Video-As-Prompt-Wan2.1-14B.py +0 -43
  218. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-1.3b-speedcontrol-v1.py +0 -28
  219. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-FLF2V-14B-720P.py +0 -33
  220. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-Fun-1.3B-Control.py +0 -32
  221. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-Fun-1.3B-InP.py +0 -31
  222. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-Fun-14B-Control.py +0 -32
  223. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-Fun-14B-InP.py +0 -31
  224. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-Fun-V1.1-1.3B-Control-Camera.py +0 -32
  225. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-Fun-V1.1-1.3B-Control.py +0 -33
  226. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-Fun-V1.1-1.3B-InP.py +0 -31
  227. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-Fun-V1.1-14B-Control-Camera.py +0 -32
  228. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-Fun-V1.1-14B-Control.py +0 -33
  229. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-Fun-V1.1-14B-InP.py +0 -31
  230. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-I2V-14B-480P.py +0 -30
  231. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-I2V-14B-720P.py +0 -31
  232. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-T2V-1.3B.py +0 -25
  233. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-T2V-14B.py +0 -25
  234. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-VACE-1.3B-Preview.py +0 -30
  235. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-VACE-1.3B.py +0 -30
  236. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.1-VACE-14B.py +0 -30
  237. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.2-Animate-14B.py +0 -33
  238. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.2-Fun-A14B-Control-Camera.py +0 -34
  239. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.2-Fun-A14B-Control.py +0 -35
  240. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.2-Fun-A14B-InP.py +0 -32
  241. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.2-I2V-A14B.py +0 -33
  242. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.2-S2V-14B.py +0 -53
  243. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.2-T2V-A14B.py +0 -28
  244. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.2-TI2V-5B.py +0 -30
  245. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/Wan2.2-VACE-Fun-A14B.py +0 -43
  246. diffsynth-2.0.3/examples/wanvideo/model_training/validate_full/krea-realtime-video.py +0 -28
  247. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/LongCat-Video.py +0 -23
  248. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Video-As-Prompt-Wan2.1-14B.py +0 -42
  249. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-1.3b-speedcontrol-v1.py +0 -27
  250. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-FLF2V-14B-720P.py +0 -31
  251. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-Fun-1.3B-Control.py +0 -30
  252. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-Fun-1.3B-InP.py +0 -29
  253. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-Fun-14B-Control.py +0 -30
  254. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-Fun-14B-InP.py +0 -29
  255. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-Fun-V1.1-1.3B-Control-Camera.py +0 -31
  256. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-Fun-V1.1-1.3B-Control.py +0 -31
  257. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-Fun-V1.1-1.3B-InP.py +0 -29
  258. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-Fun-V1.1-14B-Control-Camera.py +0 -31
  259. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-Fun-V1.1-14B-Control.py +0 -31
  260. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-Fun-V1.1-14B-InP.py +0 -29
  261. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-I2V-14B-480P.py +0 -28
  262. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-I2V-14B-720P.py +0 -29
  263. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-T2V-1.3B.py +0 -23
  264. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-T2V-14B.py +0 -23
  265. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-VACE-1.3B-Preview.py +0 -28
  266. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-VACE-1.3B.py +0 -28
  267. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.1-VACE-14B.py +0 -28
  268. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.2-Animate-14B.py +0 -32
  269. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.2-Fun-A14B-Control-Camera.py +0 -32
  270. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.2-Fun-A14B-Control.py +0 -32
  271. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.2-Fun-A14B-InP.py +0 -30
  272. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.2-I2V-A14B.py +0 -30
  273. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.2-S2V-14B.py +0 -50
  274. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.2-T2V-A14B.py +0 -27
  275. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.2-TI2V-5B.py +0 -29
  276. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/Wan2.2-VACE-Fun-A14B.py +0 -30
  277. diffsynth-2.0.3/examples/wanvideo/model_training/validate_lora/krea-realtime-video.py +0 -28
  278. diffsynth-2.0.3/examples/z_image/model_inference/Z-Image-Omni-Base-i2L.py +0 -62
  279. diffsynth-2.0.3/examples/z_image/model_inference/Z-Image-Omni-Base.py +0 -24
  280. diffsynth-2.0.3/examples/z_image/model_inference/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.py +0 -27
  281. diffsynth-2.0.3/examples/z_image/model_inference/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.py +0 -40
  282. diffsynth-2.0.3/examples/z_image/model_inference/Z-Image-Turbo-Fun-Controlnet-Union-2.1.py +0 -46
  283. diffsynth-2.0.3/examples/z_image/model_inference/Z-Image-Turbo.py +0 -17
  284. diffsynth-2.0.3/examples/z_image/model_inference_low_vram/Z-Image-Omni-Base-i2L.py +0 -62
  285. diffsynth-2.0.3/examples/z_image/model_inference_low_vram/Z-Image-Omni-Base.py +0 -33
  286. diffsynth-2.0.3/examples/z_image/model_inference_low_vram/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.py +0 -37
  287. diffsynth-2.0.3/examples/z_image/model_inference_low_vram/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.py +0 -50
  288. diffsynth-2.0.3/examples/z_image/model_inference_low_vram/Z-Image-Turbo-Fun-Controlnet-Union-2.1.py +0 -56
  289. diffsynth-2.0.3/examples/z_image/model_inference_low_vram/Z-Image-Turbo.py +0 -27
  290. diffsynth-2.0.3/examples/z_image/model_training/special/differential_training/validate.py +0 -18
  291. diffsynth-2.0.3/examples/z_image/model_training/special/trajectory_imitation/validate.py +0 -18
  292. diffsynth-2.0.3/examples/z_image/model_training/train.py +0 -153
  293. diffsynth-2.0.3/examples/z_image/model_training/validate_full/Z-Image-Omni-Base.py +0 -33
  294. diffsynth-2.0.3/examples/z_image/model_training/validate_full/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.py +0 -24
  295. diffsynth-2.0.3/examples/z_image/model_training/validate_full/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.py +0 -24
  296. diffsynth-2.0.3/examples/z_image/model_training/validate_full/Z-Image-Turbo-Fun-Controlnet-Union-2.1.py +0 -24
  297. diffsynth-2.0.3/examples/z_image/model_training/validate_full/Z-Image-Turbo.py +0 -20
  298. diffsynth-2.0.3/examples/z_image/model_training/validate_lora/Z-Image-Omni-Base.py +0 -31
  299. diffsynth-2.0.3/examples/z_image/model_training/validate_lora/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.py +0 -23
  300. diffsynth-2.0.3/examples/z_image/model_training/validate_lora/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.py +0 -23
  301. diffsynth-2.0.3/examples/z_image/model_training/validate_lora/Z-Image-Turbo-Fun-Controlnet-Union-2.1.py +0 -23
  302. diffsynth-2.0.3/examples/z_image/model_training/validate_lora/Z-Image-Turbo.py +0 -18
  303. {diffsynth-2.0.3 → diffsynth-2.0.4}/LICENSE +0 -0
  304. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/__init__.py +0 -0
  305. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/configs/__init__.py +0 -0
  306. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/configs/model_configs.py +0 -0
  307. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/configs/vram_management_module_maps.py +0 -0
  308. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/__init__.py +0 -0
  309. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/attention/__init__.py +0 -0
  310. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/attention/attention.py +0 -0
  311. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/data/__init__.py +0 -0
  312. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/data/operators.py +0 -0
  313. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/data/unified_dataset.py +0 -0
  314. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/device/__init__.py +0 -0
  315. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/device/npu_compatible_device.py +0 -0
  316. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/gradient/__init__.py +0 -0
  317. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/gradient/gradient_checkpoint.py +0 -0
  318. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/loader/__init__.py +0 -0
  319. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/vram/__init__.py +0 -0
  320. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/vram/disk_map.py +0 -0
  321. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/vram/initialization.py +0 -0
  322. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/core/vram/layers.py +0 -0
  323. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/diffusion/__init__.py +0 -0
  324. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/diffusion/flow_match.py +0 -0
  325. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/diffusion/logger.py +0 -0
  326. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/diffusion/loss.py +0 -0
  327. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/diffusion/parsers.py +0 -0
  328. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/diffusion/runner.py +0 -0
  329. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/diffusion/training_module.py +0 -0
  330. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/dinov3_image_encoder.py +0 -0
  331. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux2_dit.py +0 -0
  332. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux2_text_encoder.py +0 -0
  333. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux2_vae.py +0 -0
  334. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux_controlnet.py +0 -0
  335. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux_dit.py +0 -0
  336. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux_infiniteyou.py +0 -0
  337. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux_ipadapter.py +0 -0
  338. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux_lora_encoder.py +0 -0
  339. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux_lora_patcher.py +0 -0
  340. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux_text_encoder_clip.py +0 -0
  341. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux_text_encoder_t5.py +0 -0
  342. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux_vae.py +0 -0
  343. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/flux_value_control.py +0 -0
  344. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/general_modules.py +0 -0
  345. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/longcat_video_dit.py +0 -0
  346. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/nexus_gen.py +0 -0
  347. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/nexus_gen_ar_model.py +0 -0
  348. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/nexus_gen_projector.py +0 -0
  349. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/qwen_image_controlnet.py +0 -0
  350. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/qwen_image_dit.py +0 -0
  351. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/qwen_image_image2lora.py +0 -0
  352. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/qwen_image_text_encoder.py +0 -0
  353. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/qwen_image_vae.py +0 -0
  354. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/sd_text_encoder.py +0 -0
  355. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/siglip2_image_encoder.py +0 -0
  356. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/step1x_connector.py +0 -0
  357. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/step1x_text_encoder.py +0 -0
  358. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wan_video_animate_adapter.py +0 -0
  359. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wan_video_camera_controller.py +0 -0
  360. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wan_video_dit.py +0 -0
  361. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wan_video_dit_s2v.py +0 -0
  362. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wan_video_image_encoder.py +0 -0
  363. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wan_video_mot.py +0 -0
  364. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wan_video_motion_controller.py +0 -0
  365. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wan_video_text_encoder.py +0 -0
  366. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wan_video_vace.py +0 -0
  367. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wan_video_vae.py +0 -0
  368. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/wav2vec.py +0 -0
  369. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/z_image_controlnet.py +0 -0
  370. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/z_image_dit.py +0 -0
  371. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/z_image_image2lora.py +0 -0
  372. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/models/z_image_text_encoder.py +0 -0
  373. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/pipelines/flux_image.py +0 -0
  374. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/pipelines/qwen_image.py +0 -0
  375. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/pipelines/wan_video.py +0 -0
  376. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/pipelines/z_image.py +0 -0
  377. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/controlnet/__init__.py +0 -0
  378. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/controlnet/annotator.py +0 -0
  379. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/controlnet/controlnet_input.py +0 -0
  380. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/data/__init__.py +0 -0
  381. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/lora/__init__.py +0 -0
  382. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/lora/flux.py +0 -0
  383. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/lora/general.py +0 -0
  384. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/lora/merge.py +0 -0
  385. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/lora/reset_rank.py +0 -0
  386. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/__init__.py +0 -0
  387. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/flux2_text_encoder.py +0 -0
  388. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/flux_controlnet.py +0 -0
  389. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/flux_dit.py +0 -0
  390. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/flux_infiniteyou.py +0 -0
  391. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/flux_ipadapter.py +0 -0
  392. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/flux_text_encoder_clip.py +0 -0
  393. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/flux_text_encoder_t5.py +0 -0
  394. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/flux_vae.py +0 -0
  395. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/nexus_gen.py +0 -0
  396. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/nexus_gen_projector.py +0 -0
  397. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/qwen_image_text_encoder.py +0 -0
  398. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/step1x_connector.py +0 -0
  399. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/wan_video_animate_adapter.py +0 -0
  400. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/wan_video_dit.py +0 -0
  401. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/wan_video_image_encoder.py +0 -0
  402. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/wan_video_mot.py +0 -0
  403. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/wan_video_vace.py +0 -0
  404. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/wan_video_vae.py +0 -0
  405. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/wans2v_audio_encoder.py +0 -0
  406. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/state_dict_converters/z_image_text_encoder.py +0 -0
  407. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/xfuser/__init__.py +0 -0
  408. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth/utils/xfuser/xdit_context_parallel.py +0 -0
  409. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth.egg-info/dependency_links.txt +0 -0
  410. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth.egg-info/requires.txt +0 -0
  411. {diffsynth-2.0.3 → diffsynth-2.0.4}/diffsynth.egg-info/top_level.txt +0 -0
  412. {diffsynth-2.0.3 → diffsynth-2.0.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diffsynth
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: Enjoy the magic of Diffusion models!
5
5
  Author: ModelScope Team
6
6
  License: Apache-2.0
@@ -33,6 +33,8 @@ We believe that a well-developed open-source code framework can lower the thresh
33
33
 
34
34
  > Currently, the development personnel of this project are limited, with most of the work handled by [Artiprocher](https://github.com/Artiprocher). Therefore, the progress of new feature development will be relatively slow, and the speed of responding to and resolving issues is limited. We apologize for this and ask developers to understand.
35
35
 
36
+ - **January 27, 2026**: [Z-Image](https://modelscope.cn/models/Tongyi-MAI/Z-Image) is released, and our [Z-Image-i2L](https://www.modelscope.cn/models/DiffSynth-Studio/Z-Image-i2L) model is released concurrently. You can use it in [ModelScope Studios](https://modelscope.cn/studios/DiffSynth-Studio/Z-Image-i2L). For details, see the [documentation](/docs/zh/Model_Details/Z-Image.md).
37
+
36
38
  - **January 19, 2026**: Added support for [FLUX.2-klein-4B](https://modelscope.cn/models/black-forest-labs/FLUX.2-klein-4B) and [FLUX.2-klein-9B](https://modelscope.cn/models/black-forest-labs/FLUX.2-klein-9B) models, including training and inference capabilities. [Documentation](/docs/en/Model_Details/FLUX2.md) and [example code](/examples/flux2/) are now available.
37
39
 
38
40
  - **January 12, 2026**: We trained and open-sourced a text-guided image layer separation model ([Model Link](https://modelscope.cn/models/DiffSynth-Studio/Qwen-Image-Layered-Control)). Given an input image and a textual description, the model isolates the image layer corresponding to the described content. For more details, please refer to our blog post ([Chinese version](https://modelscope.cn/learn/4938), [English version](https://huggingface.co/blog/kelseye/qwen-image-layered-control)).
@@ -269,9 +271,14 @@ image.save("image.jpg")
269
271
 
270
272
  Example code for Z-Image is available at: [/examples/z_image/](/examples/z_image/)
271
273
 
272
- | Model ID | Inference | Low-VRAM Inference | Full Training | Full Training Validation | LoRA Training | LoRA Training Validation |
274
+ |Model ID|Inference|Low VRAM Inference|Full Training|Validation After Full Training|LoRA Training|Validation After LoRA Training|
273
275
  |-|-|-|-|-|-|-|
276
+ |[Tongyi-MAI/Z-Image](https://www.modelscope.cn/models/Tongyi-MAI/Z-Image)|[code](/examples/z_image/model_inference/Z-Image.py)|[code](/examples/z_image/model_inference_low_vram/Z-Image.py)|[code](/examples/z_image/model_training/full/Z-Image.sh)|[code](/examples/z_image/model_training/validate_full/Z-Image.py)|[code](/examples/z_image/model_training/lora/Z-Image.sh)|[code](/examples/z_image/model_training/validate_lora/Z-Image.py)|
277
+ |[DiffSynth-Studio/Z-Image-i2L](https://www.modelscope.cn/models/DiffSynth-Studio/Z-Image-i2L)|[code](/examples/z_image/model_inference/Z-Image-i2L.py)|[code](/examples/z_image/model_inference_low_vram/Z-Image-i2L.py)|-|-|-|-|
274
278
  |[Tongyi-MAI/Z-Image-Turbo](https://www.modelscope.cn/models/Tongyi-MAI/Z-Image-Turbo)|[code](/examples/z_image/model_inference/Z-Image-Turbo.py)|[code](/examples/z_image/model_inference_low_vram/Z-Image-Turbo.py)|[code](/examples/z_image/model_training/full/Z-Image-Turbo.sh)|[code](/examples/z_image/model_training/validate_full/Z-Image-Turbo.py)|[code](/examples/z_image/model_training/lora/Z-Image-Turbo.sh)|[code](/examples/z_image/model_training/validate_lora/Z-Image-Turbo.py)|
279
+ |[PAI/Z-Image-Turbo-Fun-Controlnet-Union-2.1](https://www.modelscope.cn/models/PAI/Z-Image-Turbo-Fun-Controlnet-Union-2.1)|[code](/examples/z_image/model_inference/Z-Image-Turbo-Fun-Controlnet-Union-2.1.py)|[code](/examples/z_image/model_inference_low_vram/Z-Image-Turbo-Fun-Controlnet-Union-2.1.py)|[code](/examples/z_image/model_training/full/Z-Image-Turbo-Fun-Controlnet-Union-2.1.sh)|[code](/examples/z_image/model_training/validate_full/Z-Image-Turbo-Fun-Controlnet-Union-2.1.py)|[code](/examples/z_image/model_training/lora/Z-Image-Turbo-Fun-Controlnet-Union-2.1.sh)|[code](/examples/z_image/model_training/validate_lora/Z-Image-Turbo-Fun-Controlnet-Union-2.1.py)|
280
+ |[PAI/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps](https://www.modelscope.cn/models/PAI/Z-Image-Turbo-Fun-Controlnet-Union-2.1)|[code](/examples/z_image/model_inference/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.py)|[code](/examples/z_image/model_inference_low_vram/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.py)|[code](/examples/z_image/model_training/full/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.sh)|[code](/examples/z_image/model_training/validate_full/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.py)|[code](/examples/z_image/model_training/lora/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.sh)|[code](/examples/z_image/model_training/validate_lora/Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.py)|
281
+ |[PAI/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps](https://www.modelscope.cn/models/PAI/Z-Image-Turbo-Fun-Controlnet-Union-2.1)|[code](/examples/z_image/model_inference/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.py)|[code](/examples/z_image/model_inference_low_vram/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.py)|[code](/examples/z_image/model_training/full/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.sh)|[code](/examples/z_image/model_training/validate_full/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.py)|[code](/examples/z_image/model_training/lora/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.sh)|[code](/examples/z_image/model_training/validate_lora/Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.py)|
275
282
 
276
283
  </details>
277
284
 
@@ -1,5 +1,5 @@
1
1
  import torch, glob, os
2
- from typing import Optional, Union
2
+ from typing import Optional, Union, Dict
3
3
  from dataclasses import dataclass
4
4
  from modelscope import snapshot_download
5
5
  from huggingface_hub import snapshot_download as hf_snapshot_download
@@ -23,6 +23,7 @@ class ModelConfig:
23
23
  computation_device: Optional[Union[str, torch.device]] = None
24
24
  computation_dtype: Optional[torch.dtype] = None
25
25
  clear_parameters: bool = False
26
+ state_dict: Dict[str, torch.Tensor] = None
26
27
 
27
28
  def check_input(self):
28
29
  if self.path is None and self.model_id is None:
@@ -2,16 +2,25 @@ from safetensors import safe_open
2
2
  import torch, hashlib
3
3
 
4
4
 
5
- def load_state_dict(file_path, torch_dtype=None, device="cpu"):
5
+ def load_state_dict(file_path, torch_dtype=None, device="cpu", pin_memory=False, verbose=0):
6
6
  if isinstance(file_path, list):
7
7
  state_dict = {}
8
8
  for file_path_ in file_path:
9
- state_dict.update(load_state_dict(file_path_, torch_dtype, device))
10
- return state_dict
11
- if file_path.endswith(".safetensors"):
12
- return load_state_dict_from_safetensors(file_path, torch_dtype=torch_dtype, device=device)
9
+ state_dict.update(load_state_dict(file_path_, torch_dtype, device, pin_memory=pin_memory, verbose=verbose))
13
10
  else:
14
- return load_state_dict_from_bin(file_path, torch_dtype=torch_dtype, device=device)
11
+ if verbose >= 1:
12
+ print(f"Loading file [started]: {file_path}")
13
+ if file_path.endswith(".safetensors"):
14
+ state_dict = load_state_dict_from_safetensors(file_path, torch_dtype=torch_dtype, device=device)
15
+ else:
16
+ state_dict = load_state_dict_from_bin(file_path, torch_dtype=torch_dtype, device=device)
17
+ # If load state dict in CPU memory, `pin_memory=True` will make `model.to("cuda")` faster.
18
+ if pin_memory:
19
+ for i in state_dict:
20
+ state_dict[i] = state_dict[i].pin_memory()
21
+ if verbose >= 1:
22
+ print(f"Loading file [done]: {file_path}")
23
+ return state_dict
15
24
 
16
25
 
17
26
  def load_state_dict_from_safetensors(file_path, torch_dtype=None, device="cpu"):
@@ -5,7 +5,7 @@ from .file import load_state_dict
5
5
  import torch
6
6
 
7
7
 
8
- def load_model(model_class, path, config=None, torch_dtype=torch.bfloat16, device="cpu", state_dict_converter=None, use_disk_map=False, module_map=None, vram_config=None, vram_limit=None):
8
+ def load_model(model_class, path, config=None, torch_dtype=torch.bfloat16, device="cpu", state_dict_converter=None, use_disk_map=False, module_map=None, vram_config=None, vram_limit=None, state_dict=None):
9
9
  config = {} if config is None else config
10
10
  # Why do we use `skip_model_initialization`?
11
11
  # It skips the random initialization of model parameters,
@@ -20,7 +20,7 @@ def load_model(model_class, path, config=None, torch_dtype=torch.bfloat16, devic
20
20
  dtypes = [vram_config["offload_dtype"], vram_config["onload_dtype"], vram_config["preparing_dtype"], vram_config["computation_dtype"]]
21
21
  dtype = [d for d in dtypes if d != "disk"][0]
22
22
  if vram_config["offload_device"] != "disk":
23
- state_dict = DiskMap(path, device, torch_dtype=dtype)
23
+ if state_dict is None: state_dict = DiskMap(path, device, torch_dtype=dtype)
24
24
  if state_dict_converter is not None:
25
25
  state_dict = state_dict_converter(state_dict)
26
26
  else:
@@ -35,7 +35,9 @@ def load_model(model_class, path, config=None, torch_dtype=torch.bfloat16, devic
35
35
  # Sometimes a model file contains multiple models,
36
36
  # and DiskMap can load only the parameters of a single model,
37
37
  # avoiding the need to load all parameters in the file.
38
- if use_disk_map:
38
+ if state_dict is not None:
39
+ pass
40
+ elif use_disk_map:
39
41
  state_dict = DiskMap(path, device, torch_dtype=torch_dtype)
40
42
  else:
41
43
  state_dict = load_state_dict(path, torch_dtype, device)
@@ -296,6 +296,7 @@ class BasePipeline(torch.nn.Module):
296
296
  vram_config=vram_config,
297
297
  vram_limit=vram_limit,
298
298
  clear_parameters=model_config.clear_parameters,
299
+ state_dict=model_config.state_dict,
299
300
  )
300
301
  return model_pool
301
302
 
@@ -29,7 +29,7 @@ class ModelPool:
29
29
  module_map = None
30
30
  return module_map
31
31
 
32
- def load_model_file(self, config, path, vram_config, vram_limit=None):
32
+ def load_model_file(self, config, path, vram_config, vram_limit=None, state_dict=None):
33
33
  model_class = self.import_model_class(config["model_class"])
34
34
  model_config = config.get("extra_kwargs", {})
35
35
  if "state_dict_converter" in config:
@@ -43,6 +43,7 @@ class ModelPool:
43
43
  state_dict_converter,
44
44
  use_disk_map=True,
45
45
  vram_config=vram_config, module_map=module_map, vram_limit=vram_limit,
46
+ state_dict=state_dict,
46
47
  )
47
48
  return model
48
49
 
@@ -59,7 +60,7 @@ class ModelPool:
59
60
  }
60
61
  return vram_config
61
62
 
62
- def auto_load_model(self, path, vram_config=None, vram_limit=None, clear_parameters=False):
63
+ def auto_load_model(self, path, vram_config=None, vram_limit=None, clear_parameters=False, state_dict=None):
63
64
  print(f"Loading models from: {json.dumps(path, indent=4)}")
64
65
  if vram_config is None:
65
66
  vram_config = self.default_vram_config()
@@ -67,7 +68,7 @@ class ModelPool:
67
68
  loaded = False
68
69
  for config in MODEL_CONFIGS:
69
70
  if config["model_hash"] == model_hash:
70
- model = self.load_model_file(config, path, vram_config, vram_limit=vram_limit)
71
+ model = self.load_model_file(config, path, vram_config, vram_limit=vram_limit, state_dict=state_dict)
71
72
  if clear_parameters: self.clear_parameters(model)
72
73
  self.model.append(model)
73
74
  model_name = config["model_name"]
@@ -1,4 +1,4 @@
1
- import torch, math
1
+ import torch, math, torchvision
2
2
  from PIL import Image
3
3
  from typing import Union
4
4
  from tqdm import tqdm
@@ -477,10 +477,21 @@ class Flux2Unit_EditImageEmbedder(PipelineUnit):
477
477
  width = round(width / 32) * 32
478
478
  height = round(height / 32) * 32
479
479
  return width, height
480
+
481
+ def crop_and_resize(self, image, target_height, target_width):
482
+ width, height = image.size
483
+ scale = max(target_width / width, target_height / height)
484
+ image = torchvision.transforms.functional.resize(
485
+ image,
486
+ (round(height*scale), round(width*scale)),
487
+ interpolation=torchvision.transforms.InterpolationMode.BILINEAR
488
+ )
489
+ image = torchvision.transforms.functional.center_crop(image, (target_height, target_width))
490
+ return image
480
491
 
481
492
  def edit_image_auto_resize(self, edit_image):
482
493
  calculated_width, calculated_height = self.calculate_dimensions(1024 * 1024, edit_image.size[0] / edit_image.size[1])
483
- return edit_image.resize((calculated_width, calculated_height))
494
+ return self.crop_and_resize(edit_image, calculated_height, calculated_width)
484
495
 
485
496
  def process_image_ids(self, image_latents, scale=10):
486
497
  t_coords = [scale + scale * t for t in torch.arange(0, len(image_latents))]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diffsynth
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: Enjoy the magic of Diffusion models!
5
5
  Author: ModelScope Team
6
6
  License: Apache-2.0
@@ -0,0 +1,119 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ diffsynth/__init__.py
5
+ diffsynth.egg-info/PKG-INFO
6
+ diffsynth.egg-info/SOURCES.txt
7
+ diffsynth.egg-info/dependency_links.txt
8
+ diffsynth.egg-info/requires.txt
9
+ diffsynth.egg-info/top_level.txt
10
+ diffsynth/configs/__init__.py
11
+ diffsynth/configs/model_configs.py
12
+ diffsynth/configs/vram_management_module_maps.py
13
+ diffsynth/core/__init__.py
14
+ diffsynth/core/attention/__init__.py
15
+ diffsynth/core/attention/attention.py
16
+ diffsynth/core/data/__init__.py
17
+ diffsynth/core/data/operators.py
18
+ diffsynth/core/data/unified_dataset.py
19
+ diffsynth/core/device/__init__.py
20
+ diffsynth/core/device/npu_compatible_device.py
21
+ diffsynth/core/gradient/__init__.py
22
+ diffsynth/core/gradient/gradient_checkpoint.py
23
+ diffsynth/core/loader/__init__.py
24
+ diffsynth/core/loader/config.py
25
+ diffsynth/core/loader/file.py
26
+ diffsynth/core/loader/model.py
27
+ diffsynth/core/vram/__init__.py
28
+ diffsynth/core/vram/disk_map.py
29
+ diffsynth/core/vram/initialization.py
30
+ diffsynth/core/vram/layers.py
31
+ diffsynth/diffusion/__init__.py
32
+ diffsynth/diffusion/base_pipeline.py
33
+ diffsynth/diffusion/flow_match.py
34
+ diffsynth/diffusion/logger.py
35
+ diffsynth/diffusion/loss.py
36
+ diffsynth/diffusion/parsers.py
37
+ diffsynth/diffusion/runner.py
38
+ diffsynth/diffusion/training_module.py
39
+ diffsynth/models/dinov3_image_encoder.py
40
+ diffsynth/models/flux2_dit.py
41
+ diffsynth/models/flux2_text_encoder.py
42
+ diffsynth/models/flux2_vae.py
43
+ diffsynth/models/flux_controlnet.py
44
+ diffsynth/models/flux_dit.py
45
+ diffsynth/models/flux_infiniteyou.py
46
+ diffsynth/models/flux_ipadapter.py
47
+ diffsynth/models/flux_lora_encoder.py
48
+ diffsynth/models/flux_lora_patcher.py
49
+ diffsynth/models/flux_text_encoder_clip.py
50
+ diffsynth/models/flux_text_encoder_t5.py
51
+ diffsynth/models/flux_vae.py
52
+ diffsynth/models/flux_value_control.py
53
+ diffsynth/models/general_modules.py
54
+ diffsynth/models/longcat_video_dit.py
55
+ diffsynth/models/model_loader.py
56
+ diffsynth/models/nexus_gen.py
57
+ diffsynth/models/nexus_gen_ar_model.py
58
+ diffsynth/models/nexus_gen_projector.py
59
+ diffsynth/models/qwen_image_controlnet.py
60
+ diffsynth/models/qwen_image_dit.py
61
+ diffsynth/models/qwen_image_image2lora.py
62
+ diffsynth/models/qwen_image_text_encoder.py
63
+ diffsynth/models/qwen_image_vae.py
64
+ diffsynth/models/sd_text_encoder.py
65
+ diffsynth/models/siglip2_image_encoder.py
66
+ diffsynth/models/step1x_connector.py
67
+ diffsynth/models/step1x_text_encoder.py
68
+ diffsynth/models/wan_video_animate_adapter.py
69
+ diffsynth/models/wan_video_camera_controller.py
70
+ diffsynth/models/wan_video_dit.py
71
+ diffsynth/models/wan_video_dit_s2v.py
72
+ diffsynth/models/wan_video_image_encoder.py
73
+ diffsynth/models/wan_video_mot.py
74
+ diffsynth/models/wan_video_motion_controller.py
75
+ diffsynth/models/wan_video_text_encoder.py
76
+ diffsynth/models/wan_video_vace.py
77
+ diffsynth/models/wan_video_vae.py
78
+ diffsynth/models/wav2vec.py
79
+ diffsynth/models/z_image_controlnet.py
80
+ diffsynth/models/z_image_dit.py
81
+ diffsynth/models/z_image_image2lora.py
82
+ diffsynth/models/z_image_text_encoder.py
83
+ diffsynth/pipelines/flux2_image.py
84
+ diffsynth/pipelines/flux_image.py
85
+ diffsynth/pipelines/qwen_image.py
86
+ diffsynth/pipelines/wan_video.py
87
+ diffsynth/pipelines/z_image.py
88
+ diffsynth/utils/controlnet/__init__.py
89
+ diffsynth/utils/controlnet/annotator.py
90
+ diffsynth/utils/controlnet/controlnet_input.py
91
+ diffsynth/utils/data/__init__.py
92
+ diffsynth/utils/lora/__init__.py
93
+ diffsynth/utils/lora/flux.py
94
+ diffsynth/utils/lora/general.py
95
+ diffsynth/utils/lora/merge.py
96
+ diffsynth/utils/lora/reset_rank.py
97
+ diffsynth/utils/state_dict_converters/__init__.py
98
+ diffsynth/utils/state_dict_converters/flux2_text_encoder.py
99
+ diffsynth/utils/state_dict_converters/flux_controlnet.py
100
+ diffsynth/utils/state_dict_converters/flux_dit.py
101
+ diffsynth/utils/state_dict_converters/flux_infiniteyou.py
102
+ diffsynth/utils/state_dict_converters/flux_ipadapter.py
103
+ diffsynth/utils/state_dict_converters/flux_text_encoder_clip.py
104
+ diffsynth/utils/state_dict_converters/flux_text_encoder_t5.py
105
+ diffsynth/utils/state_dict_converters/flux_vae.py
106
+ diffsynth/utils/state_dict_converters/nexus_gen.py
107
+ diffsynth/utils/state_dict_converters/nexus_gen_projector.py
108
+ diffsynth/utils/state_dict_converters/qwen_image_text_encoder.py
109
+ diffsynth/utils/state_dict_converters/step1x_connector.py
110
+ diffsynth/utils/state_dict_converters/wan_video_animate_adapter.py
111
+ diffsynth/utils/state_dict_converters/wan_video_dit.py
112
+ diffsynth/utils/state_dict_converters/wan_video_image_encoder.py
113
+ diffsynth/utils/state_dict_converters/wan_video_mot.py
114
+ diffsynth/utils/state_dict_converters/wan_video_vace.py
115
+ diffsynth/utils/state_dict_converters/wan_video_vae.py
116
+ diffsynth/utils/state_dict_converters/wans2v_audio_encoder.py
117
+ diffsynth/utils/state_dict_converters/z_image_text_encoder.py
118
+ diffsynth/utils/xfuser/__init__.py
119
+ diffsynth/utils/xfuser/xdit_context_parallel.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "diffsynth"
7
- version = "2.0.3"
7
+ version = "2.0.4"
8
8
  description = "Enjoy the magic of Diffusion models!"
9
9
  authors = [{name = "ModelScope Team"}]
10
10
  license = {text = "Apache-2.0"}
@@ -1,13 +0,0 @@
1
- from shutil import copy
2
- import os
3
-
4
-
5
- for i, style_id in enumerate([1, 2, 4, 5, 7, 8, 9]):
6
- os.makedirs(f"/mnt/nas1/duanzhongjie.dzj/dev6_zimagebase/Z-Image-Omni-Base-i2L/assets/style/{i}", exist_ok=True)
7
- for file_name in os.listdir(f"data/style/{style_id}"):
8
- copy(f"data/style/{style_id}/{file_name}", f"/mnt/nas1/duanzhongjie.dzj/dev6_zimagebase/Z-Image-Omni-Base-i2L/assets/style/{i}/{file_name}")
9
- image_id = 0
10
- for file_name in sorted(os.listdir(f"data/style_out/1")):
11
- if file_name.startswith(f"image_lora_{style_id}_"):
12
- copy(f"data/style_out/1/{file_name}", f"/mnt/nas1/duanzhongjie.dzj/dev6_zimagebase/Z-Image-Omni-Base-i2L/assets/style/{i}/image_{image_id}.jpg")
13
- image_id += 1
@@ -1,57 +0,0 @@
1
- from diffsynth.pipelines.z_image import (
2
- ZImagePipeline, ModelConfig,
3
- ZImageUnit_Image2LoRAEncode, ZImageUnit_Image2LoRADecode
4
- )
5
- from modelscope import snapshot_download
6
- from safetensors.torch import save_file
7
- import torch, os
8
- from PIL import Image
9
-
10
- # Use `vram_config` to enable LoRA hot-loading
11
- vram_config = {
12
- "offload_dtype": torch.bfloat16,
13
- "offload_device": "cuda",
14
- "onload_dtype": torch.bfloat16,
15
- "onload_device": "cuda",
16
- "preparing_dtype": torch.bfloat16,
17
- "preparing_device": "cuda",
18
- "computation_dtype": torch.bfloat16,
19
- "computation_device": "cuda",
20
- }
21
-
22
- # Load models
23
- pipe = ZImagePipeline.from_pretrained(
24
- torch_dtype=torch.bfloat16,
25
- device="cuda",
26
- model_configs=[
27
- ModelConfig(model_id="Tongyi-MAI/Z-Image-Omni-Base", origin_file_pattern="transformer/*.safetensors", **vram_config),
28
- ModelConfig(model_id="Tongyi-MAI/Z-Image-Omni-Base", origin_file_pattern="siglip/model.safetensors"),
29
- ModelConfig(model_id="Tongyi-MAI/Z-Image-Turbo", origin_file_pattern="text_encoder/*.safetensors"),
30
- ModelConfig(model_id="Tongyi-MAI/Z-Image-Turbo", origin_file_pattern="vae/diffusion_pytorch_model.safetensors"),
31
- ModelConfig(model_id="DiffSynth-Studio/General-Image-Encoders", origin_file_pattern="SigLIP2-G384/model.safetensors"),
32
- ModelConfig(model_id="DiffSynth-Studio/General-Image-Encoders", origin_file_pattern="DINOv3-7B/model.safetensors"),
33
- ModelConfig("/mnt/nas1/duanzhongjie.dzj/dev3_zi2L/DiffSynth-Studio/models/train/ema_v30_0.9_0108.safetensors"),
34
- ],
35
- tokenizer_config=ModelConfig(model_id="Tongyi-MAI/Z-Image-Turbo", origin_file_pattern="tokenizer/"),
36
- )
37
-
38
-
39
- from diffsynth.core.data.operators import ImageCropAndResize
40
- processor_highres = ImageCropAndResize(height=1024, width=1024)
41
- for style_id in range(3, 12):
42
- images = [Image.open(f"/mnt/nas1/duanzhongjie.dzj/dev3_zi2L/DiffSynth-Studio/data/style/{style_id}/{i}") for i in os.listdir(f"/mnt/nas1/duanzhongjie.dzj/dev3_zi2L/DiffSynth-Studio/data/style/{style_id}")]
43
- os.makedirs(f"data/style/{style_id}", exist_ok=True)
44
- for image_id, image in enumerate(images):
45
- image = processor_highres(image)
46
- image.save(f"data/style/{style_id}/{image_id}.jpg")
47
- images = [Image.open(f"data/style/{style_id}/{i}.jpg") for i in range(len(images))]
48
-
49
- with torch.no_grad():
50
- embs = ZImageUnit_Image2LoRAEncode().process(pipe, image2lora_images=images)
51
- lora = ZImageUnit_Image2LoRADecode().process(pipe, **embs)["lora"]
52
-
53
- prompts = ["a cat", "a dog", "a girl"]
54
- for prompt_id, prompt in enumerate(prompts):
55
- negative_prompt = "泛黄,发绿,模糊,低分辨率,低质量图像,扭曲的肢体,诡异的外观,丑陋,AI感,噪点,网格感,JPEG压缩条纹,异常的肢体,水印,乱码,意义不明的字符"
56
- image = pipe(prompt=prompt, negative_prompt=negative_prompt, seed=0, cfg_scale=7, num_inference_steps=50, positive_only_lora=lora, sigma_shift=8)
57
- image.save(f"data/style_out/1/image_lora_{style_id}_{prompt_id}.jpg")