diffsynth 2.1.8__tar.gz → 2.1.9__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.
- {diffsynth-2.1.8 → diffsynth-2.1.9}/PKG-INFO +13 -1
- {diffsynth-2.1.8 → diffsynth-2.1.9}/README.md +10 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/configs/model_configs.py +6 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/configs/vram_management_module_maps.py +6 -2
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/quant/backends/__init__.py +1 -0
- diffsynth-2.1.9/diffsynth/core/quant/backends/entropack.py +143 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/flow_match.py +17 -14
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/training_module.py +44 -2
- diffsynth-2.1.9/diffsynth/models/qwen_image_21_controlnet.py +101 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/qwen_image_21_dit.py +104 -88
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/qwen_image_21_vae.py +19 -4
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/qwen_image_21.py +101 -7
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/version.py +1 -1
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth.egg-info/PKG-INFO +13 -1
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth.egg-info/SOURCES.txt +2 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth.egg-info/requires.txt +2 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/pyproject.toml +2 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/LICENSE +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/configs/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/attention/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/attention/attention.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/data/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/data/operators.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/data/unified_dataset.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/device/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/device/npu_compatible_device.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/gradient/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/gradient/gradient_checkpoint.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/loader/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/loader/config.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/loader/file.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/loader/model.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/npu_patch/npu_fused_operator.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/offload_training/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/offload_training/manager.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/offload_training/memory_buffer.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/offload_training/offloader.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/quant/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/quant/backends/bitsandbytes.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/quant/backends/comfy_kitchen.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/quant/backends/torchao.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/quant/base.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/quant/config.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/vram/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/vram/disk_map.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/vram/initialization.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/core/vram/layers.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/base_pipeline.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/ddim_scheduler.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/dmd2.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/logger.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/loss.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/parsers.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/runner.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/diffusion/template.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/aesthetic.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/base.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/bioclip.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/clip.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/fid.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/hpsv2.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/hpsv3.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/image_reward.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/lpips.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/pickscore.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/qwen_image_bench.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/unified_reward_2.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/metrics/unified_reward_edit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ace_step_conditioner.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ace_step_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ace_step_residual_fsq.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ace_step_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ace_step_tokenizer.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ace_step_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/aesthetic.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/anima_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/bioclip.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/boogu_image_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/clip.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/demucs.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/diffsynth_music_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/dinov3_image_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ernie_image_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ernie_image_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/fid.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux2_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux2_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux2_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_controlnet.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_infiniteyou.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_ipadapter.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_lora_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_lora_patcher.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_redux.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_text_encoder_clip.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_text_encoder_t5.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/flux_value_control.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/general_modules.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/hidream_common.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/hidream_o1_image_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/hpsv2.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/hpsv3.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ideogram4_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ideogram4_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ideogram4_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/image_reward.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/joyai_image_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/krea2_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/krea2_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/lingbot_video_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/longcat_video_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/lpips.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ltx25_diffusion_video_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ltx25_duration_head.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ltx25_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ltx2_audio_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ltx2_common.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ltx2_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ltx2_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ltx2_upsampler.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/ltx2_video_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_h3_audio_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_h3_controlnet.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_h3_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_h3_dit_comfy.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_h3_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_h3_video_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_music3_condition_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_music3_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_music3_rvq_depth_decoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_music3_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/minimax_music3_vocoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/model_loader.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/mova_audio_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/mova_audio_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/mova_dual_tower_bridge.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/nexus_gen.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/nexus_gen_ar_model.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/nexus_gen_projector.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/pickscore.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/qwen_image_21_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/qwen_image_bench.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/qwen_image_controlnet.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/qwen_image_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/qwen_image_image2lora.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/qwen_image_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/qwen_image_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/qwen_video_edit_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/sd_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/sensenova_u1_common.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/sensenova_u1_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/siglip2_image_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/stable_diffusion_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/stable_diffusion_unet.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/stable_diffusion_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/stable_diffusion_xl_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/stable_diffusion_xl_unet.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/step1x_connector.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/step1x_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/unified_reward_2.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/unified_reward_edit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_animate_2_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_video_animate_adapter.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_video_camera_controller.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_video_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_video_dit_s2v.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_video_image_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_video_mot.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_video_motion_controller.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_video_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_video_vace.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wan_video_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wantodance.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/wav2vec.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/yue2_mot.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/yue2_tokenizer.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/yue2_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/z_image_controlnet.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/z_image_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/z_image_image2lora.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/models/z_image_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/ace_step.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/anima_image.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/boogu_image.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/diffsynth_music.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/ernie_image.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/flux2_image.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/flux_image.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/hidream_o1_image.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/ideogram4.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/joyai_image.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/krea2.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/lingbot_video.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/ltx2_audio_video.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/minimax_h3_audio_video.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/minimax_music3.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/mova_audio_video.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/qwen_image.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/qwen_video_edit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/sensenova_u1_image.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/stable_diffusion.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/stable_diffusion_xl.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/wan_video.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/yue2.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/pipelines/z_image.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/controlnet/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/controlnet/annotator.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/controlnet/controlnet_input.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/data/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/data/audio.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/data/audio_video.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/data/media_io_ltx2.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/data/minimax_h3.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/demucs/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/dequantizer/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/lora/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/lora/flux.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/lora/flux_timestep.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/lora/general.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/lora/krea2.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/lora/merge.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/lora/minimax_h3.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/lora/reset_rank.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/lora/sdxl.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/music_tools/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/music_tools/click.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/music_tools/prosody.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/quant/serialization.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/ses/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/ses/ses.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ace_step_conditioner.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ace_step_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ace_step_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ace_step_tokenizer.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/anima_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/dino_v3.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ernie_image_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/flux2_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/flux_controlnet.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/flux_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/flux_infiniteyou.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/flux_ipadapter.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/flux_text_encoder_clip.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/flux_text_encoder_t5.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/flux_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ideogram4_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/image_metrics.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/krea2_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/krea2_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/lingbot_video_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ltx25_diffusion_video_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ltx25_duration_head.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ltx25_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ltx2_audio_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ltx2_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ltx2_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/ltx2_video_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/minimax_h3_audio_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/minimax_h3_controlnet.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/minimax_h3_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/minimax_h3_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/minimax_h3_video_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/minimax_music3_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/nexus_gen.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/nexus_gen_projector.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/qwen_image_21_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/qwen_image_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/qwen_video_edit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/sdxl.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/sdxl_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/sdxl_text_encoder_2.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/sdxl_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/stable_diffusion_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/stable_diffusion_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/stable_diffusion_xl_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/step1x_connector.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/wan_video_animate_adapter.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/wan_video_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/wan_video_image_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/wan_video_mot.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/wan_video_vace.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/wan_video_vae.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/wans2v_audio_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/z_image_dit.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/state_dict_converters/z_image_text_encoder.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/tile/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/tile/tile_worker.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/xfuser/__init__.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth/utils/xfuser/xdit_context_parallel.py +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth.egg-info/dependency_links.txt +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/diffsynth.egg-info/top_level.txt +0 -0
- {diffsynth-2.1.8 → diffsynth-2.1.9}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: diffsynth
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.9
|
|
4
4
|
Summary: Enjoy the magic of Diffusion models!
|
|
5
5
|
Author: ModelScope Team
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -28,6 +28,7 @@ Requires-Dist: librosa; extra == "audio"
|
|
|
28
28
|
Provides-Extra: quant
|
|
29
29
|
Requires-Dist: bitsandbytes; extra == "quant"
|
|
30
30
|
Requires-Dist: comfy-kitchen; extra == "quant"
|
|
31
|
+
Requires-Dist: entropack[cuda13]; extra == "quant"
|
|
31
32
|
Requires-Dist: torchao>=0.16; extra == "quant"
|
|
32
33
|
Provides-Extra: training
|
|
33
34
|
Requires-Dist: deepspeed; extra == "training"
|
|
@@ -62,6 +63,7 @@ Requires-Dist: torchcodec; extra == "all"
|
|
|
62
63
|
Requires-Dist: librosa; extra == "all"
|
|
63
64
|
Requires-Dist: bitsandbytes; extra == "all"
|
|
64
65
|
Requires-Dist: comfy-kitchen; extra == "all"
|
|
66
|
+
Requires-Dist: entropack[cuda13]; extra == "all"
|
|
65
67
|
Requires-Dist: torchao>=0.16; extra == "all"
|
|
66
68
|
Requires-Dist: deepspeed; extra == "all"
|
|
67
69
|
Requires-Dist: tensorboard; extra == "all"
|
|
@@ -112,6 +114,13 @@ See also:
|
|
|
112
114
|
|
|
113
115
|
> Currently, the development personnel of this project are limited, with most of the work handled by [Artiprocher](https://github.com/Artiprocher) and [mi804](https://github.com/mi804). 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.
|
|
114
116
|
|
|
117
|
+
- **September 29, 2026** We are excited to open-source EntroPack, a general-purpose tensor compression library for PyTorch that provides lossless compression with exact recovery and rate-controlled lossy compression, with GPU encoding and decoding. It is integrated into DiffSynth-Studio as a quantization backend, compressing model weights at arbitrary target bitrates in both inference and LoRA training. For more information, please refer to:
|
|
118
|
+
|
|
119
|
+
* Project Page: https://github.com/modelscope/entropack
|
|
120
|
+
* Technical Report: https://arxiv.org/abs/2609.34185
|
|
121
|
+
* Pre-quantized Models: https://www.modelscope.cn/models/DiffSynth-Studio/EntroPackPreQuants
|
|
122
|
+
* Example Code: [Z-Image-Turbo](/examples/z_image/model_inference_low_vram/Z-Image-Turbo-EntroPack.py), [Qwen-Image-2.1](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1-EntroPack.py), [MiniMax-H3](/examples/minimax_h3/model_inference_low_vram/MiniMax-H3-EntroPack.py), [LoRA Training Example](/examples/z_image/model_training/special/quant_training/Z-Image-Turbo-entropack_lossy_quant.sh)
|
|
123
|
+
|
|
115
124
|
- **September 20, 2026** Qwen-Image-2.1 was open-sourced. The model supports text-to-image generation, image editing, and RGBA output with a transparency channel. DiffSynth-Studio now provides full support for it. For details, please refer to the [documentation](/docs/zh/Model_Details/Qwen-Image-2.1.md) and [example code](/examples/qwen_image_21/).
|
|
116
125
|
|
|
117
126
|
- **September 14, 2026** We trained and open-sourced DiffSynth-Music, a controllable music generation model based on ACE-Step, which supports five control modes: Beats, Vocals, Accompany, Prosody, and Reference. For more information, please refer to:
|
|
@@ -388,6 +397,7 @@ Quick start: experience popular and the latest models:
|
|
|
388
397
|
| Architecture | Model ID | Inference | Low VRAM Inference | Full Training | Validation After Full Training | LoRA Training | Validation After LoRA Training |
|
|
389
398
|
|-|-|-|-|-|-|-|-|
|
|
390
399
|
| Qwen-Image-2.1 | [Qwen/Qwen-Image-2.1](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1) | [code](/examples/qwen_image_21/model_inference/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_training/full/Qwen-Image-2.1.sh) | [code](/examples/qwen_image_21/model_training/validate_full/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_training/lora/Qwen-Image-2.1.sh) | [code](/examples/qwen_image_21/model_training/validate_lora/Qwen-Image-2.1.py) |
|
|
400
|
+
| Qwen-Image-2.1 | [Qwen/Qwen-Image-2.1-Turbo](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1-Turbo) | [code](/examples/qwen_image_21/model_inference/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_training/full/Qwen-Image-2.1-Turbo.sh) | [code](/examples/qwen_image_21/model_training/validate_full/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_training/lora/Qwen-Image-2.1-Turbo.sh) | [code](/examples/qwen_image_21/model_training/validate_lora/Qwen-Image-2.1-Turbo.py) |
|
|
391
401
|
| MiniMax-H3 | [MiniMax/MiniMax-H3: FL2VA](https://www.modelscope.cn/models/MiniMax/MiniMax-H3) | [code](/examples/minimax_h3/model_inference/MiniMax-H3-FL2VA.py) | [code](/examples/minimax_h3/model_inference_low_vram/MiniMax-H3-FL2VA.py) | [code](/examples/minimax_h3/model_training/full/MiniMax-H3-FL2VA.sh) | [code](/examples/minimax_h3/model_training/validate_full/MiniMax-H3-FL2VA.py) | [code](/examples/minimax_h3/model_training/lora/MiniMax-H3-FL2VA.sh) | [code](/examples/minimax_h3/model_training/validate_lora/MiniMax-H3-FL2VA.py) |
|
|
392
402
|
| MiniMax-H3 | [DiffSynth-Studio/MiniMax-H3-NF4: FL2VA pruned](https://www.modelscope.cn/models/DiffSynth-Studio/MiniMax-H3-NF4) | [code](/examples/minimax_h3/model_inference/MiniMax-H3-NF4-Pruned-FL2VA.py) | [code](/examples/minimax_h3/model_inference_low_vram/MiniMax-H3-NF4-Pruned-FL2VA.py) | - | - | [code](/examples/minimax_h3/model_training/lora/MiniMax-H3-NF4-Pruned-FL2VA.sh) | [code](/examples/minimax_h3/model_training/validate_lora/MiniMax-H3-NF4-Pruned-FL2VA.py) |
|
|
393
403
|
| ACE-Step | [ACE-Step/acestep-v15-xl-sft](https://www.modelscope.cn/models/ACE-Step/acestep-v15-xl-sft) | [code](/examples/ace_step/model_inference/acestep-v15-xl-sft.py) | [code](/examples/ace_step/model_inference_low_vram/acestep-v15-xl-sft.py) | [code](/examples/ace_step/model_training/full/acestep-v15-xl-sft.sh) | [code](/examples/ace_step/model_training/validate_full/acestep-v15-xl-sft.py) | [code](/examples/ace_step/model_training/lora/acestep-v15-xl-sft.sh) | [code](/examples/ace_step/model_training/validate_lora/acestep-v15-xl-sft.py) |
|
|
@@ -670,6 +680,8 @@ https://github.com/Artiprocher/DiffSynth-Studio/assets/35051019/59fb2f7b-8de0-44
|
|
|
670
680
|
| Architecture | Model ID | Inference | Low VRAM Inference | Full Training | Validation After Full Training | LoRA Training | Validation After LoRA Training |
|
|
671
681
|
|-|-|-|-|-|-|-|-|
|
|
672
682
|
| Qwen-Image-2.1 | [Qwen/Qwen-Image-2.1](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1) | [code](/examples/qwen_image_21/model_inference/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_training/full/Qwen-Image-2.1.sh) | [code](/examples/qwen_image_21/model_training/validate_full/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_training/lora/Qwen-Image-2.1.sh) | [code](/examples/qwen_image_21/model_training/validate_lora/Qwen-Image-2.1.py) |
|
|
683
|
+
| Qwen-Image-2.1 | [Qwen/Qwen-Image-2.1-Turbo](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1-Turbo) | [code](/examples/qwen_image_21/model_inference/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_training/full/Qwen-Image-2.1-Turbo.sh) | [code](/examples/qwen_image_21/model_training/validate_full/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_training/lora/Qwen-Image-2.1-Turbo.sh) | [code](/examples/qwen_image_21/model_training/validate_lora/Qwen-Image-2.1-Turbo.py) |
|
|
684
|
+
| Qwen-Image-2.1 | [PAI/Qwen-Image-2.1-Fun-Controlnet-Union](https://www.modelscope.cn/models/PAI/Qwen-Image-2.1-Fun-Controlnet-Union) | [code](/examples/qwen_image_21/model_inference/Qwen-Image-2.1-Fun-Controlnet-Union.py) | [code](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1-Fun-Controlnet-Union.py) | [code](/examples/qwen_image_21/model_training/full/Qwen-Image-2.1-Fun-Controlnet-Union.sh) | [code](/examples/qwen_image_21/model_training/validate_full/Qwen-Image-2.1-Fun-Controlnet-Union.py) | [code](/examples/qwen_image_21/model_training/lora/Qwen-Image-2.1-Fun-Controlnet-Union.sh) | [code](/examples/qwen_image_21/model_training/validate_lora/Qwen-Image-2.1-Fun-Controlnet-Union.py) |
|
|
673
685
|
| SenseNova-U1 | [SenseNova/SenseNova-U1.5-8B-MoT: T2I](https://www.modelscope.cn/models/SenseNova/SenseNova-U1.5-8B-MoT) | [code](/examples/sensenova_u1/model_inference/SenseNova-U1.5-8B-MoT.py) | [code](/examples/sensenova_u1/model_inference_low_vram/SenseNova-U1.5-8B-MoT.py) | [code](/examples/sensenova_u1/model_training/full/SenseNova-U1.5-8B-MoT.sh) | [code](/examples/sensenova_u1/model_training/validate_full/SenseNova-U1.5-8B-MoT.py) | [code](/examples/sensenova_u1/model_training/lora/SenseNova-U1.5-8B-MoT.sh) | [code](/examples/sensenova_u1/model_training/validate_lora/SenseNova-U1.5-8B-MoT.py) |
|
|
674
686
|
| SenseNova-U1 | [SenseNova/SenseNova-U1.5-8B-MoT: Edit](https://www.modelscope.cn/models/SenseNova/SenseNova-U1.5-8B-MoT) | [code](/examples/sensenova_u1/model_inference/SenseNova-U1.5-8B-MoT-Edit.py) | [code](/examples/sensenova_u1/model_inference_low_vram/SenseNova-U1.5-8B-MoT-Edit.py) | [code](/examples/sensenova_u1/model_training/full/SenseNova-U1.5-8B-MoT-Edit.sh) | [code](/examples/sensenova_u1/model_training/validate_full/SenseNova-U1.5-8B-MoT-Edit.py) | [code](/examples/sensenova_u1/model_training/lora/SenseNova-U1.5-8B-MoT-Edit.sh) | [code](/examples/sensenova_u1/model_training/validate_lora/SenseNova-U1.5-8B-MoT-Edit.py) |
|
|
675
687
|
| SenseNova-U1 | [SenseNova/SenseNova-U1.5-8B-MoT-LoRAs: 8-step](https://www.modelscope.cn/models/SenseNova/SenseNova-U1.5-8B-MoT-LoRAs) | [code](/examples/sensenova_u1/model_inference/SenseNova-U1.5-8B-MoT-LoRA-8step.py) | [code](/examples/sensenova_u1/model_inference_low_vram/SenseNova-U1.5-8B-MoT-LoRA-8step.py) | - | - | - | - |
|
|
@@ -41,6 +41,13 @@ See also:
|
|
|
41
41
|
|
|
42
42
|
> Currently, the development personnel of this project are limited, with most of the work handled by [Artiprocher](https://github.com/Artiprocher) and [mi804](https://github.com/mi804). 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.
|
|
43
43
|
|
|
44
|
+
- **September 29, 2026** We are excited to open-source EntroPack, a general-purpose tensor compression library for PyTorch that provides lossless compression with exact recovery and rate-controlled lossy compression, with GPU encoding and decoding. It is integrated into DiffSynth-Studio as a quantization backend, compressing model weights at arbitrary target bitrates in both inference and LoRA training. For more information, please refer to:
|
|
45
|
+
|
|
46
|
+
* Project Page: https://github.com/modelscope/entropack
|
|
47
|
+
* Technical Report: https://arxiv.org/abs/2609.34185
|
|
48
|
+
* Pre-quantized Models: https://www.modelscope.cn/models/DiffSynth-Studio/EntroPackPreQuants
|
|
49
|
+
* Example Code: [Z-Image-Turbo](/examples/z_image/model_inference_low_vram/Z-Image-Turbo-EntroPack.py), [Qwen-Image-2.1](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1-EntroPack.py), [MiniMax-H3](/examples/minimax_h3/model_inference_low_vram/MiniMax-H3-EntroPack.py), [LoRA Training Example](/examples/z_image/model_training/special/quant_training/Z-Image-Turbo-entropack_lossy_quant.sh)
|
|
50
|
+
|
|
44
51
|
- **September 20, 2026** Qwen-Image-2.1 was open-sourced. The model supports text-to-image generation, image editing, and RGBA output with a transparency channel. DiffSynth-Studio now provides full support for it. For details, please refer to the [documentation](/docs/zh/Model_Details/Qwen-Image-2.1.md) and [example code](/examples/qwen_image_21/).
|
|
45
52
|
|
|
46
53
|
- **September 14, 2026** We trained and open-sourced DiffSynth-Music, a controllable music generation model based on ACE-Step, which supports five control modes: Beats, Vocals, Accompany, Prosody, and Reference. For more information, please refer to:
|
|
@@ -317,6 +324,7 @@ Quick start: experience popular and the latest models:
|
|
|
317
324
|
| Architecture | Model ID | Inference | Low VRAM Inference | Full Training | Validation After Full Training | LoRA Training | Validation After LoRA Training |
|
|
318
325
|
|-|-|-|-|-|-|-|-|
|
|
319
326
|
| Qwen-Image-2.1 | [Qwen/Qwen-Image-2.1](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1) | [code](/examples/qwen_image_21/model_inference/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_training/full/Qwen-Image-2.1.sh) | [code](/examples/qwen_image_21/model_training/validate_full/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_training/lora/Qwen-Image-2.1.sh) | [code](/examples/qwen_image_21/model_training/validate_lora/Qwen-Image-2.1.py) |
|
|
327
|
+
| Qwen-Image-2.1 | [Qwen/Qwen-Image-2.1-Turbo](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1-Turbo) | [code](/examples/qwen_image_21/model_inference/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_training/full/Qwen-Image-2.1-Turbo.sh) | [code](/examples/qwen_image_21/model_training/validate_full/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_training/lora/Qwen-Image-2.1-Turbo.sh) | [code](/examples/qwen_image_21/model_training/validate_lora/Qwen-Image-2.1-Turbo.py) |
|
|
320
328
|
| MiniMax-H3 | [MiniMax/MiniMax-H3: FL2VA](https://www.modelscope.cn/models/MiniMax/MiniMax-H3) | [code](/examples/minimax_h3/model_inference/MiniMax-H3-FL2VA.py) | [code](/examples/minimax_h3/model_inference_low_vram/MiniMax-H3-FL2VA.py) | [code](/examples/minimax_h3/model_training/full/MiniMax-H3-FL2VA.sh) | [code](/examples/minimax_h3/model_training/validate_full/MiniMax-H3-FL2VA.py) | [code](/examples/minimax_h3/model_training/lora/MiniMax-H3-FL2VA.sh) | [code](/examples/minimax_h3/model_training/validate_lora/MiniMax-H3-FL2VA.py) |
|
|
321
329
|
| MiniMax-H3 | [DiffSynth-Studio/MiniMax-H3-NF4: FL2VA pruned](https://www.modelscope.cn/models/DiffSynth-Studio/MiniMax-H3-NF4) | [code](/examples/minimax_h3/model_inference/MiniMax-H3-NF4-Pruned-FL2VA.py) | [code](/examples/minimax_h3/model_inference_low_vram/MiniMax-H3-NF4-Pruned-FL2VA.py) | - | - | [code](/examples/minimax_h3/model_training/lora/MiniMax-H3-NF4-Pruned-FL2VA.sh) | [code](/examples/minimax_h3/model_training/validate_lora/MiniMax-H3-NF4-Pruned-FL2VA.py) |
|
|
322
330
|
| ACE-Step | [ACE-Step/acestep-v15-xl-sft](https://www.modelscope.cn/models/ACE-Step/acestep-v15-xl-sft) | [code](/examples/ace_step/model_inference/acestep-v15-xl-sft.py) | [code](/examples/ace_step/model_inference_low_vram/acestep-v15-xl-sft.py) | [code](/examples/ace_step/model_training/full/acestep-v15-xl-sft.sh) | [code](/examples/ace_step/model_training/validate_full/acestep-v15-xl-sft.py) | [code](/examples/ace_step/model_training/lora/acestep-v15-xl-sft.sh) | [code](/examples/ace_step/model_training/validate_lora/acestep-v15-xl-sft.py) |
|
|
@@ -599,6 +607,8 @@ https://github.com/Artiprocher/DiffSynth-Studio/assets/35051019/59fb2f7b-8de0-44
|
|
|
599
607
|
| Architecture | Model ID | Inference | Low VRAM Inference | Full Training | Validation After Full Training | LoRA Training | Validation After LoRA Training |
|
|
600
608
|
|-|-|-|-|-|-|-|-|
|
|
601
609
|
| Qwen-Image-2.1 | [Qwen/Qwen-Image-2.1](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1) | [code](/examples/qwen_image_21/model_inference/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_training/full/Qwen-Image-2.1.sh) | [code](/examples/qwen_image_21/model_training/validate_full/Qwen-Image-2.1.py) | [code](/examples/qwen_image_21/model_training/lora/Qwen-Image-2.1.sh) | [code](/examples/qwen_image_21/model_training/validate_lora/Qwen-Image-2.1.py) |
|
|
610
|
+
| Qwen-Image-2.1 | [Qwen/Qwen-Image-2.1-Turbo](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1-Turbo) | [code](/examples/qwen_image_21/model_inference/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_training/full/Qwen-Image-2.1-Turbo.sh) | [code](/examples/qwen_image_21/model_training/validate_full/Qwen-Image-2.1-Turbo.py) | [code](/examples/qwen_image_21/model_training/lora/Qwen-Image-2.1-Turbo.sh) | [code](/examples/qwen_image_21/model_training/validate_lora/Qwen-Image-2.1-Turbo.py) |
|
|
611
|
+
| Qwen-Image-2.1 | [PAI/Qwen-Image-2.1-Fun-Controlnet-Union](https://www.modelscope.cn/models/PAI/Qwen-Image-2.1-Fun-Controlnet-Union) | [code](/examples/qwen_image_21/model_inference/Qwen-Image-2.1-Fun-Controlnet-Union.py) | [code](/examples/qwen_image_21/model_inference_low_vram/Qwen-Image-2.1-Fun-Controlnet-Union.py) | [code](/examples/qwen_image_21/model_training/full/Qwen-Image-2.1-Fun-Controlnet-Union.sh) | [code](/examples/qwen_image_21/model_training/validate_full/Qwen-Image-2.1-Fun-Controlnet-Union.py) | [code](/examples/qwen_image_21/model_training/lora/Qwen-Image-2.1-Fun-Controlnet-Union.sh) | [code](/examples/qwen_image_21/model_training/validate_lora/Qwen-Image-2.1-Fun-Controlnet-Union.py) |
|
|
602
612
|
| SenseNova-U1 | [SenseNova/SenseNova-U1.5-8B-MoT: T2I](https://www.modelscope.cn/models/SenseNova/SenseNova-U1.5-8B-MoT) | [code](/examples/sensenova_u1/model_inference/SenseNova-U1.5-8B-MoT.py) | [code](/examples/sensenova_u1/model_inference_low_vram/SenseNova-U1.5-8B-MoT.py) | [code](/examples/sensenova_u1/model_training/full/SenseNova-U1.5-8B-MoT.sh) | [code](/examples/sensenova_u1/model_training/validate_full/SenseNova-U1.5-8B-MoT.py) | [code](/examples/sensenova_u1/model_training/lora/SenseNova-U1.5-8B-MoT.sh) | [code](/examples/sensenova_u1/model_training/validate_lora/SenseNova-U1.5-8B-MoT.py) |
|
|
603
613
|
| SenseNova-U1 | [SenseNova/SenseNova-U1.5-8B-MoT: Edit](https://www.modelscope.cn/models/SenseNova/SenseNova-U1.5-8B-MoT) | [code](/examples/sensenova_u1/model_inference/SenseNova-U1.5-8B-MoT-Edit.py) | [code](/examples/sensenova_u1/model_inference_low_vram/SenseNova-U1.5-8B-MoT-Edit.py) | [code](/examples/sensenova_u1/model_training/full/SenseNova-U1.5-8B-MoT-Edit.sh) | [code](/examples/sensenova_u1/model_training/validate_full/SenseNova-U1.5-8B-MoT-Edit.py) | [code](/examples/sensenova_u1/model_training/lora/SenseNova-U1.5-8B-MoT-Edit.sh) | [code](/examples/sensenova_u1/model_training/validate_lora/SenseNova-U1.5-8B-MoT-Edit.py) |
|
|
604
614
|
| SenseNova-U1 | [SenseNova/SenseNova-U1.5-8B-MoT-LoRAs: 8-step](https://www.modelscope.cn/models/SenseNova/SenseNova-U1.5-8B-MoT-LoRAs) | [code](/examples/sensenova_u1/model_inference/SenseNova-U1.5-8B-MoT-LoRA-8step.py) | [code](/examples/sensenova_u1/model_inference_low_vram/SenseNova-U1.5-8B-MoT-LoRA-8step.py) | - | - | - | - |
|
|
@@ -1735,6 +1735,12 @@ qwen_image_21_series = [
|
|
|
1735
1735
|
"model_class": "diffsynth.models.qwen_image_21_text_encoder.QwenImage21TextEncoder",
|
|
1736
1736
|
"state_dict_converter": "diffsynth.utils.state_dict_converters.qwen_image_21_text_encoder.QwenImage21TextEncoderStateDictConverter",
|
|
1737
1737
|
},
|
|
1738
|
+
{
|
|
1739
|
+
# Example: ModelConfig(model_id="PAI/Qwen-Image-2.1-Fun-Controlnet-Union", origin_file_pattern="Qwen-Image-2.1-Fun-Controlnet-Union.safetensors")
|
|
1740
|
+
"model_hash": "21fca5e7dc68c836804b46f735677546",
|
|
1741
|
+
"model_name": "qwen_image_21_controlnet",
|
|
1742
|
+
"model_class": "diffsynth.models.qwen_image_21_controlnet.QwenImage21ControlNet",
|
|
1743
|
+
},
|
|
1738
1744
|
]
|
|
1739
1745
|
|
|
1740
1746
|
MODEL_CONFIGS = (
|
|
@@ -30,7 +30,6 @@ VRAM_MANAGEMENT_MODULE_MAPS = {
|
|
|
30
30
|
"torch.nn.Conv3d": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
31
31
|
"transformers.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLTextRMSNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
32
32
|
"transformers.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLTextRotaryEmbedding": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
33
|
-
"transformers.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLVisionModel": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
34
33
|
"transformers.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLVisionPatchEmbed": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
35
34
|
"transformers.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLVisionRotaryEmbedding": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
36
35
|
},
|
|
@@ -552,6 +551,10 @@ VRAM_MANAGEMENT_MODULE_MAPS = {
|
|
|
552
551
|
"diffsynth.models.qwen_image_21_dit.QwenImage21RMSNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
553
552
|
"diffsynth.models.qwen_image_21_dit.QwenImage21ZeroCenterRMSNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
554
553
|
},
|
|
554
|
+
"diffsynth.models.qwen_image_21_controlnet.QwenImage21ControlNet": {
|
|
555
|
+
"torch.nn.Linear": "diffsynth.core.vram.layers.AutoWrappedLinear",
|
|
556
|
+
"diffsynth.models.qwen_image_21_dit.QwenImage21RMSNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
557
|
+
},
|
|
555
558
|
"diffsynth.models.qwen_image_21_vae.QwenImage21VAE": {
|
|
556
559
|
"torch.nn.Conv2d": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
557
560
|
"diffsynth.models.qwen_image_21_vae.QwenImage21RMS_norm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
@@ -561,9 +564,10 @@ VRAM_MANAGEMENT_MODULE_MAPS = {
|
|
|
561
564
|
"torch.nn.Embedding": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
562
565
|
"torch.nn.LayerNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
563
566
|
"torch.nn.Conv3d": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
564
|
-
"transformers.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLVisionModel": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
565
567
|
"transformers.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLTextRMSNorm": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
566
568
|
"transformers.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLTextRotaryEmbedding": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
569
|
+
"transformers.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLVisionPatchEmbed": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
570
|
+
"transformers.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLVisionRotaryEmbedding": "diffsynth.core.vram.layers.AutoWrappedModule",
|
|
567
571
|
},
|
|
568
572
|
}
|
|
569
573
|
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
import torch
|
|
4
|
+
|
|
5
|
+
from ..base import BackendConfig, QuantBackend, register_quant_backend
|
|
6
|
+
from ..config import register_quant_method
|
|
7
|
+
|
|
8
|
+
try:
|
|
9
|
+
import entropack as ep
|
|
10
|
+
|
|
11
|
+
_REQUIRED_ENTROPACK_API = (
|
|
12
|
+
ep.CompressedLinear, ep.CompressedFP8Linear, ep.CompressedINT8Linear,
|
|
13
|
+
ep.DFloat11Config, ep.TileANSConfig, ep.LatticeRANSConfig, ep.RawConfig,
|
|
14
|
+
)
|
|
15
|
+
ENTROPACK_AVAILABLE = True
|
|
16
|
+
_ENTROPACK_IMPORT_ERROR = None
|
|
17
|
+
except (ImportError, AttributeError) as error:
|
|
18
|
+
ep = None
|
|
19
|
+
ENTROPACK_AVAILABLE = False
|
|
20
|
+
_ENTROPACK_IMPORT_ERROR = error
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
if ENTROPACK_AVAILABLE:
|
|
24
|
+
|
|
25
|
+
@dataclass
|
|
26
|
+
class EntroPackDFloat11Config(BackendConfig, ep.DFloat11Config):
|
|
27
|
+
linear_cls = ep.CompressedLinear
|
|
28
|
+
|
|
29
|
+
@dataclass
|
|
30
|
+
class EntroPackTileANSConfig(BackendConfig, ep.TileANSConfig):
|
|
31
|
+
linear_cls = ep.CompressedLinear
|
|
32
|
+
|
|
33
|
+
@dataclass
|
|
34
|
+
class EntroPackLossyQuantConfig(BackendConfig, ep.LatticeRANSConfig):
|
|
35
|
+
linear_cls = ep.CompressedLinear
|
|
36
|
+
|
|
37
|
+
@dataclass
|
|
38
|
+
class EntroPackFP8CodedConfig(BackendConfig, ep.LatticeRANSConfig):
|
|
39
|
+
linear_cls = ep.CompressedFP8Linear
|
|
40
|
+
|
|
41
|
+
@dataclass
|
|
42
|
+
class EntroPackFP8RawConfig(BackendConfig, ep.RawConfig):
|
|
43
|
+
linear_cls = ep.CompressedFP8Linear
|
|
44
|
+
|
|
45
|
+
@dataclass
|
|
46
|
+
class EntroPackINT8CodedConfig(BackendConfig, ep.LatticeRANSConfig):
|
|
47
|
+
linear_cls = ep.CompressedINT8Linear
|
|
48
|
+
|
|
49
|
+
@dataclass
|
|
50
|
+
class EntroPackINT8RawConfig(BackendConfig, ep.RawConfig):
|
|
51
|
+
linear_cls = ep.CompressedINT8Linear
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@register_quant_backend("entropack")
|
|
55
|
+
class EntroPackQuantBackend(QuantBackend):
|
|
56
|
+
"""Adapter over entropack's `CompressedLinear` family; a method's config is the config its layers get."""
|
|
57
|
+
|
|
58
|
+
project_url = "https://github.com/modelscope/entropack"
|
|
59
|
+
|
|
60
|
+
def validate_environment(self):
|
|
61
|
+
if not ENTROPACK_AVAILABLE:
|
|
62
|
+
raise ImportError(
|
|
63
|
+
"entropack with the CompressedLinear / CompressedFP8Linear / CompressedINT8Linear "
|
|
64
|
+
"classes is required for this quantization method. Install it via "
|
|
65
|
+
'`pip install "entropack[cuda13]"` (use `cuda12` for a CUDA 12 environment) '
|
|
66
|
+
'or `pip install "diffsynth[quant]"`.'
|
|
67
|
+
) from _ENTROPACK_IMPORT_ERROR
|
|
68
|
+
|
|
69
|
+
def capabilities(self):
|
|
70
|
+
return {
|
|
71
|
+
"is_serializable": True,
|
|
72
|
+
"is_differentiable": True,
|
|
73
|
+
"is_compileable": False,
|
|
74
|
+
"requires_calibration": False,
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
def quantized_linear_classes(self):
|
|
78
|
+
return (ep.CompressedLinear, ep.CompressedFP8Linear, ep.CompressedINT8Linear)
|
|
79
|
+
|
|
80
|
+
def unflatten_state_dict(self, state_dict, metadata):
|
|
81
|
+
return state_dict
|
|
82
|
+
|
|
83
|
+
def create_quantized_linear(self, linear, compute_device=None, model_device=None):
|
|
84
|
+
linear.requires_grad_(False)
|
|
85
|
+
if compute_device is not None:
|
|
86
|
+
linear = linear.to(device=compute_device)
|
|
87
|
+
quantized = self.config.linear_cls.from_linear(linear, config=self.config)
|
|
88
|
+
return quantized if model_device is None else quantized.to(device=model_device)
|
|
89
|
+
|
|
90
|
+
def create_quantized_linear_shell(self, linear, compute_dtype):
|
|
91
|
+
return self.config.linear_cls(
|
|
92
|
+
linear.in_features, linear.out_features, bias=linear.bias is not None,
|
|
93
|
+
dtype=compute_dtype, config=self.config,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
def dequantize_to_linear(self, module, compute_dtype, compute_device=None, model_device=None):
|
|
97
|
+
if compute_device is not None:
|
|
98
|
+
module = module.to(device=compute_device)
|
|
99
|
+
weight = module.dequantize(compute_device).to(compute_dtype)
|
|
100
|
+
linear = torch.nn.Linear(module.in_features, module.out_features, bias=module.bias is not None, device="meta")
|
|
101
|
+
linear.weight = torch.nn.Parameter(weight, requires_grad=False)
|
|
102
|
+
if module.bias is not None:
|
|
103
|
+
linear.bias = torch.nn.Parameter(
|
|
104
|
+
module.bias.data.to(dtype=compute_dtype, device=weight.device), requires_grad=False,
|
|
105
|
+
)
|
|
106
|
+
return linear if model_device is None else linear.to(device=model_device)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _df11_config(kwargs):
|
|
110
|
+
return EntroPackDFloat11Config.from_kwargs(kwargs)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def _tile_ans_config(kwargs):
|
|
114
|
+
return EntroPackTileANSConfig.from_kwargs(kwargs)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def _lossy_config(kwargs):
|
|
118
|
+
return EntroPackLossyQuantConfig.from_kwargs(kwargs)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def _fp8_coded_config(kwargs):
|
|
122
|
+
return EntroPackFP8CodedConfig.from_kwargs(kwargs)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def _fp8_raw_config(kwargs):
|
|
126
|
+
return EntroPackFP8RawConfig.from_kwargs(kwargs)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def _int8_coded_config(kwargs):
|
|
130
|
+
return EntroPackINT8CodedConfig.from_kwargs(kwargs)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def _int8_raw_config(kwargs):
|
|
134
|
+
return EntroPackINT8RawConfig.from_kwargs(kwargs)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
register_quant_method("entropack_lossless_df11", "entropack", _df11_config, label="lossless, dfloat11")
|
|
138
|
+
register_quant_method("entropack_lossless_tile_ans", "entropack", _tile_ans_config, label="lossless, tile_ans")
|
|
139
|
+
register_quant_method("entropack_lossy_quant", "entropack", _lossy_config, label="lossy, lattice rate")
|
|
140
|
+
register_quant_method("entropack_lossy_quant_fp8", "entropack", _fp8_coded_config, label="W8A8, fp8, lattice-coded")
|
|
141
|
+
register_quant_method("entropack_lossy_quant_fp8_raw", "entropack", _fp8_raw_config, label="W8A8, fp8, codes verbatim")
|
|
142
|
+
register_quant_method("entropack_lossy_quant_int8", "entropack", _int8_coded_config, label="W8A8, int8, lattice-coded")
|
|
143
|
+
register_quant_method("entropack_lossy_quant_int8_raw", "entropack", _int8_raw_config, label="W8A8, int8, codes verbatim")
|
|
@@ -60,26 +60,29 @@ class FlowMatchScheduler():
|
|
|
60
60
|
return mu
|
|
61
61
|
|
|
62
62
|
@staticmethod
|
|
63
|
-
def set_timesteps_qwen_image(num_inference_steps=100, denoising_strength=1.0, exponential_shift_mu=None, dynamic_shift_len=None):
|
|
63
|
+
def set_timesteps_qwen_image(num_inference_steps=100, denoising_strength=1.0, exponential_shift_mu=None, dynamic_shift_len=None, sigmas=None):
|
|
64
64
|
sigma_min = 0.0
|
|
65
65
|
sigma_max = 1.0
|
|
66
66
|
num_train_timesteps = 1000
|
|
67
67
|
shift_terminal = 0.02
|
|
68
68
|
# Sigmas
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
if sigmas is None:
|
|
70
|
+
sigma_start = sigma_min + (sigma_max - sigma_min) * denoising_strength
|
|
71
|
+
sigmas = torch.linspace(sigma_start, sigma_min, num_inference_steps + 1)[:-1]
|
|
72
|
+
# Mu
|
|
73
|
+
if exponential_shift_mu is not None:
|
|
74
|
+
mu = exponential_shift_mu
|
|
75
|
+
elif dynamic_shift_len is not None:
|
|
76
|
+
mu = FlowMatchScheduler._calculate_shift_qwen_image(dynamic_shift_len)
|
|
77
|
+
else:
|
|
78
|
+
mu = 0.8
|
|
79
|
+
sigmas = math.exp(mu) / (math.exp(mu) + (1 / sigmas - 1))
|
|
80
|
+
# Shift terminal
|
|
81
|
+
one_minus_z = 1 - sigmas
|
|
82
|
+
scale_factor = one_minus_z[-1] / (1 - shift_terminal)
|
|
83
|
+
sigmas = 1 - (one_minus_z / scale_factor)
|
|
76
84
|
else:
|
|
77
|
-
|
|
78
|
-
sigmas = math.exp(mu) / (math.exp(mu) + (1 / sigmas - 1))
|
|
79
|
-
# Shift terminal
|
|
80
|
-
one_minus_z = 1 - sigmas
|
|
81
|
-
scale_factor = one_minus_z[-1] / (1 - shift_terminal)
|
|
82
|
-
sigmas = 1 - (one_minus_z / scale_factor)
|
|
85
|
+
sigmas = torch.tensor(sigmas)
|
|
83
86
|
# Timesteps
|
|
84
87
|
timesteps = sigmas * num_train_timesteps
|
|
85
88
|
return sigmas, timesteps
|
|
@@ -280,11 +280,53 @@ class DiffusionTrainingModule(torch.nn.Module):
|
|
|
280
280
|
return lora_target_modules
|
|
281
281
|
|
|
282
282
|
|
|
283
|
+
@staticmethod
|
|
284
|
+
def format_lora_target_modules(lora_target_modules):
|
|
285
|
+
def compress(paths):
|
|
286
|
+
if len(paths) == 1:
|
|
287
|
+
return ".".join(paths[0])
|
|
288
|
+
# Factor out the common prefix.
|
|
289
|
+
prefix_len = 0
|
|
290
|
+
while all(len(path) > prefix_len for path in paths) and len({path[prefix_len] for path in paths}) == 1:
|
|
291
|
+
prefix_len += 1
|
|
292
|
+
prefix = paths[0][:prefix_len]
|
|
293
|
+
paths = [path[prefix_len:] for path in paths]
|
|
294
|
+
# Factor out the common suffix.
|
|
295
|
+
suffix_len = 0
|
|
296
|
+
while all(len(path) > suffix_len for path in paths) and len({path[len(path) - 1 - suffix_len] for path in paths}) == 1:
|
|
297
|
+
suffix_len += 1
|
|
298
|
+
suffix = paths[0][len(paths[0]) - suffix_len:] if suffix_len > 0 else []
|
|
299
|
+
paths = [path[:len(path) - suffix_len] for path in paths]
|
|
300
|
+
# Group by the first token, then merge the groups sharing an identical tail.
|
|
301
|
+
groups = {}
|
|
302
|
+
for path in paths:
|
|
303
|
+
groups.setdefault(path[0], []).append(path[1:])
|
|
304
|
+
keys = list(groups.keys())
|
|
305
|
+
sorted_tails = [sorted(groups[key]) for key in keys]
|
|
306
|
+
if len(keys) > 1 and all(tail == sorted_tails[0] for tail in sorted_tails):
|
|
307
|
+
common_tail = groups[keys[0]]
|
|
308
|
+
tail_str = compress(common_tail) if len(common_tail) > 0 else ""
|
|
309
|
+
middle = "{" + ",".join(keys) + "}" + (("." + tail_str) if tail_str != "" else "")
|
|
310
|
+
else:
|
|
311
|
+
rendered = []
|
|
312
|
+
for key in keys:
|
|
313
|
+
tail = groups[key]
|
|
314
|
+
if len(tail) == 1 and len(tail[0]) == 0:
|
|
315
|
+
rendered.append(key)
|
|
316
|
+
elif len(tail) == 1:
|
|
317
|
+
rendered.append(key + "." + ".".join(tail[0]))
|
|
318
|
+
else:
|
|
319
|
+
rendered.append(key + "." + compress(tail))
|
|
320
|
+
middle = "{" + ",".join(rendered) + "}" if len(rendered) > 1 else rendered[0]
|
|
321
|
+
return ".".join(prefix + ([middle] if middle != "" else []) + suffix)
|
|
322
|
+
|
|
323
|
+
return compress([name.split(".") for name in lora_target_modules])
|
|
324
|
+
|
|
325
|
+
|
|
283
326
|
def parse_lora_target_modules(self, model, lora_target_modules):
|
|
284
327
|
if lora_target_modules == "":
|
|
285
|
-
print("No LoRA target modules specified. The framework will automatically search for them.")
|
|
286
328
|
lora_target_modules = self.auto_detect_lora_target_modules(model)
|
|
287
|
-
print(f"LoRA will be patched at {lora_target_modules}.")
|
|
329
|
+
print(f"No LoRA target modules specified. LoRA will be patched at {self.format_lora_target_modules(lora_target_modules)}.")
|
|
288
330
|
else:
|
|
289
331
|
lora_target_modules = lora_target_modules.split(",")
|
|
290
332
|
return lora_target_modules
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
from .qwen_image_21_dit import QwenImage21TransformerBlock
|
|
2
|
+
from ..core.gradient import gradient_checkpoint_forward
|
|
3
|
+
import torch
|
|
4
|
+
import torch.nn as nn
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class QwenImage21ControlNetBlock(QwenImage21TransformerBlock):
|
|
8
|
+
def __init__(
|
|
9
|
+
self,
|
|
10
|
+
dim: int,
|
|
11
|
+
num_attention_heads: int,
|
|
12
|
+
attention_head_dim: int,
|
|
13
|
+
mlp_ratio: int = 3,
|
|
14
|
+
eps: float = 1e-6,
|
|
15
|
+
block_id: int = 0,
|
|
16
|
+
):
|
|
17
|
+
super().__init__(dim, num_attention_heads, attention_head_dim, mlp_ratio, eps)
|
|
18
|
+
self.block_id = block_id
|
|
19
|
+
if block_id == 0:
|
|
20
|
+
self.before_proj = nn.Linear(dim, dim)
|
|
21
|
+
self.after_proj = nn.Linear(dim, dim)
|
|
22
|
+
|
|
23
|
+
def forward(self, c, x, **kwargs):
|
|
24
|
+
if self.block_id == 0:
|
|
25
|
+
c = self.before_proj(c) + x
|
|
26
|
+
all_c = []
|
|
27
|
+
else:
|
|
28
|
+
all_c = list(torch.unbind(c))
|
|
29
|
+
c = all_c.pop(-1)
|
|
30
|
+
|
|
31
|
+
c = super().forward(c, **kwargs)
|
|
32
|
+
c_skip = self.after_proj(c)
|
|
33
|
+
all_c += [c_skip, c]
|
|
34
|
+
c = torch.stack(all_c)
|
|
35
|
+
return c
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class QwenImage21ControlNet(nn.Module):
|
|
39
|
+
_repeated_blocks = ["QwenImage21ControlNetBlock"]
|
|
40
|
+
|
|
41
|
+
def __init__(
|
|
42
|
+
self,
|
|
43
|
+
control_layers: tuple = (0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30),
|
|
44
|
+
control_in_dim: int = 129,
|
|
45
|
+
dim: int = 4096,
|
|
46
|
+
num_attention_heads: int = 32,
|
|
47
|
+
attention_head_dim: int = 128,
|
|
48
|
+
mlp_ratio: int = 3,
|
|
49
|
+
eps: float = 1e-6,
|
|
50
|
+
):
|
|
51
|
+
super().__init__()
|
|
52
|
+
self.control_layers = tuple(sorted({int(i) for i in control_layers}))
|
|
53
|
+
self.control_in_dim = control_in_dim
|
|
54
|
+
self.control_layers_mapping = {i: n for n, i in enumerate(self.control_layers)}
|
|
55
|
+
self.control_img_in = nn.Linear(control_in_dim, dim)
|
|
56
|
+
self.control_blocks = nn.ModuleList(
|
|
57
|
+
[
|
|
58
|
+
QwenImage21ControlNetBlock(dim, num_attention_heads, attention_head_dim, mlp_ratio, eps, block_id=i)
|
|
59
|
+
for i in self.control_layers
|
|
60
|
+
]
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
def forward(
|
|
64
|
+
self,
|
|
65
|
+
joint_hidden_states: torch.Tensor,
|
|
66
|
+
control_context: torch.Tensor,
|
|
67
|
+
image_positions: torch.Tensor,
|
|
68
|
+
modulation: torch.Tensor,
|
|
69
|
+
rotary_emb: torch.Tensor,
|
|
70
|
+
attention_mask,
|
|
71
|
+
target_token_mask: torch.Tensor | None,
|
|
72
|
+
segments,
|
|
73
|
+
key_valid: torch.Tensor | None,
|
|
74
|
+
control_scale: float = 1.0,
|
|
75
|
+
use_gradient_checkpointing: bool = False,
|
|
76
|
+
use_gradient_checkpointing_offload: bool = False,
|
|
77
|
+
) -> dict[int, torch.Tensor]:
|
|
78
|
+
control_features = self.control_img_in(control_context)
|
|
79
|
+
c = torch.zeros_like(joint_hidden_states)
|
|
80
|
+
c[:, image_positions] = control_features.to(joint_hidden_states.dtype)
|
|
81
|
+
kwargs = dict(
|
|
82
|
+
modulation=modulation,
|
|
83
|
+
rotary_emb=rotary_emb,
|
|
84
|
+
attention_mask=attention_mask,
|
|
85
|
+
target_token_mask=target_token_mask,
|
|
86
|
+
kv_cache=None,
|
|
87
|
+
cache_write_slice=None,
|
|
88
|
+
segments=segments,
|
|
89
|
+
key_valid=key_valid,
|
|
90
|
+
)
|
|
91
|
+
for block in self.control_blocks:
|
|
92
|
+
c = gradient_checkpoint_forward(
|
|
93
|
+
block,
|
|
94
|
+
use_gradient_checkpointing,
|
|
95
|
+
use_gradient_checkpointing_offload,
|
|
96
|
+
c,
|
|
97
|
+
joint_hidden_states,
|
|
98
|
+
**kwargs,
|
|
99
|
+
)
|
|
100
|
+
hints = torch.unbind(c)[:-1]
|
|
101
|
+
return {block_id: hints[index] * control_scale for block_id, index in self.control_layers_mapping.items()}
|