# DiffSynth-Engine
**Repository Path**: sieding/DiffSynth-Engine
## Basic Information
- **Project Name**: DiffSynth-Engine
- **Description**: 来源:https://github.com/modelscope/DiffSynth-Engine
方便访问
- **Primary Language**: Python
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-12-01
- **Last Updated**: 2025-12-01
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# DiffSynth-Engine
[](https://pypi.org/project/DiffSynth-Engine/)
[](https://github.com/modelscope/DiffSynth-Engine/blob/master/LICENSE)
[](https://github.com/modelscope/DiffSynth-Engine/issues)
[](https://GitHub.com/modelscope/DiffSynth-Engine/pull/)
[](https://GitHub.com/modelscope/DiffSynth-Engine/commit/)
DiffSynth-Engine is a high-performance engine geared towards buidling efficient inference pipelines for diffusion models.
**Key Features:**
- **Thoughtfully-Designed Implementation:** We carefully re-implemented key components in Diffusion pipelines, such as sampler and scheduler, without introducing external dependencies on libraries like k-diffusion, ldm, or sgm.
- **Extensive Model Support:** Compatible with popular formats (e.g., CivitAI) of base models and LoRA models , catering to diverse use cases.
- **Versatile Resource Management:** Comprehensive support for varous model quantization (e.g., FP8, INT8)
and offloading strategies, enabling loading of larger diffusion models (e.g., Flux.1 Dev) on limited hardware budget of GPU memory.
- **Optimized Performance:** Carefully-crafted inference pipeline to achieve fast generation across various hardware environments.
- **Cross-Platform Support:** Runnable on Windows, macOS (Apple Silicon), and Linux, ensuring a smooth experience across different operating systems.
## News
- **[v0.6.0](https://github.com/modelscope/DiffSynth-Engine/releases/tag/v0.6.0)** | **September 9, 2025**:  Supports [Wan2.2-S2V](https://modelscope.cn/models/Wan-AI/Wan2.2-S2V-14B), a video generation model designed for audio-driven cinematic video generation
- **[v0.5.0](https://github.com/modelscope/DiffSynth-Engine/releases/tag/v0.5.0)** | **August 27, 2025**:  Supports [Qwen-Image-Edit](https://modelscope.cn/models/Qwen/Qwen-Image-Edit), the image editing version of Qwen-Image, enabling semantic/appearance visual editing, and precise text editing
- **[v0.4.1](https://github.com/modelscope/DiffSynth-Engine/releases/tag/v0.4.1)** | **August 4, 2025**:  Supports [Qwen-Image](https://www.modelscope.cn/models/Qwen/Qwen-Image), an image generation model excels at complex text rendering and creating images in a wide range of artistic styles
- **[v0.4.0](https://github.com/modelscope/DiffSynth-Engine/releases/tag/v0.4.0)** | **August 1, 2025**:
-  Supports [Wan2.2](https://modelscope.cn/collections/tongyiwanxiang-22--shipinshengcheng-2bb5b1adef2840) video generation model
- ⚠️[**Breaking Change**] Improved `from_pretrained` method pipeline initialization
## Quick Start
### Requirements
- Python 3.10+
- NVIDIA GPU with compute capability 8.6+ (e.g., RTX 50 Series, RTX 40 Series, RTX 30 Series. Please see [here](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#compute-capabilities) for more details about your GPUs.) or Apple Silicon M-series.
### Installation
Install released version (from PyPI):
```shell
pip3 install diffsynth-engine
```
Install from source:
```shell
git clone https://github.com/modelscope/diffsynth-engine.git && cd diffsynth-engine
pip3 install -e .
```
### Usage
Text to image
```python
from diffsynth_engine import fetch_model, FluxImagePipeline, FluxPipelineConfig
model_path = fetch_model("muse/flux-with-vae", path="flux1-dev-with-vae.safetensors")
config = FluxPipelineConfig.basic_config(model_path=model_path, device="cuda:0")
pipe = FluxImagePipeline.from_pretrained(config)
image = pipe(prompt="a cat")
image.save("image.png")
```
Text to image with LoRA
```python
from diffsynth_engine import fetch_model, FluxImagePipeline, FluxPipelineConfig
model_path = fetch_model("muse/flux-with-vae", path="flux1-dev-with-vae.safetensors")
lora_path = fetch_model("DonRat/MAJICFLUS_SuperChinesestyleheongsam", path="麦橘超国风旗袍.safetensors")
config = FluxPipelineConfig.basic_config(model_path=model_path, device="cuda:0")
pipe = FluxImagePipeline.from_pretrained(config)
pipe.load_lora(path=lora_path, scale=1.0)
image = pipe(prompt="a girl, qipao")
image.save("image.png")
```
For more details, please refer to our tutorials ([English](./docs/tutorial.md), [中文](./docs/tutorial_zh.md)).
## Showcase
## Contact
If you have any questions or feedback, please scan the QR code below, or send email to muse@alibaba-inc.com.