# diffsynth-studio - Doramagic AI Context Pack

> 定位：安装前体验与判断资产。它帮助宿主 AI 有一个好的开始，但不代表已经安装、执行或验证目标项目。

## 充分原则

- **充分原则，不是压缩原则**：AI Context Pack 应该充分到让宿主 AI 在开工前理解项目价值、能力边界、使用入口、风险和证据来源；它可以分层组织，但不以最短摘要为目标。
- **压缩策略**：只压缩噪声和重复内容，不压缩会影响判断和开工质量的上下文。

## 给宿主 AI 的使用方式

你正在读取 Doramagic 为 diffsynth-studio 编译的 AI Context Pack。请把它当作开工前上下文：帮助用户理解适合谁、能做什么、如何开始、哪些必须安装后验证、风险在哪里。不要声称你已经安装、运行或执行了目标项目。

## Claim 消费规则

- **事实来源**：Repo Evidence + Claim/Evidence Graph；Human Wiki 只提供显著性、术语和叙事结构。
- **事实最低状态**：`supported`
- `supported`：可以作为项目事实使用，但回答中必须引用 claim_id 和证据路径。
- `weak`：只能作为低置信度线索，必须要求用户继续核实。
- `inferred`：只能用于风险提示或待确认问题，不能包装成项目事实。
- `unverified`：不得作为事实使用，应明确说证据不足。
- `contradicted`：必须展示冲突来源，不得替用户强行选择一个版本。

## 它最适合谁

- **AI 研究者或研究型 Agent 构建者**：README 明确围绕研究、实验或论文工作流展开。 证据：`README.md` Claim：`clm_0002` supported 0.86

## 它能做什么

- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`README.md` Claim：`clm_0001` supported 0.86

## 怎么开始

- `git clone https://github.com/modelscope/DiffSynth-Studio.git` 证据：`README.md` Claim：`clm_0003` supported 0.86
- `pip install -e .` 证据：`README.md` Claim：`clm_0004` supported 0.86

## 继续前判断卡

- **当前建议**：先做角色匹配试用
- **为什么**：这个项目更像角色库，核心风险是选错角色或把角色文案当执行能力；先用 Prompt Preview 试角色匹配，再决定是否沙盒导入。

### 30 秒判断

- **现在怎么做**：先做角色匹配试用
- **最小安全下一步**：先用 Prompt Preview 试角色匹配；满意后再隔离导入
- **先别相信**：角色质量和任务匹配不能直接相信。
- **继续会触碰**：角色选择偏差、命令执行、本地环境或项目文件

### 现在可以相信

- **适合人群线索：AI 研究者或研究型 Agent 构建者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86
- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md` Claim：`clm_0001` supported 0.86
- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0003` supported 0.86

### 现在还不能相信

- **角色质量和任务匹配不能直接相信。**（unverified）：角色库证明有很多角色，不证明每个角色都适合你的具体任务，也不证明角色能产生高质量结果。
- **不能把角色文案当成真实执行能力。**（unverified）：安装前只能判断角色描述和任务画像是否匹配，不能证明它能在宿主 AI 里完成任务。
- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。
- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。
- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。
- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。
- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。
- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。

### 继续会触碰什么

- **角色选择偏差**：用户对任务应该由哪个专家角色处理的判断。 原因：选错角色会让 AI 从错误专业视角回答，浪费时间或误导决策。
- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`README.md`
- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。

### 最小安全下一步

- **先跑 Prompt Preview**：先用交互式试用验证任务画像和角色匹配，不要先导入整套角色库。（适用：任何项目都适用，尤其是输出质量未知时。）
- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）
- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）

### 退出方式

- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。
- **保留原始角色选择记录**：如果输出偏题，可以回到任务画像阶段重新选择角色，而不是继续沿着错误角色推进。
- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。
- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。

## 哪些只能预览

- 解释项目适合谁和能做什么
- 基于项目文档演示典型对话流程
- 帮助用户判断是否值得安装或继续研究

## 哪些必须安装后验证

- 真实安装 Skill、插件或 CLI
- 执行脚本、修改本地文件或访问外部服务
- 验证真实输出质量、性能和兼容性

## 边界与风险判断卡

- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0005` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0006` supported 0.86
- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。
- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。
- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。

## 开工前工作上下文

### 加载顺序

- 先读取 how_to_use.host_ai_instruction，建立安装前判断资产的边界。
- 读取 claim_graph_summary，确认事实来自 Claim/Evidence Graph，而不是 Human Wiki 叙事。
- 再读取 intended_users、capabilities 和 quick_start_candidates，判断用户是否匹配。
- 需要执行具体任务时，优先查 role_skill_index，再查 evidence_index。
- 遇到真实安装、文件修改、网络访问、性能或兼容性问题时，转入 risk_card 和 boundaries.runtime_required。

### 任务路由

- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`README.md` Claim：`clm_0001` supported 0.86

### 上下文规模

- 文件总数：1192
- 重要文件覆盖：40/1192
- 证据索引条目：80
- 角色 / Skill 条目：79

### 证据不足时的处理

- **missing_evidence**：说明证据不足，要求用户提供目标文件、README 段落或安装后验证记录；不要补全事实。
- **out_of_scope_request**：说明该任务超出当前 AI Context Pack 证据范围，并建议用户先查看 Human Manual 或真实安装后验证。
- **runtime_request**：给出安装前检查清单和命令来源，但不要替用户执行命令或声称已执行。
- **source_conflict**：同时展示冲突来源，标记为待核实，不要强行选择一个版本。

## Prompt Recipes

### 适配判断

- 目标：判断这个项目是否适合用户当前任务。
- 预期输出：适配结论、关键理由、证据引用、安装前可预览内容、必须安装后验证内容、下一步建议。

```text
请基于 diffsynth-studio 的 AI Context Pack，先问我 3 个必要问题，然后判断它是否适合我的任务。回答必须包含：适合谁、能做什么、不能做什么、是否值得安装、证据来自哪里。所有项目事实必须引用 evidence_refs、source_paths 或 claim_id。
```

