diffsynth-engine 0.4.2.dev6__tar.gz → 0.4.3.dev1__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_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/PKG-INFO +1 -1
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/configs/pipeline.py +11 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/qwen_image/qwen_image_dit.py +2 -2
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/base.py +35 -4
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/qwen_image.py +33 -5
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine.egg-info/PKG-INFO +1 -1
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/docs/tutorial.md +1 -2
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/docs/tutorial_zh.md +9 -8
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/.gitignore +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/.pre-commit-config.yaml +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/LICENSE +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/MANIFEST.in +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/README.md +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/assets/dingtalk.png +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/assets/showcase.jpeg +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/base_scheduler.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/flow_match/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/flow_match/flow_beta.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/flow_match/flow_ddim.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/flow_match/recifited_flow.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/stable_diffusion/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/stable_diffusion/beta.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/stable_diffusion/ddim.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/stable_diffusion/exponential.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/stable_diffusion/karras.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/stable_diffusion/linear.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/noise_scheduler/stable_diffusion/sgm_uniform.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/flow_match/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/flow_match/flow_match_euler.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/stable_diffusion/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/stable_diffusion/brownian_tree.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/stable_diffusion/ddpm.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/stable_diffusion/deis.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/stable_diffusion/dpmpp_2m.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/stable_diffusion/dpmpp_2m_sde.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/stable_diffusion/dpmpp_3m_sde.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/stable_diffusion/epsilon.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/stable_diffusion/euler.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/sampler/stable_diffusion/euler_ancestral.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/components/vae.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/flux/flux_dit.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/flux/flux_text_encoder.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/flux/flux_vae.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/qwen_image/qwen2_5_vl_config.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/qwen_image/qwen2_5_vl_vision_config.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/qwen_image/qwen_image_vae.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/qwen_image/qwen_image_vae_keymap.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/sd/sd_text_encoder.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/sd/sd_unet.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/sd3/sd3_dit.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/sd3/sd3_text_encoder.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/sdxl/sdxl_text_encoder.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/sdxl/sdxl_unet.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/wan/dit/wan2.1-flf2v-14b.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/wan/dit/wan2.1-i2v-14b.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/wan/dit/wan2.1-t2v-1.3b.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/wan/dit/wan2.1-t2v-14b.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/wan/dit/wan2.2-i2v-a14b.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/wan/dit/wan2.2-t2v-a14b.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/wan/dit/wan2.2-ti2v-5b.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/wan/vae/wan-vae-keymap.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/wan/vae/wan2.1-vae.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/models/wan/vae/wan2.2-vae.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/flux/tokenizer_1/merges.txt +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/flux/tokenizer_1/special_tokens_map.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/flux/tokenizer_1/tokenizer_config.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/flux/tokenizer_1/vocab.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/flux/tokenizer_2/special_tokens_map.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/flux/tokenizer_2/spiece.model +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/flux/tokenizer_2/tokenizer.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/flux/tokenizer_2/tokenizer_config.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/qwen_image/tokenizer/added_tokens.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/qwen_image/tokenizer/merges.txt +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/qwen_image/tokenizer/special_tokens_map.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/qwen_image/tokenizer/tokenizer.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/qwen_image/tokenizer/tokenizer_config.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/qwen_image/tokenizer/vocab.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/sdxl/tokenizer/merges.txt +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/sdxl/tokenizer/special_tokens_map.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/sdxl/tokenizer/tokenizer_config.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/sdxl/tokenizer/vocab.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/sdxl/tokenizer_2/merges.txt +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/sdxl/tokenizer_2/special_tokens_map.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/sdxl/tokenizer_2/tokenizer_config.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/sdxl/tokenizer_2/vocab.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/wan/umt5-xxl/special_tokens_map.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/wan/umt5-xxl/spiece.model +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/wan/umt5-xxl/tokenizer.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/conf/tokenizers/wan/umt5-xxl/tokenizer_config.json +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/configs/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/configs/controlnet.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/kernels/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/base.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/basic/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/basic/attention.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/basic/lora.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/basic/relative_position_emb.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/basic/timestep.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/basic/transformer_helper.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/basic/unet_helper.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/flux_controlnet.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/flux_dit.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/flux_dit_fbcache.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/flux_ipadapter.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/flux_redux.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/flux_text_encoder.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/flux_vae.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/qwen_image/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/qwen_image/qwen2_5_vl.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/qwen_image/qwen_image_dit_fbcache.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/qwen_image/qwen_image_vae.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd/sd_controlnet.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd/sd_text_encoder.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd/sd_unet.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd/sd_vae.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd3/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd3/sd3_dit.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd3/sd3_text_encoder.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd3/sd3_vae.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sdxl/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sdxl/sdxl_controlnet.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sdxl/sdxl_text_encoder.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sdxl/sdxl_unet.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sdxl/sdxl_vae.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/text_encoder/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/text_encoder/clip.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/text_encoder/siglip.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/text_encoder/t5.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/utils.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/vae/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/vae/vae.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/wan/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/wan/wan_dit.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/wan/wan_image_encoder.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/wan/wan_text_encoder.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/wan/wan_vae.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/flux_image.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/sd_image.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/sdxl_image.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/utils.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/wan_video.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/processor/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/processor/canny_processor.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/processor/depth_processor.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/base.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/clip.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/qwen2.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/t5.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/wan.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tools/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tools/flux_inpainting_tool.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tools/flux_outpainting_tool.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tools/flux_reference_tool.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tools/flux_replace_tool.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/__init__.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/cache.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/constants.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/download.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/env.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/flag.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/fp8_linear.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/gguf.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/image.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/loader.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/lock.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/logging.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/offload.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/onnx.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/parallel.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/platform.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/prompt.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/video.py +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine.egg-info/SOURCES.txt +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine.egg-info/dependency_links.txt +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine.egg-info/requires.txt +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine.egg-info/top_level.txt +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/pyproject.toml +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/setup.cfg +0 -0
- {diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/setup.py +0 -0
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/configs/pipeline.py
RENAMED
|
@@ -16,6 +16,7 @@ class BaseConfig:
|
|
|
16
16
|
vae_tile_stride: int | Tuple[int, int] = 256
|
|
17
17
|
device: str = "cuda"
|
|
18
18
|
offload_mode: Optional[str] = None
|
|
19
|
+
offload_to_disk: bool = False
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
@dataclass
|
|
@@ -62,11 +63,13 @@ class SDPipelineConfig(BaseConfig):
|
|
|
62
63
|
model_path: str | os.PathLike | List[str | os.PathLike],
|
|
63
64
|
device: str = "cuda",
|
|
64
65
|
offload_mode: Optional[str] = None,
|
|
66
|
+
offload_to_disk: bool = False,
|
|
65
67
|
) -> "SDPipelineConfig":
|
|
66
68
|
return cls(
|
|
67
69
|
model_path=model_path,
|
|
68
70
|
device=device,
|
|
69
71
|
offload_mode=offload_mode,
|
|
72
|
+
offload_to_disk=offload_to_disk,
|
|
70
73
|
)
|
|
71
74
|
|
|
72
75
|
|
|
@@ -87,11 +90,13 @@ class SDXLPipelineConfig(BaseConfig):
|
|
|
87
90
|
model_path: str | os.PathLike | List[str | os.PathLike],
|
|
88
91
|
device: str = "cuda",
|
|
89
92
|
offload_mode: Optional[str] = None,
|
|
93
|
+
offload_to_disk: bool = False,
|
|
90
94
|
) -> "SDXLPipelineConfig":
|
|
91
95
|
return cls(
|
|
92
96
|
model_path=model_path,
|
|
93
97
|
device=device,
|
|
94
98
|
offload_mode=offload_mode,
|
|
99
|
+
offload_to_disk=offload_to_disk,
|
|
95
100
|
)
|
|
96
101
|
|
|
97
102
|
|
|
@@ -116,6 +121,7 @@ class FluxPipelineConfig(AttentionConfig, OptimizationConfig, ParallelConfig, Ba
|
|
|
116
121
|
device: str = "cuda",
|
|
117
122
|
parallelism: int = 1,
|
|
118
123
|
offload_mode: Optional[str] = None,
|
|
124
|
+
offload_to_disk: bool = False,
|
|
119
125
|
) -> "FluxPipelineConfig":
|
|
120
126
|
return cls(
|
|
121
127
|
model_path=model_path,
|
|
@@ -123,6 +129,7 @@ class FluxPipelineConfig(AttentionConfig, OptimizationConfig, ParallelConfig, Ba
|
|
|
123
129
|
parallelism=parallelism,
|
|
124
130
|
use_fsdp=True,
|
|
125
131
|
offload_mode=offload_mode,
|
|
132
|
+
offload_to_disk=offload_to_disk,
|
|
126
133
|
)
|
|
127
134
|
|
|
128
135
|
def __post_init__(self):
|
|
@@ -160,6 +167,7 @@ class WanPipelineConfig(AttentionConfig, OptimizationConfig, ParallelConfig, Bas
|
|
|
160
167
|
device: str = "cuda",
|
|
161
168
|
parallelism: int = 1,
|
|
162
169
|
offload_mode: Optional[str] = None,
|
|
170
|
+
offload_to_disk: bool = False,
|
|
163
171
|
) -> "WanPipelineConfig":
|
|
164
172
|
return cls(
|
|
165
173
|
model_path=model_path,
|
|
@@ -169,6 +177,7 @@ class WanPipelineConfig(AttentionConfig, OptimizationConfig, ParallelConfig, Bas
|
|
|
169
177
|
use_cfg_parallel=True,
|
|
170
178
|
use_fsdp=True,
|
|
171
179
|
offload_mode=offload_mode,
|
|
180
|
+
offload_to_disk=offload_to_disk,
|
|
172
181
|
)
|
|
173
182
|
|
|
174
183
|
def __post_init__(self):
|
|
@@ -196,6 +205,7 @@ class QwenImagePipelineConfig(AttentionConfig, OptimizationConfig, ParallelConfi
|
|
|
196
205
|
device: str = "cuda",
|
|
197
206
|
parallelism: int = 1,
|
|
198
207
|
offload_mode: Optional[str] = None,
|
|
208
|
+
offload_to_disk: bool = False,
|
|
199
209
|
) -> "QwenImagePipelineConfig":
|
|
200
210
|
return cls(
|
|
201
211
|
model_path=model_path,
|
|
@@ -206,6 +216,7 @@ class QwenImagePipelineConfig(AttentionConfig, OptimizationConfig, ParallelConfi
|
|
|
206
216
|
use_cfg_parallel=True,
|
|
207
217
|
use_fsdp=True,
|
|
208
218
|
offload_mode=offload_mode,
|
|
219
|
+
offload_to_disk=offload_to_disk,
|
|
209
220
|
)
|
|
210
221
|
|
|
211
222
|
def __post_init__(self):
|
|
@@ -48,8 +48,8 @@ class QwenEmbedRope(nn.Module):
|
|
|
48
48
|
super().__init__()
|
|
49
49
|
self.theta = theta
|
|
50
50
|
self.axes_dim = axes_dim
|
|
51
|
-
pos_index = torch.arange(
|
|
52
|
-
neg_index = torch.arange(
|
|
51
|
+
pos_index = torch.arange(10000)
|
|
52
|
+
neg_index = torch.arange(10000).flip(0) * -1 - 1
|
|
53
53
|
self.pos_freqs = torch.cat(
|
|
54
54
|
[
|
|
55
55
|
self.rope_params(pos_index, self.axes_dim[0], self.theta),
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/base.py
RENAMED
|
@@ -41,6 +41,7 @@ class BasePipeline:
|
|
|
41
41
|
self.offload_mode = None
|
|
42
42
|
self.model_names = []
|
|
43
43
|
self._offload_param_dict = {}
|
|
44
|
+
self.offload_to_disk = False
|
|
44
45
|
|
|
45
46
|
@classmethod
|
|
46
47
|
def from_pretrained(cls, model_path_or_config: str | BaseConfig) -> "BasePipeline":
|
|
@@ -228,19 +229,23 @@ class BasePipeline:
|
|
|
228
229
|
model.eval()
|
|
229
230
|
return self
|
|
230
231
|
|
|
231
|
-
def enable_cpu_offload(self, offload_mode: str):
|
|
232
|
-
valid_offload_mode = ("cpu_offload", "sequential_cpu_offload")
|
|
232
|
+
def enable_cpu_offload(self, offload_mode: str | None, offload_to_disk:bool = False):
|
|
233
|
+
valid_offload_mode = ("cpu_offload", "sequential_cpu_offload", "disable", None)
|
|
233
234
|
if offload_mode not in valid_offload_mode:
|
|
234
235
|
raise ValueError(f"offload_mode must be one of {valid_offload_mode}, but got {offload_mode}")
|
|
235
236
|
if self.device == "cpu" or self.device == "mps":
|
|
236
237
|
logger.warning("must set an non cpu device for pipeline before calling enable_cpu_offload")
|
|
237
238
|
return
|
|
238
|
-
if offload_mode == "
|
|
239
|
+
if offload_mode is None or offload_mode == "disable":
|
|
240
|
+
self._disable_offload()
|
|
241
|
+
elif offload_mode == "cpu_offload":
|
|
239
242
|
self._enable_model_cpu_offload()
|
|
240
243
|
elif offload_mode == "sequential_cpu_offload":
|
|
241
244
|
self._enable_sequential_cpu_offload()
|
|
245
|
+
self.offload_to_disk = offload_to_disk
|
|
242
246
|
|
|
243
|
-
|
|
247
|
+
|
|
248
|
+
def _enable_model_cpu_offload(self):
|
|
244
249
|
for model_name in self.model_names:
|
|
245
250
|
model = getattr(self, model_name)
|
|
246
251
|
if model is not None:
|
|
@@ -253,6 +258,15 @@ class BasePipeline:
|
|
|
253
258
|
if model is not None:
|
|
254
259
|
enable_sequential_cpu_offload(model, self.device)
|
|
255
260
|
self.offload_mode = "sequential_cpu_offload"
|
|
261
|
+
|
|
262
|
+
def _disable_offload(self):
|
|
263
|
+
self.offload_mode = None
|
|
264
|
+
self._offload_param_dict = {}
|
|
265
|
+
for model_name in self.model_names:
|
|
266
|
+
model = getattr(self, model_name)
|
|
267
|
+
if model is not None:
|
|
268
|
+
model.to(self.device)
|
|
269
|
+
|
|
256
270
|
|
|
257
271
|
def enable_fp8_autocast(
|
|
258
272
|
self, model_names: List[str], compute_dtype: torch.dtype = torch.bfloat16, use_fp8_linear: bool = False
|
|
@@ -260,6 +274,7 @@ class BasePipeline:
|
|
|
260
274
|
for model_name in model_names:
|
|
261
275
|
model = getattr(self, model_name)
|
|
262
276
|
if model is not None:
|
|
277
|
+
model.to(device=self.device, dtype=torch.float8_e4m3fn)
|
|
263
278
|
enable_fp8_autocast(model, compute_dtype, use_fp8_linear)
|
|
264
279
|
self.fp8_autocast_enabled = True
|
|
265
280
|
|
|
@@ -282,10 +297,26 @@ class BasePipeline:
|
|
|
282
297
|
# load the needed models to device
|
|
283
298
|
for model_name in load_model_names:
|
|
284
299
|
model = getattr(self, model_name)
|
|
300
|
+
if model is None:
|
|
301
|
+
raise ValueError(f"model {model_name} is not loaded, maybe this model has been destroyed by model_lifecycle_finish function with offload_to_disk=True")
|
|
285
302
|
if model is not None and (p := next(model.parameters(), None)) is not None and p.device.type != self.device:
|
|
286
303
|
model.to(self.device)
|
|
287
304
|
# fresh the cuda cache
|
|
288
305
|
empty_cache()
|
|
289
306
|
|
|
307
|
+
def model_lifecycle_finish(self, model_names: List[str] | None = None):
|
|
308
|
+
if not self.offload_to_disk or self.offload_mode is None:
|
|
309
|
+
return
|
|
310
|
+
for model_name in model_names:
|
|
311
|
+
model = getattr(self, model_name)
|
|
312
|
+
del model
|
|
313
|
+
if model_name in self._offload_param_dict:
|
|
314
|
+
del self._offload_param_dict[model_name]
|
|
315
|
+
setattr(self, model_name, None)
|
|
316
|
+
print(f"model {model_name} has been deleted from memory")
|
|
317
|
+
logger.info(f"model {model_name} has been deleted from memory")
|
|
318
|
+
empty_cache()
|
|
319
|
+
|
|
320
|
+
|
|
290
321
|
def compile(self):
|
|
291
322
|
raise NotImplementedError(f"{self.__class__.__name__} does not support compile")
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/qwen_image.py
RENAMED
|
@@ -41,19 +41,32 @@ class QwenImageLoRAConverter(LoRAStateDictConverter):
|
|
|
41
41
|
dit_dict = {}
|
|
42
42
|
for key, param in lora_state_dict.items():
|
|
43
43
|
origin_key = key
|
|
44
|
-
|
|
44
|
+
lora_a_suffix = None
|
|
45
|
+
if "lora_A.default.weight" in key:
|
|
46
|
+
lora_a_suffix = "lora_A.default.weight"
|
|
47
|
+
elif "lora_A.weight" in key:
|
|
48
|
+
lora_a_suffix = "lora_A.weight"
|
|
49
|
+
|
|
50
|
+
if lora_a_suffix is None:
|
|
45
51
|
continue
|
|
52
|
+
|
|
46
53
|
lora_args = {}
|
|
47
54
|
lora_args["down"] = param
|
|
48
|
-
|
|
55
|
+
|
|
56
|
+
lora_b_suffix = lora_a_suffix.replace("lora_A", "lora_B")
|
|
57
|
+
lora_args["up"] = lora_state_dict[origin_key.replace(lora_a_suffix, lora_b_suffix)]
|
|
58
|
+
|
|
49
59
|
lora_args["rank"] = lora_args["up"].shape[1]
|
|
50
|
-
alpha_key = origin_key.replace("
|
|
60
|
+
alpha_key = origin_key.replace("lora_up", "lora_A").replace(lora_a_suffix, "alpha")
|
|
61
|
+
|
|
51
62
|
if alpha_key in lora_state_dict:
|
|
52
63
|
alpha = lora_state_dict[alpha_key]
|
|
53
64
|
else:
|
|
54
65
|
alpha = lora_args["rank"]
|
|
55
66
|
lora_args["alpha"] = alpha
|
|
56
|
-
|
|
67
|
+
|
|
68
|
+
key = key.replace(f".{lora_a_suffix}", "")
|
|
69
|
+
|
|
57
70
|
if key.startswith("transformer") and "attn.to_out.0" in key:
|
|
58
71
|
key = key.replace("attn.to_out.0", "attn.to_out")
|
|
59
72
|
dit_dict[key] = lora_args
|
|
@@ -195,7 +208,19 @@ class QwenImagePipeline(BasePipeline):
|
|
|
195
208
|
pipe.eval()
|
|
196
209
|
|
|
197
210
|
if config.offload_mode is not None:
|
|
198
|
-
pipe.enable_cpu_offload(config.offload_mode)
|
|
211
|
+
pipe.enable_cpu_offload(config.offload_mode, config.offload_to_disk)
|
|
212
|
+
|
|
213
|
+
if config.model_dtype == torch.float8_e4m3fn:
|
|
214
|
+
pipe.dtype = torch.bfloat16 # compute dtype
|
|
215
|
+
pipe.enable_fp8_autocast(
|
|
216
|
+
model_names=["dit"], compute_dtype=pipe.dtype, use_fp8_linear=config.use_fp8_linear
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
if config.encoder_dtype == torch.float8_e4m3fn:
|
|
220
|
+
pipe.dtype = torch.bfloat16 # compute dtype
|
|
221
|
+
pipe.enable_fp8_autocast(
|
|
222
|
+
model_names=["encoder"], compute_dtype=pipe.dtype, use_fp8_linear=config.use_fp8_linear
|
|
223
|
+
)
|
|
199
224
|
|
|
200
225
|
if config.parallelism > 1:
|
|
201
226
|
pipe = ParallelWrapper(
|
|
@@ -380,6 +405,7 @@ class QwenImagePipeline(BasePipeline):
|
|
|
380
405
|
negative_prompt_embeds, negative_prompt_embeds_mask = self.encode_prompt(negative_prompt, 1, 4096)
|
|
381
406
|
else:
|
|
382
407
|
negative_prompt_embeds, negative_prompt_embeds_mask = None, None
|
|
408
|
+
self.model_lifecycle_finish(["encoder"])
|
|
383
409
|
|
|
384
410
|
hide_progress = dist.is_initialized() and dist.get_rank() != 0
|
|
385
411
|
for i, timestep in enumerate(tqdm(timesteps, disable=hide_progress)):
|
|
@@ -399,6 +425,7 @@ class QwenImagePipeline(BasePipeline):
|
|
|
399
425
|
# UI
|
|
400
426
|
if progress_callback is not None:
|
|
401
427
|
progress_callback(i, len(timesteps), "DENOISING")
|
|
428
|
+
self.model_lifecycle_finish(["dit"])
|
|
402
429
|
# Decode image
|
|
403
430
|
self.load_models_to_device(["vae"])
|
|
404
431
|
latents = rearrange(latents, "B C H W -> B C 1 H W")
|
|
@@ -410,5 +437,6 @@ class QwenImagePipeline(BasePipeline):
|
|
|
410
437
|
)
|
|
411
438
|
image = self.vae_output_to_image(vae_output)
|
|
412
439
|
# Offload all models
|
|
440
|
+
self.model_lifecycle_finish(["vae"])
|
|
413
441
|
self.load_models_to_device([])
|
|
414
442
|
return image
|
|
@@ -88,7 +88,6 @@ We will continuously update DiffSynth-Engine to support more models. (Wan2.2 LoR
|
|
|
88
88
|
|
|
89
89
|
After the model is downloaded, load the model with the corresponding pipeline and perform inference.
|
|
90
90
|
|
|
91
|
-
|
|
92
91
|
### Image Generation(Qwen-Image)
|
|
93
92
|
|
|
94
93
|
The following code calls `QwenImagePipeline` to load the [Qwen-Image](https://www.modelscope.cn/models/Qwen/Qwen-Image) model and generate an image. Recommended resolutions are 928×1664, 1104×1472, 1328×1328, 1472×1104, and 1664×928, with a suggested cfg_scale of 4. If no negative_prompt is provided, it defaults to a single space character (not an empty string). For multi-GPU parallelism, currently only cfg parallelism is supported (parallelism=2), with other optimization efforts underway.
|
|
@@ -122,7 +121,7 @@ image.save("image.png")
|
|
|
122
121
|
|
|
123
122
|
Please note that if some necessary modules, like text encoders, are missing from a model repository, the pipeline will automatically download the required files.
|
|
124
123
|
|
|
125
|
-
|
|
124
|
+
### Detailed Parameters(Qwen-Image)
|
|
126
125
|
|
|
127
126
|
In the image generation pipeline `pipe`, we can use the following parameters for fine-grained control:
|
|
128
127
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## 安装
|
|
4
4
|
|
|
5
|
-
在使用 DiffSynth-Engine
|
|
5
|
+
在使用 DiffSynth-Engine 前,请先确保您的硬件设备满足以下要求:
|
|
6
6
|
|
|
7
7
|
* NVIDIA GPU CUDA 计算能力 8.6+(例如 RTX 50 Series、RTX 40 Series、RTX 30 Series 等,详见 [NVidia 文档](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#compute-capabilities))或 Apple Silicon M 系列芯片
|
|
8
8
|
|
|
9
|
-
以及 Python
|
|
9
|
+
以及 Python 环境需求: Python 3.10+。
|
|
10
10
|
|
|
11
|
-
使用 `pip3` 工具从 PyPI 安装 DiffSynth-Engine
|
|
11
|
+
使用 `pip3` 工具从 PyPI 安装 DiffSynth-Engine:
|
|
12
12
|
|
|
13
13
|
```shell
|
|
14
14
|
pip3 install diffsynth-engine
|
|
@@ -64,7 +64,7 @@ model_path = fetch_model("Wan-AI/Wan2.1-T2V-14B", path="diffusion_pytorch_model*
|
|
|
64
64
|
|
|
65
65
|
## 模型类型
|
|
66
66
|
|
|
67
|
-
Diffusion
|
|
67
|
+
Diffusion 模型包含多种多样的模型结构,每种模型由对应的流水线进行加载和推理,目前我们支持的模型类型包括:
|
|
68
68
|
|
|
69
69
|
| 模型结构 | 样例 | 流水线 |
|
|
70
70
|
| --------------- | ------------------------------------------------------------ | ------------------- |
|
|
@@ -123,16 +123,17 @@ image.save("image.png")
|
|
|
123
123
|
|
|
124
124
|
#### 详细参数(Qwen-Image)
|
|
125
125
|
|
|
126
|
-
在图像生成流水线 `pipe`
|
|
126
|
+
在图像生成流水线 `pipe` 中,我们可以通过以下参数进行精细的控制:
|
|
127
127
|
|
|
128
128
|
* `prompt`: 提示词,用于描述生成图像的内容,支持多种语言(中文/英文/日文等),例如“一只猫”/"a cat"/"庭を走る猫"。
|
|
129
129
|
* `negative_prompt`: 负面提示词,用于描述不希望图像中出现的内容,例如“ugly”,默认为一个空格而不是空字符串, " "。
|
|
130
|
-
* `cfg_scale`:
|
|
130
|
+
* `cfg_scale`:[Classifier-free guidance](https://arxiv.org/abs/2207.12598) 的引导系数,通常更大的引导系数可以达到更强的文图相关性,但会降低生成内容的多样性,推荐值为4。
|
|
131
131
|
* `height`: 图像高度。
|
|
132
132
|
* `width`: 图像宽度。
|
|
133
133
|
* `num_inference_steps`: 推理步数,通常推理步数越多,计算时间越长,图像质量越高。
|
|
134
134
|
* `seed`: 随机种子,固定的随机种子可以使生成的内容固定。
|
|
135
135
|
|
|
136
|
+
|
|
136
137
|
### 图像生成
|
|
137
138
|
|
|
138
139
|
以下代码可以调用 `FluxImagePipeline` 加载[麦橘超然](https://www.modelscope.cn/models/MAILAND/majicflus_v1/summary?version=v1.0)模型生成一张图。如果要加载其他结构的模型,请将代码中的 `FluxImagePipeline` 和 `FluxPipelineConfig` 替换成对应的流水线模块及配置。
|
|
@@ -152,7 +153,7 @@ image.save("image.png")
|
|
|
152
153
|
|
|
153
154
|
#### 详细参数
|
|
154
155
|
|
|
155
|
-
在图像生成流水线 `pipe`
|
|
156
|
+
在图像生成流水线 `pipe` 中,我们可以通过以下参数进行精细的控制:
|
|
156
157
|
|
|
157
158
|
* `prompt`: 提示词,用于描述生成图像的内容,例如“a cat”。
|
|
158
159
|
* `negative_prompt`: 负面提示词,用于描述不希望图像中出现的内容,例如“ugly”。
|
|
@@ -217,7 +218,7 @@ save_video(video, "video.mp4")
|
|
|
217
218
|
|
|
218
219
|
#### 详细参数
|
|
219
220
|
|
|
220
|
-
在视频生成流水线 `pipe`
|
|
221
|
+
在视频生成流水线 `pipe` 中,我们可以通过以下参数进行精细的控制:
|
|
221
222
|
|
|
222
223
|
* `prompt`: 提示词,用于描述生成图像的内容,例如“a cat”。
|
|
223
224
|
* `negative_prompt`: 负面提示词,用于描述不希望图像中出现的内容,例如“ugly”。
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/algorithm/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/configs/__init__.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/configs/controlnet.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/kernels/__init__.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/basic/lora.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/flux_dit.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/flux/flux_vae.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd/sd_unet.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd/sd_vae.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd3/__init__.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd3/sd3_dit.py
RENAMED
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sd3/sd3_vae.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sdxl/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/sdxl/sdxl_vae.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/utils.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/vae/__init__.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/vae/vae.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/wan/__init__.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/wan/wan_dit.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/models/wan/wan_vae.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/__init__.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/flux_image.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/sd_image.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/sdxl_image.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/utils.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/pipelines/wan_video.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/processor/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/__init__.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/base.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/clip.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/qwen2.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/t5.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tokenizers/wan.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/tools/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/constants.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/download.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/fp8_linear.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/loader.py
RENAMED
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/logging.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/offload.py
RENAMED
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/parallel.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/platform.py
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine/utils/prompt.py
RENAMED
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine.egg-info/requires.txt
RENAMED
|
File without changes
|
{diffsynth_engine-0.4.2.dev6 → diffsynth_engine-0.4.3.dev1}/diffsynth_engine.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|