### 安装前体验

- 目标：让用户在安装前感受核心工作流，同时避免把预览包装成真实能力或营销承诺。
- 预期输出：一段带边界标签的体验剧本、安装后验证清单和谨慎建议；不含真实运行承诺或强营销表述。

```text
请把 diffsynth-studio 当作安装前体验资产，而不是已安装工具或真实运行环境。

请严格输出四段：
1. 先问我 3 个必要问题。
2. 给出一段“体验剧本”：用 [安装前可预览]、[必须安装后验证]、[证据不足] 三种标签展示它可能如何引导工作流。
3. 给出安装后验证清单：列出哪些能力只有真实安装、真实宿主加载、真实项目运行后才能确认。
4. 给出谨慎建议：只能说“值得继续研究/试装”“先补充信息后再判断”或“不建议继续”，不得替项目背书。

硬性边界：
- 不要声称已经安装、运行、执行测试、修改文件或产生真实结果。
- 不要写“自动适配”“确保通过”“完美适配”“强烈建议安装”等承诺性表达。
- 如果描述安装后的工作方式，必须使用“如果安装成功且宿主正确加载 Skill，它可能会……”这种条件句。
- 体验剧本只能写成“示例台词/假设流程”：使用“可能会询问/可能会建议/可能会展示”，不要写“已写入、已生成、已通过、正在运行、正在生成”。
- Prompt Preview 不负责给安装命令；如用户准备试装，只能提示先阅读 Quick Start 和 Risk Card，并在隔离环境验证。
- 所有项目事实必须来自 supported claim、evidence_refs 或 source_paths；inferred/unverified 只能作风险或待确认项。

```

### 角色 / Skill 选择

- 目标：从项目里的角色或 Skill 中挑选最匹配的资产。
- 预期输出：候选角色或 Skill 列表，每项包含适用场景、证据路径、风险边界和是否需要安装后验证。

```text
请读取 role_skill_index，根据我的目标任务推荐 3-5 个最相关的角色或 Skill。每个推荐都要说明适用场景、可能输出、风险边界和 evidence_refs。
```

### 风险预检

- 目标：安装或引入前识别环境、权限、规则冲突和质量风险。
- 预期输出：环境、权限、依赖、许可、宿主冲突、质量风险和未知项的检查清单。

```text
请基于 risk_card、boundaries 和 quick_start_candidates，给我一份安装前风险预检清单。不要替我执行命令，只说明我应该检查什么、为什么检查、失败会有什么影响。
```

### 宿主 AI 开工指令

- 目标：把项目上下文转成一次对话开始前的宿主 AI 指令。
- 预期输出：一段边界明确、证据引用明确、适合复制给宿主 AI 的开工前指令。

```text
请基于 diffsynth-studio 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。
```

## 角色 / Skill 索引

- 共索引 79 个角色 / Skill / 项目文档条目。

- **DiffSynth-Studio Documentation**（project_doc）：Welcome to the magical world of Diffusion models! DiffSynth-Studio is an open-source Diffusion model engine developed and maintained by the ModelScope Community https://www.modelscope.cn/ . We aim to build a universal Diffusion model framework that fosters technological innovation through framework construction, aggregates the power of the open-source community, and explores the boundaries of generative model techno… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/README.md`
- **DiffSynth-Studio 文档**（project_doc）：欢迎来到 Diffusion 模型的魔法世界！ DiffSynth-Studio 是由 魔搭社区 https://www.modelscope.cn/ 团队开发和维护的开源 Diffusion 模型引擎。我们期望构建一个通用的 Diffusion 模型框架，以框架建设孵化技术创新，凝聚开源社区的力量，探索生成式模型技术的边界！ 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/README.md`
- **DiffSynth-Studio**（project_doc）：! PyPI https://img.shields.io/pypi/v/DiffSynth https://pypi.org/project/DiffSynth/ ! license https://img.shields.io/github/license/modelscope/DiffSynth-Studio.svg https://github.com/modelscope/DiffSynth-Studio/blob/master/LICENSE ! open issues https://isitmaintained.com/badge/open/modelscope/DiffSynth-Studio.svg https://github.com/modelscope/DiffSynth-Studio/issues ! GitHub pull-requests https://img.shields.io/githu… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Readme**（project_doc）：Please see docs/en/Research Tutorial/inference time scaling.md or docs/zh/Research Tutorial/inference time scaling.md for more details. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`diffsynth/utils/ses/README.md`
- **Readme**（project_doc）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/Anima.html 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/anima/README.md`
- **Readme**（project_doc）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/FLUX.html 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/flux/README.md`
- **Readme**（project_doc）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/FLUX2.html 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/flux2/README.md`
- **Readme**（project_doc）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/LTX-2.html 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/ltx2/README.md`
- **Readme**（project_doc）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/Wan.html 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/mova/README.md`
- **Readme**（project_doc）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/Qwen-Image.html 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/qwen_image/README.md`
- **Readme**（project_doc）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/Wan.html 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/wanvideo/README.md`
- **Readme**（project_doc）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/Z-Image.html 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/z_image/README.md`
- **diffsynth.core.attention : Attention Mechanism Implementation**（project_doc）：diffsynth.core.attention : Attention Mechanism Implementation 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/API_Reference/core/attention.md`
- **diffsynth.core.data : Data Processing Operators and Universal Dataset**（project_doc）：diffsynth.core.data : Data Processing Operators and Universal Dataset 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/API_Reference/core/data.md`
- **diffsynth.core.gradient : Gradient Checkpointing and Offload**（project_doc）：diffsynth.core.gradient : Gradient Checkpointing and Offload 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/API_Reference/core/gradient.md`
- **diffsynth.core.loader : Model Download and Loading**（project_doc）：diffsynth.core.loader : Model Download and Loading 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/API_Reference/core/loader.md`
- **diffsynth.core.vram : VRAM Management**（project_doc）：diffsynth.core.vram : VRAM Management 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/API_Reference/core/vram.md`
- **Building a Pipeline**（project_doc）：After integrating the required models for the Pipeline ../Developer Guide/Integrating Your Model.md , you also need to build a Pipeline for model inference. This document provides a standardized process for building a Pipeline . Developers can also refer to existing Pipeline implementations for construction. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Developer_Guide/Building_a_Pipeline.md`
- **Fine-Grained VRAM Management Scheme**（project_doc）：Fine-Grained VRAM Management Scheme 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Developer_Guide/Enabling_VRAM_management.md`
- **Integrating Model Architecture**（project_doc）：This document introduces how to integrate models into the DiffSynth-Studio framework for use by modules such as Pipeline . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Developer_Guide/Integrating_Your_Model.md`
- **Integrating Model Training**（project_doc）：After integrating models ../Developer Guide/Integrating Your Model.md and implementing Pipeline ../Developer Guide/Building a Pipeline.md , the next step is to integrate model training functionality. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Developer_Guide/Training_Diffusion_Models.md`
- **Diffusion Templates**（project_doc）：Diffusion Templates is a controllable generation plugin framework for Diffusion models in DiffSynth-Studio, providing additional controllable generation capabilities for base models. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Diffusion_Templates/Introducing_Diffusion_Templates.md`
- **Template Model Inference**（project_doc）：Enabling Template Models on Base Model Pipelines 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Diffusion_Templates/Template_Model_Inference.md`
- **Template Model Training**（project_doc）：DiffSynth-Studio currently provides comprehensive Template training support for black-forest-labs/FLUX.2-klein-base-4B https://www.modelscope.cn/models/black-forest-labs/FLUX.2-klein-base-4B , with more model adaptations coming soon. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Diffusion_Templates/Template_Model_Training.md`
- **Diffusion Templates Architecture Details**（project_doc）：Diffusion Templates Architecture Details 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Diffusion_Templates/Understanding_Diffusion_Templates.md`
- **ACE-Step**（project_doc）：ACE-Step 1.5 is an open-source music generation model based on DiT architecture, supporting text-to-music, audio cover, repainting and other functionalities, running efficiently on consumer-grade hardware. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/ACE-Step.md`
- **Anima**（project_doc）：Anima is an image generation model trained and open-sourced by CircleStone Labs and Comfy Org. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Anima.md`
- **Boogu-Image**（project_doc）：Boogu-Image supports text-to-image, image-to-image, and instruction-guided image editing. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Boogu-Image.md`
- **ERNIE-Image**（project_doc）：ERNIE-Image is a powerful image generation model with 8B parameters developed by Baidu, featuring a compact and efficient architecture with strong instruction-following capability. Based on an 8B DiT backbone, it delivers performance comparable to larger 20B+ models in certain scenarios while maintaining parameter efficiency. It offers reliable performance in instruction understanding and execution, text generation… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/ERNIE-Image.md`
- **FLUX**（project_doc）：! Image https://github.com/user-attachments/assets/c01258e2-f251-441a-aa1e-ebb22f02594d 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/FLUX.md`
- **FLUX.2**（project_doc）：FLUX.2 is an image generation model trained and open-sourced by Black Forest Labs. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/FLUX2.md`
- **HiDream-O1-Image**（project_doc）：HiDream-O1-Image is an image generation model open-sourced by HiDream.ai, based on the Pixel-Level Unified Transformer UiT architecture. This model unifies VAE, DiT, and TextEncoder within a single Qwen3VLModel, performing diffusion denoising directly in pixel patch space without requiring a separate VAE component. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/HiDream-O1-Image.md`
- **Ideogram 4**（project_doc）：Ideogram 4 is an image generation model open-sourced by Ideogram. DiffSynth-Studio supports inference, low VRAM inference, full training, and LoRA training for both the FP8 quantized version and the BF16 repackaged version. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Ideogram-4.md`
- **Image Quality Evaluation Metrics**（project_doc）：DiffSynth-Studio provides a suite of image quality evaluation metrics and reward models in diffsynth.metrics to assess text alignment, aesthetic quality, human preference, and image distribution quality of generated images. Example code for these metrics can be found in examples/image quality metric/ ../../../examples/image quality metric/ . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Image-Quality-Metrics.md`
- **JoyAI-Image**（project_doc）：JoyAI-Image is a unified multi-modal foundation model open-sourced by JD.com, supporting image understanding, text-to-image generation, and instruction-guided image editing. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/JoyAI-Image.md`
- **Krea-2**（project_doc）：Krea-2 is an image generation model developed by the Krea team. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Krea-2.md`
- **LTX-2**（project_doc）：LTX-2 is a series of audio-video generation models developed by Lightricks. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/LTX-2.md`
- **Model Directory**（project_doc）：Documentation: ./Qwen-Image.md ../Model Details/Qwen-Image.md 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Overview.md`
- **Qwen-Image**（project_doc）：! Image https://github.com/user-attachments/assets/738078d8-8749-4a53-a046-571861541924 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Qwen-Image.md`
- **Stable Diffusion XL**（project_doc）：Stable Diffusion XL SDXL is an open-source diffusion-based text-to-image generation model developed by Stability AI, supporting 1024x1024 resolution high-quality text-to-image generation with a dual text encoder CLIP-L + CLIP-bigG architecture. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Stable-Diffusion-XL.md`
- **Stable Diffusion**（project_doc）：Stable Diffusion is an open-source diffusion-based text-to-image generation model developed by Stability AI, supporting 512x512 resolution text-to-image generation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Stable-Diffusion.md`
- **Wan**（project_doc）：https://github.com/user-attachments/assets/1d66ae74-3b02-40a9-acc3-ea95fc039314 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Wan.md`
- **Z-Image**（project_doc）：Z-Image is an image generation model trained and open-sourced by the Multimodal Interaction Team of Alibaba Tongyi Lab. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Model_Details/Z-Image.md`
- **Inference Acceleration**（project_doc）：The denoising process of diffusion models is typically time-consuming. To improve inference speed, various acceleration techniques can be applied, including lossless acceleration solutions such as multi-GPU parallel inference and computation graph compilation, as well as lossy acceleration solutions like Cache and quantization. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Pipeline_Usage/Accelerated_Inference.md`
- **Environment Variables**（project_doc）：DiffSynth-Studio can control some settings through environment variables. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Pipeline_Usage/Environment_Variables.md`
- **GPU/NPU Support**（project_doc）：DiffSynth-Studio supports various GPUs and NPUs. This document explains how to run model inference and training on these devices. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Pipeline_Usage/GPU_support.md`
- **Inference WebUI**（project_doc）：DiffSynth-Studio provides an Inference WebUI to help developers quickly validate model performance. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Pipeline_Usage/Inference_WebUI.md`
- **Model Inference**（project_doc）：This document uses the Qwen-Image model as an example to introduce how to use DiffSynth-Studio for model inference. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Pipeline_Usage/Model_Inference.md`
- **Model Training**（project_doc）：This document introduces how to use DiffSynth-Studio for model training. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Pipeline_Usage/Model_Training.md`
- **Installing Dependencies**（project_doc）：Install from PyPI there may be delays in version updates; for latest features, install from source : 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Pipeline_Usage/Setup.md`
- **VRAM Management**（project_doc）：VRAM management is a distinctive feature of DiffSynth-Studio that enables GPUs with low VRAM to run inference with large parameter models. This document uses Qwen-Image as an example to introduce how to use the VRAM management solution. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Pipeline_Usage/VRAM_management.md`
- **Frequently Asked Questions**（project_doc）：Why doesn't the training framework support batch size 1? 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/QA.md`
- **Inference Optimization Techniques**（project_doc）：DiffSynth-Studio aims to drive technological innovation through its foundational framework. This article demonstrates how to build a training-free image generation enhancement solution using DiffSynth-Studio, taking Inference-time scaling as an example. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Research_Tutorial/inference_time_scaling.md`
- **Training Models from Scratch**（project_doc）：DiffSynth-Studio's training engine supports training foundation models from scratch. This article introduces how to train a small text-to-image model with only 0.1B parameters from scratch. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Research_Tutorial/train_from_scratch.md`
- **Enabling DeepSpeed**（project_doc）：The training framework is built on accelerate and deepspeed , thus natively supporting DeepSpeed training features. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Training/DeepSpeed.md`
- **Differential LoRA Training**（project_doc）：Differential LoRA training is a special form of LoRA training designed to enable models to learn differences between images. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Training/Differential_LoRA.md`
- **End-to-End Distillation Accelerated Training**（project_doc）：End-to-End Distillation Accelerated Training 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Training/Direct_Distill.md`
- **Enabling FP8 Precision in Training**（project_doc）：Although DiffSynth-Studio supports VRAM management ../Pipeline Usage/VRAM management.md in model inference, most of the techniques for reducing VRAM usage are not suitable for training. Offloading would cause extremely slow training processes. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Training/FP8_Precision.md`
- **Offload Training**（project_doc）：This document introduces the Offload Training feature in DiffSynth-Studio, which significantly reduces GPU memory usage during training by moving model weights layer-by-layer between CPU and GPU. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Training/Offload_Training.md`
- **Two-Stage Split Training**（project_doc）：This document introduces split training, which can automatically divide the training process into two stages, reducing VRAM usage while accelerating training speed. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Training/Split_Training.md`
- **Standard Supervised Training**（project_doc）：After understanding the Basic Principles of Diffusion Models ../Training/Understanding Diffusion models.md , this document introduces how the framework implements Diffusion model training. This document explains the framework's principles to help developers write new training code. If you want to use our provided default training functions, please refer to Model Training ../Pipeline Usage/Model Training.md . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Training/Supervised_Fine_Tuning.md`
- **Basic Principles of Diffusion Models**（project_doc）：Basic Principles of Diffusion Models 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/Training/Understanding_Diffusion_models.md`
- **diffsynth.core.attention : 注意力机制实现**（project_doc）：diffsynth.core.attention 提供了注意力机制实现的路由机制，根据 Python 环境中的可用包和 环境变量 ../../Pipeline Usage/Environment Variables.md diffsynth attention implementation 自动选择高效的注意力机制实现。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/API_Reference/core/attention.md`
- **diffsynth.core.data : 数据处理算子与通用数据集**（project_doc）：diffsynth.core.data 提供了一系列数据处理算子，用于进行数据处理，包括： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/API_Reference/core/data.md`
- **diffsynth.core.gradient : 梯度检查点及其 Offload**（project_doc）：diffsynth.core.gradient : 梯度检查点及其 Offload 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/API_Reference/core/gradient.md`
- **diffsynth.core.loader : 模型下载与加载**（project_doc）：本文档介绍 diffsynth.core.loader 中模型下载与加载相关的功能。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/API_Reference/core/loader.md`
- **diffsynth.core.vram : 显存管理**（project_doc）：本文档介绍 diffsynth.core.vram 中的显存管理底层功能，如果你希望将这些功能用于其他的代码库中，可参考本文档。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/API_Reference/core/vram.md`
- **接入 Pipeline**（project_doc）：在 将 Pipeline 所需的模型接入 ../Developer Guide/Integrating Your Model.md 之后，还需构建 Pipeline 用于模型推理，本文档提供 Pipeline 构建的标准化流程，开发者也可参考现有的 Pipeline 进行构建。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Developer_Guide/Building_a_Pipeline.md`
- **细粒度显存管理方案**（project_doc）：本文档介绍如何为模型编写合理的细粒度显存管理方案，以及如何将 DiffSynth-Studio 中的显存管理功能用于外部的其他代码库，在阅读本文档前，请先阅读文档 显存管理 ../Pipeline Usage/VRAM management.md 。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Developer_Guide/Enabling_VRAM_management.md`
- **接入模型结构**（project_doc）：本文档介绍如何将模型接入到 DiffSynth-Studio 框架中，供 Pipeline 等模块调用。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Developer_Guide/Integrating_Your_Model.md`
- **接入模型训练**（project_doc）：在 接入模型 ../Developer Guide/Integrating Your Model.md 并 实现 Pipeline ../Developer Guide/Building a Pipeline.md 后，接下来接入模型训练功能。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Developer_Guide/Training_Diffusion_Models.md`
- **Diffusion Templates**（project_doc）：Diffusion Templates 是 DiffSynth-Studio 中的 Diffusion 模型可控生成插件框架，可以为基础模型提供额外的可控生成能力。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Diffusion_Templates/Introducing_Diffusion_Templates.md`
- **Template 模型推理**（project_doc）：我们以基础模型 black-forest-labs/FLUX.2-klein-base-4B https://modelscope.cn/models/black-forest-labs/FLUX.2-klein-base-4B 为例，当仅使用基础模型生成图像时 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Diffusion_Templates/Template_Model_Inference.md`
- **Template 模型训练**（project_doc）：DiffSynth-Studio 目前已为 black-forest-labs/FLUX.2-klein-base-4B https://www.modelscope.cn/models/black-forest-labs/FLUX.2-klein-base-4B 提供了全面的 Templates 训练支持，更多模型的适配敬请期待。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Diffusion_Templates/Template_Model_Training.md`
- **Diffusion Templates 架构详解**（project_doc）：Template Input: Template 模型的输入。其格式为 Python 字典，其中的字段由每个 Template 模型自身决定，例如 {"scale": 0.8} Template Model: Template 模型，可从魔搭模型库加载（ ModelConfig model id="xxx/xxx" ）或从本地路径加载（ ModelConfig path="xxx" ） Template Cache: Template 模型的输出。其格式为 Python 字典，其中的字段仅支持对应基础模型 Pipeline 中的输入参数字段。 Template Pipeline: 用于调度多个 Template 模型的模块。该模块负责加载 Template 模型、整合多个 Template 模型的输出 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Diffusion_Templates/Understanding_Diffusion_Templates.md`
- **ACE-Step**（project_doc）：ACE-Step 1.5 是一个开源音乐生成模型，基于 DiT 架构，支持文生音乐、音频翻唱、局部重绘等多种功能，可在消费级硬件上高效运行。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Model_Details/ACE-Step.md`
- **Anima**（project_doc）：Anima 是由 CircleStone Labs 与 Comfy Org 训练并开源的图像生成模型。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Model_Details/Anima.md`
- **Boogu-Image**（project_doc）：在使用本项目进行模型推理和训练前，请先安装 DiffSynth-Studio。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Model_Details/Boogu-Image.md`
- **ERNIE-Image**（project_doc）：ERNIE-Image 是百度推出的拥有 8B 参数的图像生成模型，具有紧凑高效的架构和出色的指令跟随能力。基于 8B DiT 主干网络，其在某些场景下的性能可与 20B 以上的更大模型相媲美，同时保持了良好的参数效率。该模型在指令理解与执行、文本生成（如英文/中文/日文）以及整体稳定性方面提供了较为可靠的表现。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/zh/Model_Details/ERNIE-Image.md`

## 证据索引

- 共索引 80 条证据。

- **DiffSynth-Studio Documentation**（documentation）：Welcome to the magical world of Diffusion models! DiffSynth-Studio is an open-source Diffusion model engine developed and maintained by the ModelScope Community https://www.modelscope.cn/ . We aim to build a universal Diffusion model framework that fosters technological innovation through framework construction, aggregates the power of the open-source community, and explores the boundaries of generative model technology! 证据：`docs/en/README.md`
- **DiffSynth-Studio 文档**（documentation）：欢迎来到 Diffusion 模型的魔法世界！ DiffSynth-Studio 是由 魔搭社区 https://www.modelscope.cn/ 团队开发和维护的开源 Diffusion 模型引擎。我们期望构建一个通用的 Diffusion 模型框架，以框架建设孵化技术创新，凝聚开源社区的力量，探索生成式模型技术的边界！ 证据：`docs/zh/README.md`
- **DiffSynth-Studio**（documentation）：! PyPI https://img.shields.io/pypi/v/DiffSynth https://pypi.org/project/DiffSynth/ ! license https://img.shields.io/github/license/modelscope/DiffSynth-Studio.svg https://github.com/modelscope/DiffSynth-Studio/blob/master/LICENSE ! open issues https://isitmaintained.com/badge/open/modelscope/DiffSynth-Studio.svg https://github.com/modelscope/DiffSynth-Studio/issues ! GitHub pull-requests https://img.shields.io/github/issues-pr/modelscope/DiffSynth-Studio.svg https://GitHub.com/modelscope/DiffSynth-Studio/pull/ ! GitHub latest commit https://badgen.net/github/last-commit/modelscope/DiffSynth-Studio https://GitHub.com/modelscope/DiffSynth-Studio/commit/ ! Discord https://badgen.net//discord/m… 证据：`README.md`
- **Readme**（documentation）：Please see docs/en/Research Tutorial/inference time scaling.md or docs/zh/Research Tutorial/inference time scaling.md for more details. 证据：`diffsynth/utils/ses/README.md`
- **Readme**（documentation）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/Anima.html 证据：`examples/anima/README.md`
- **Readme**（documentation）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/FLUX.html 证据：`examples/flux/README.md`
- **Readme**（documentation）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/FLUX2.html 证据：`examples/flux2/README.md`
- **Readme**（documentation）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/LTX-2.html 证据：`examples/ltx2/README.md`
- **Readme**（documentation）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/Wan.html 证据：`examples/mova/README.md`
- **Readme**（documentation）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/Qwen-Image.html 证据：`examples/qwen_image/README.md`
- **Readme**（documentation）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/Wan.html 证据：`examples/wanvideo/README.md`
- **Readme**（documentation）：English Document: https://diffsynth-studio-doc.readthedocs.io/en/latest/Model Details/Z-Image.html 证据：`examples/z_image/README.md`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`LICENSE`
- **diffsynth.core.attention : Attention Mechanism Implementation**（documentation）：diffsynth.core.attention : Attention Mechanism Implementation 证据：`docs/en/API_Reference/core/attention.md`
- **diffsynth.core.data : Data Processing Operators and Universal Dataset**（documentation）：diffsynth.core.data : Data Processing Operators and Universal Dataset 证据：`docs/en/API_Reference/core/data.md`
- **diffsynth.core.gradient : Gradient Checkpointing and Offload**（documentation）：diffsynth.core.gradient : Gradient Checkpointing and Offload 证据：`docs/en/API_Reference/core/gradient.md`
- **diffsynth.core.loader : Model Download and Loading**（documentation）：diffsynth.core.loader : Model Download and Loading 证据：`docs/en/API_Reference/core/loader.md`
- **diffsynth.core.vram : VRAM Management**（documentation）：diffsynth.core.vram : VRAM Management 证据：`docs/en/API_Reference/core/vram.md`
- **Building a Pipeline**（documentation）：After integrating the required models for the Pipeline ../Developer Guide/Integrating Your Model.md , you also need to build a Pipeline for model inference. This document provides a standardized process for building a Pipeline . Developers can also refer to existing Pipeline implementations for construction. 证据：`docs/en/Developer_Guide/Building_a_Pipeline.md`
- **Fine-Grained VRAM Management Scheme**（documentation）：Fine-Grained VRAM Management Scheme 证据：`docs/en/Developer_Guide/Enabling_VRAM_management.md`
- **Integrating Model Architecture**（documentation）：This document introduces how to integrate models into the DiffSynth-Studio framework for use by modules such as Pipeline . 证据：`docs/en/Developer_Guide/Integrating_Your_Model.md`
- **Integrating Model Training**（documentation）：After integrating models ../Developer Guide/Integrating Your Model.md and implementing Pipeline ../Developer Guide/Building a Pipeline.md , the next step is to integrate model training functionality. 证据：`docs/en/Developer_Guide/Training_Diffusion_Models.md`
- **Diffusion Templates**（documentation）：Diffusion Templates is a controllable generation plugin framework for Diffusion models in DiffSynth-Studio, providing additional controllable generation capabilities for base models. 证据：`docs/en/Diffusion_Templates/Introducing_Diffusion_Templates.md`
- **Template Model Inference**（documentation）：Enabling Template Models on Base Model Pipelines 证据：`docs/en/Diffusion_Templates/Template_Model_Inference.md`
- **Template Model Training**（documentation）：DiffSynth-Studio currently provides comprehensive Template training support for black-forest-labs/FLUX.2-klein-base-4B https://www.modelscope.cn/models/black-forest-labs/FLUX.2-klein-base-4B , with more model adaptations coming soon. 证据：`docs/en/Diffusion_Templates/Template_Model_Training.md`
- **Diffusion Templates Architecture Details**（documentation）：Diffusion Templates Architecture Details 证据：`docs/en/Diffusion_Templates/Understanding_Diffusion_Templates.md`
- **ACE-Step**（documentation）：ACE-Step 1.5 is an open-source music generation model based on DiT architecture, supporting text-to-music, audio cover, repainting and other functionalities, running efficiently on consumer-grade hardware. 证据：`docs/en/Model_Details/ACE-Step.md`
- **Anima**（documentation）：Anima is an image generation model trained and open-sourced by CircleStone Labs and Comfy Org. 证据：`docs/en/Model_Details/Anima.md`
- **Boogu-Image**（documentation）：Boogu-Image supports text-to-image, image-to-image, and instruction-guided image editing. 证据：`docs/en/Model_Details/Boogu-Image.md`
- **ERNIE-Image**（documentation）：ERNIE-Image is a powerful image generation model with 8B parameters developed by Baidu, featuring a compact and efficient architecture with strong instruction-following capability. Based on an 8B DiT backbone, it delivers performance comparable to larger 20B+ models in certain scenarios while maintaining parameter efficiency. It offers reliable performance in instruction understanding and execution, text generation English/Chinese/Japanese , and overall stability. 证据：`docs/en/Model_Details/ERNIE-Image.md`
- **FLUX**（documentation）：! Image https://github.com/user-attachments/assets/c01258e2-f251-441a-aa1e-ebb22f02594d 证据：`docs/en/Model_Details/FLUX.md`
- **FLUX.2**（documentation）：FLUX.2 is an image generation model trained and open-sourced by Black Forest Labs. 证据：`docs/en/Model_Details/FLUX2.md`
- **HiDream-O1-Image**（documentation）：HiDream-O1-Image is an image generation model open-sourced by HiDream.ai, based on the Pixel-Level Unified Transformer UiT architecture. This model unifies VAE, DiT, and TextEncoder within a single Qwen3VLModel, performing diffusion denoising directly in pixel patch space without requiring a separate VAE component. 证据：`docs/en/Model_Details/HiDream-O1-Image.md`
- **Ideogram 4**（documentation）：Ideogram 4 is an image generation model open-sourced by Ideogram. DiffSynth-Studio supports inference, low VRAM inference, full training, and LoRA training for both the FP8 quantized version and the BF16 repackaged version. 证据：`docs/en/Model_Details/Ideogram-4.md`
- **Image Quality Evaluation Metrics**（documentation）：DiffSynth-Studio provides a suite of image quality evaluation metrics and reward models in diffsynth.metrics to assess text alignment, aesthetic quality, human preference, and image distribution quality of generated images. Example code for these metrics can be found in examples/image quality metric/ ../../../examples/image quality metric/ . 证据：`docs/en/Model_Details/Image-Quality-Metrics.md`
- **JoyAI-Image**（documentation）：JoyAI-Image is a unified multi-modal foundation model open-sourced by JD.com, supporting image understanding, text-to-image generation, and instruction-guided image editing. 证据：`docs/en/Model_Details/JoyAI-Image.md`
- **Krea-2**（documentation）：Krea-2 is an image generation model developed by the Krea team. 证据：`docs/en/Model_Details/Krea-2.md`
- **LTX-2**（documentation）：LTX-2 is a series of audio-video generation models developed by Lightricks. 证据：`docs/en/Model_Details/LTX-2.md`
- **Model Directory**（documentation）：Documentation: ./Qwen-Image.md ../Model Details/Qwen-Image.md 证据：`docs/en/Model_Details/Overview.md`
- **Qwen-Image**（documentation）：! Image https://github.com/user-attachments/assets/738078d8-8749-4a53-a046-571861541924 证据：`docs/en/Model_Details/Qwen-Image.md`
- **Stable Diffusion XL**（documentation）：Stable Diffusion XL SDXL is an open-source diffusion-based text-to-image generation model developed by Stability AI, supporting 1024x1024 resolution high-quality text-to-image generation with a dual text encoder CLIP-L + CLIP-bigG architecture. 证据：`docs/en/Model_Details/Stable-Diffusion-XL.md`
- **Stable Diffusion**（documentation）：Stable Diffusion is an open-source diffusion-based text-to-image generation model developed by Stability AI, supporting 512x512 resolution text-to-image generation. 证据：`docs/en/Model_Details/Stable-Diffusion.md`
- **Wan**（documentation）：https://github.com/user-attachments/assets/1d66ae74-3b02-40a9-acc3-ea95fc039314 证据：`docs/en/Model_Details/Wan.md`
- **Z-Image**（documentation）：Z-Image is an image generation model trained and open-sourced by the Multimodal Interaction Team of Alibaba Tongyi Lab. 证据：`docs/en/Model_Details/Z-Image.md`
- **Inference Acceleration**（documentation）：The denoising process of diffusion models is typically time-consuming. To improve inference speed, various acceleration techniques can be applied, including lossless acceleration solutions such as multi-GPU parallel inference and computation graph compilation, as well as lossy acceleration solutions like Cache and quantization. 证据：`docs/en/Pipeline_Usage/Accelerated_Inference.md`
- **Environment Variables**（documentation）：DiffSynth-Studio can control some settings through environment variables. 证据：`docs/en/Pipeline_Usage/Environment_Variables.md`
- **GPU/NPU Support**（documentation）：DiffSynth-Studio supports various GPUs and NPUs. This document explains how to run model inference and training on these devices. 证据：`docs/en/Pipeline_Usage/GPU_support.md`
- **Inference WebUI**（documentation）：DiffSynth-Studio provides an Inference WebUI to help developers quickly validate model performance. 证据：`docs/en/Pipeline_Usage/Inference_WebUI.md`
- **Model Inference**（documentation）：This document uses the Qwen-Image model as an example to introduce how to use DiffSynth-Studio for model inference. 证据：`docs/en/Pipeline_Usage/Model_Inference.md`
- **Model Training**（documentation）：This document introduces how to use DiffSynth-Studio for model training. 证据：`docs/en/Pipeline_Usage/Model_Training.md`
- **Installing Dependencies**（documentation）：Install from PyPI there may be delays in version updates; for latest features, install from source : 证据：`docs/en/Pipeline_Usage/Setup.md`
- **VRAM Management**（documentation）：VRAM management is a distinctive feature of DiffSynth-Studio that enables GPUs with low VRAM to run inference with large parameter models. This document uses Qwen-Image as an example to introduce how to use the VRAM management solution. 证据：`docs/en/Pipeline_Usage/VRAM_management.md`
- **Frequently Asked Questions**（documentation）：Why doesn't the training framework support batch size 1? 证据：`docs/en/QA.md`
- **Inference Optimization Techniques**（documentation）：DiffSynth-Studio aims to drive technological innovation through its foundational framework. This article demonstrates how to build a training-free image generation enhancement solution using DiffSynth-Studio, taking Inference-time scaling as an example. 证据：`docs/en/Research_Tutorial/inference_time_scaling.md`
- **Training Models from Scratch**（documentation）：DiffSynth-Studio's training engine supports training foundation models from scratch. This article introduces how to train a small text-to-image model with only 0.1B parameters from scratch. 证据：`docs/en/Research_Tutorial/train_from_scratch.md`
- **Enabling DeepSpeed**（documentation）：The training framework is built on accelerate and deepspeed , thus natively supporting DeepSpeed training features. 证据：`docs/en/Training/DeepSpeed.md`
- **Differential LoRA Training**（documentation）：Differential LoRA training is a special form of LoRA training designed to enable models to learn differences between images. 证据：`docs/en/Training/Differential_LoRA.md`
- **End-to-End Distillation Accelerated Training**（documentation）：End-to-End Distillation Accelerated Training 证据：`docs/en/Training/Direct_Distill.md`
- **Enabling FP8 Precision in Training**（documentation）：Although DiffSynth-Studio supports VRAM management ../Pipeline Usage/VRAM management.md in model inference, most of the techniques for reducing VRAM usage are not suitable for training. Offloading would cause extremely slow training processes. 证据：`docs/en/Training/FP8_Precision.md`
- **Offload Training**（documentation）：This document introduces the Offload Training feature in DiffSynth-Studio, which significantly reduces GPU memory usage during training by moving model weights layer-by-layer between CPU and GPU. 证据：`docs/en/Training/Offload_Training.md`
- 其余 20 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

## 宿主 AI 必须遵守的规则

- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`docs/en/README.md`, `docs/zh/README.md`, `README.md`
- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`docs/en/README.md`, `docs/zh/README.md`, `README.md`

## 用户开工前应该回答的问题

- 你准备在哪个宿主 AI 或本地环境中使用它？
- 你只是想先体验工作流，还是准备真实安装？
- 你最在意的是安装成本、输出质量、还是和现有规则的冲突？

## 验收标准

- 所有能力声明都能回指到 evidence_refs 中的文件路径。
- AI_CONTEXT_PACK.md 没有把预览包装成真实运行。
- 用户能在 3 分钟内看懂适合谁、能做什么、如何开始和风险边界。

---

## Doramagic Context Augmentation

下面内容用于强化 Repomix/AI Context Pack 主体。Human Manual 只提供阅读骨架；踩坑日志会被转成宿主 AI 必须遵守的工作约束。

## Human Manual 骨架

使用规则：这里只是项目阅读路线和显著性信号，不是事实权威。具体事实仍必须回到 repo evidence / Claim Graph。

宿主 AI 硬性规则：
- 不得把页标题、章节顺序、摘要或 importance 当作项目事实证据。
- 解释 Human Manual 骨架时，必须明确说它只是阅读路线/显著性信号。
- 能力、安装、兼容性、运行状态和风险判断必须引用 repo evidence、source path 或 Claim Graph。

- **项目概览与系统架构**：importance `high`
  - source_paths: README.md, diffsynth/__init__.py, diffsynth/diffusion/base_pipeline.py, diffsynth/configs/model_configs.py, pyproject.toml
- **核心模块与显存管理**：importance `high`
  - source_paths: diffsynth/core/attention/attention.py, diffsynth/core/vram/initialization.py, diffsynth/core/vram/layers.py, diffsynth/core/vram/disk_map.py, diffsynth/core/gradient/gradient_checkpoint.py
- **支持的模型、推理管线与图像质量指标**：importance `high`
  - source_paths: diffsynth/pipelines/flux2_image.py, diffsynth/pipelines/qwen_image.py, diffsynth/pipelines/wan_video.py, diffsynth/pipelines/z_image.py, diffsynth/pipelines/ltx2_audio_video.py
- **训练框架、Diffusion Templates 与社区高频问题**：importance `high`
  - source_paths: diffsynth/diffusion/runner.py, diffsynth/diffusion/training_module.py, diffsynth/diffusion/flow_match.py, diffsynth/diffusion/ddim_scheduler.py, diffsynth/diffusion/dmd2.py

## Repo Inspection Evidence / 源码检查证据

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `3f5fa5286fa6d35b3b12a739b4dde5500b191e5d`
- inspected_files: `README.md`, `pyproject.toml`, `docs/en/.readthedocs.yaml`, `docs/en/API_Reference/core/attention.md`, `docs/en/API_Reference/core/data.md`, `docs/en/API_Reference/core/gradient.md`, `docs/en/API_Reference/core/loader.md`, `docs/en/API_Reference/core/vram.md`, `docs/en/Developer_Guide/Building_a_Pipeline.md`, `docs/en/Developer_Guide/Enabling_VRAM_management.md`, `docs/en/Developer_Guide/Integrating_Your_Model.md`, `docs/en/Developer_Guide/Training_Diffusion_Models.md`, `docs/en/Diffusion_Templates/Introducing_Diffusion_Templates.md`, `docs/en/Diffusion_Templates/Template_Model_Inference.md`, `docs/en/Diffusion_Templates/Template_Model_Training.md`, `docs/en/Diffusion_Templates/Understanding_Diffusion_Templates.md`, `docs/en/Model_Details/ACE-Step.md`, `docs/en/Model_Details/Anima.md`, `docs/en/Model_Details/Boogu-Image.md`, `docs/en/Model_Details/ERNIE-Image.md`

宿主 AI 硬性规则：
- 没有 repo_clone_verified=true 时，不得声称已经读过源码。
- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。
- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。

## Doramagic Pitfall Constraints / 踩坑约束

这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。

### Constraint 1: 来源证据：Inquiry regarding Full Training speed and First-frame color shift on Wan2.2 TI2V 5B

- Trigger: GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Inquiry regarding Full Training speed and First-frame color shift on Wan2.2 TI2V 5B
- Why it matters: 可能影响授权、密钥配置或安全边界。
- Evidence: community_evidence:github | https://github.com/modelscope/DiffSynth-Studio/issues/1195 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 仓库名和安装名不一致

- Trigger: 仓库名 `diffsynth-studio` 与安装入口 `DiffSynth` 不完全一致。
- Host AI rule: 在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。
- Why it matters: 用户照着仓库名搜索包或照着包名找仓库时容易走错入口。
- Evidence: identity.distribution | https://github.com/modelscope/DiffSynth-Studio | repo=diffsynth-studio; install=DiffSynth
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 来源证据：训练异常

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：训练异常
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/modelscope/DiffSynth-Studio/issues/1494 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 能力判断依赖假设

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: 将假设转成下游验证清单。
- Why it matters: 假设不成立时，用户拿不到承诺的能力。
- Evidence: capability.assumptions | https://github.com/modelscope/DiffSynth-Studio | README/documentation is current enough for a first validation pass.
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 维护活跃度未知

- Trigger: 未记录 last_activity_observed。
- Host AI rule: 补 GitHub 最近 commit、release、issue/PR 响应信号。
- Why it matters: 新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。
- Evidence: evidence.maintainer_signals | https://github.com/modelscope/DiffSynth-Studio | last_activity_observed missing
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

- Trigger: no_demo
- Evidence: downstream_validation.risk_items | https://github.com/modelscope/DiffSynth-Studio | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 7: 存在评分风险

- Trigger: no_demo
- Why it matters: 风险会影响是否适合普通用户安装。
- Evidence: risks.scoring_risks | https://github.com/modelscope/DiffSynth-Studio | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 8: issue/PR 响应质量未知

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: 抽样最近 issue/PR，判断是否长期无人处理。
- Why it matters: 用户无法判断遇到问题后是否有人维护。
- Evidence: evidence.maintainer_signals | https://github.com/modelscope/DiffSynth-Studio | issue_or_pr_quality=unknown
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 9: 发布节奏不明确

- Trigger: release_recency=unknown。
- Host AI rule: 确认最近 release/tag 和 README 安装命令是否一致。
- Why it matters: 安装命令和文档可能落后于代码，用户踩坑概率升高。
- Evidence: evidence.maintainer_signals | https://github.com/modelscope/DiffSynth-Studio | release_recency=unknown
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
