# invokeai - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

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

## Claim 消费规则

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

## 它最适合谁

- **想在安装前理解开源项目价值和边界的用户**：当前证据主要来自项目文档。 证据：`README.md` Claim：`clm_0002` supported 0.86

## 它能做什么

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

## 怎么开始

- `pip install geffnet` 证据：`invokeai/backend/image_util/normal_bae/nets/submodules/efficientnet_repo/README.md` Claim：`clm_0003` supported 0.86
- `pip install --user build` 证据：`scripts/build_wheel.sh` Claim：`clm_0004` unverified 0.25

## 继续前判断卡

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

### 30 秒判断

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

### 现在可以相信

- **适合人群线索：想在安装前理解开源项目价值和边界的用户**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86
- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`invokeai/backend/image_util/normal_bae/nets/submodules/efficientnet_repo/README.md`, `scripts/build_wheel.sh` Claim：`clm_0001` supported 0.86
- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`invokeai/backend/image_util/normal_bae/nets/submodules/efficientnet_repo/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 从错误专业视角回答，浪费时间或误导决策。
- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`invokeai/backend/image_util/normal_bae/nets/submodules/efficientnet_repo/README.md`, `scripts/build_wheel.sh`
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`invokeai/backend/image_util/normal_bae/nets/submodules/efficientnet_repo/README.md`, `scripts/build_wheel.sh`
- **宿主 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
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`invokeai/backend/image_util/normal_bae/nets/submodules/efficientnet_repo/README.md`, `scripts/build_wheel.sh` 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。

### 任务路由

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

### 上下文规模

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

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

请严格输出四段：
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
请基于 invokeai 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。
```

## 角色 / Skill 索引

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

- **Invoke AI Documentation**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/README.md`
- **Invoke - Professional Creative AI Tools for Visual Media**（project_doc）：! project hero https://github.com/invoke-ai/InvokeAI/assets/31807370/6e3728c7-e90e-4711-905c-3b55844ff5be 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Invoke in Docker**（project_doc）：- Ensure that Docker can use your NVIDIA nvidia docker docs or AMD amd docker docs GPU. - This document assumes a Linux system, but should work similarly under Windows with WSL2. - We don't recommend running Invoke in Docker on macOS at this time. It works, but very slowly. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docker/README.md`
- **Custom Nodes / Node Packs**（project_doc）：Copy your node packs to this directory. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/app/invocations/custom_nodes/README.md`
- **InvokeAI Graph - Design Overview**（project_doc）：High-level design for the graph module. Focuses on responsibilities, data flow, and how traversal works. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/app/services/shared/README.md`
- **Default Workflows**（project_doc）：Workflows placed in this directory will be synced to the workflow library as default workflows on app startup. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/app/services/workflow_records/default_workflows/README.md`
- **Generic EfficientNets for PyTorch**（project_doc）：A 'generic' implementation of EfficientNet, MixNet, MobileNetV3, etc. that covers most of the compute/parameter efficient architectures derived from the MobileNet V1/V2 block sequence, including those found via automated neural architecture search. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/backend/image_util/normal_bae/nets/submodules/efficientnet_repo/README.md`
- **IP-Adapter Model Formats**（project_doc）：The official IP-Adapter models are released here: h94/IP-Adapter https://huggingface.co/h94/IP-Adapter 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/backend/ip_adapter/README.md`
- **Model Management System**（project_doc）：This document describes Invoke's model management system and common tasks for extending model support. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/backend/model_manager/README.md`
- **Readme**（project_doc）：This directory contains custom implementations of common torch.nn.Module classes that add support for: - Streaming weights to the execution device - Applying sidecar patches at execution time e.g. sidecar LoRA layers 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/backend/model_manager/load/model_cache/torch_module_autocast/custom_modules/README.md`
- **Invoke UI**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/README.md`
- **Canvas**（project_doc）：The canvas is a fairly complex feature. It uses "native" KonvaJS i.e. not the Konva react bindings to render a drawing canvas. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/src/features/controlLayers/README.md`
- **Image cropper**（project_doc）：This is a simple image cropping canvas app built with KonvaJS "native" Konva, not the react bindings . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/src/features/cropper/README.md`
- **Delete image modal**（project_doc）：When users delete images, we show a confirmation dialog to prevent accidental deletions. Users can opt out of this, but we still check if dleeting an image would screw up their workspace and prompt if so. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/src/features/deleteImageModal/README.md`
- **Drag and drop**（project_doc）：Dnd functionality is implemented with https://github.com/atlassian/pragmatic-drag-and-drop, the successor to https://github.com/atlassian/react-beautiful-dnd 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/src/features/dnd/README.md`
- **Dynamic prompts**（project_doc）：The backend API has a route to process a prompt into a list of prompts using the https://github.com/adieyal/dynamicprompts syntax 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/src/features/dynamicPrompts/README.md`
- **Gallery Overview**（project_doc）：The gallery renders a scrollable grid of images. The image sizes adapt to the viewport size, and the user can scroll to any part of their gallery. It supports keyboard navigation, multi-select and context menus. Images can be dragged from the gallery to use them in other parts of the app they are not removed from the gallery . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/src/features/gallery/README.md`
- **Image context menu**（project_doc）：The context menu is loosely based on https://github.com/lukasbach/chakra-ui-contextmenu. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/src/features/gallery/components/ContextMenu/README.md`
- **Image actions**（project_doc）：This dir is unintentially a dumping ground for things that we do with images. For example, adding an image as a canvas layer. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/src/features/imageActions/README.md`
- **UI/Layout**（project_doc）：We use https://github.com/mathuo/dockview for layout. This library supports resizable and dockable panels. Users can drag and drop panels to rearrange them. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/src/features/ui/README.md`
- **API**（project_doc）：The API client is a fairly standard Redux Toolkit Query RTK-Query setup. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/src/services/api/README.md`
- **Bash commands**（project_doc）：All commands should be run from /invokeai/frontend/web/ . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/frontend/web/CLAUDE.md`
- **InvokeAI - A Stable Diffusion Toolkit**（project_doc）：InvokeAI - A Stable Diffusion Toolkit 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docker/runpod-readme.md`
- **Goal**（project_doc）：CallSavedWorkflowInvocation should become an engine-native workflow call boundary, not a frontend-only dynamic node and not a compile-time graph inliner. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/content/docs/contributing/call-saved-workflow.md`
- **Our Pledge**（project_doc）：We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/content/docs/contributing/code-of-conduct.md`
- **Original Author**（project_doc）：We thank all contributors https://github.com/invoke-ai/InvokeAI/graphs/contributors for their time and hard work! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/content/docs/contributing/contributors.md`
- **1 Add a New External Model Existing Provider**（project_doc）：1. Adding a new external model most common; existing provider . 2. Adding a brand-new external provider adapter + config + UI wiring . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/content/docs/contributing/external-providers.md`
- **Development**（project_doc）：Invoke originated as a project built by the community, and that vision carries forward today as we aim to build the best pro-grade tools available. We work together to incorporate the latest in AI/ML research, making these tools available in over 20 languages to artists and creatives around the world as part of our fully permissive OSS project designed for individual users to self-host and use. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/content/docs/contributing/index.md`
- **Contributing**（project_doc）：InvokeAI uses Weblate https://weblate.org/ for translation. Weblate is a FOSS project providing a scalable translation service. Weblate automates the tedious parts of managing translation of a growing project, and the service is generously provided at no cost to FOSS projects like InvokeAI. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/content/docs/contributing/translations.md`
- **Dev environment**（project_doc）：Invoke's UI is made possible by many contributors and open-source libraries. Thank you! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/content/docs/development/Front End/index.md`
- **Expand Prompt**（project_doc）：InvokeAI includes two built-in tools that use local language models to help you write better prompts. Both tools appear as small buttons in the top-right corner of the positive prompt area and are only visible when you have a compatible model installed. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/content/docs/features/prompt-tools.md`
- **Our Values**（project_doc）：Invoke-AI is a community of software developers, researchers, and user interface experts who have come together on a voluntary basis to build software tools which support cutting edge AI text-to-image applications. This community is open to anyone who wishes to contribute to the effort and has the skill and time to do so. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`InvokeAI_Statement_of_Values.md`
- **Security Policy**（project_doc）：Only the latest version of Invoke will receive security updates. We do not currently maintain multiple versions of the application with updates. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`SECURITY.md`
- **Stable Diffusion v1 Model Card**（project_doc）：Stable Diffusion v1 Model Card This model card focuses on the model associated with the Stable Diffusion model, available here https://github.com/CompVis/stable-diffusion . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`Stable_Diffusion_v1_Model_Card.md`
- **Model Performance Benchmarks**（project_doc）：Unoptimized Main run finished. Milliseconds per iter: 24.8316. Iters per second: 40.2712 Time per operator type: 15.9266 ms. 69.2624%. Conv 2.36551 ms. 10.2873%. SpatialBN 1.39102 ms. 6.04936%. Add 1.30327 ms. 5.66773%. Div 0.737014 ms. 3.20517%. Mul 0.639697 ms. 2.78195%. Relu 0.375681 ms. 1.63378%. Clip 0.153126 ms. 0.665921%. FC 0.0993787 ms. 0.432184%. AveragePool 0.0032632 ms. 0.0141912%. Squeeze 22.9946 ms in… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`invokeai/backend/image_util/normal_bae/nets/submodules/efficientnet_repo/BENCHMARK.md`

## 证据索引

- 共索引 79 条证据。

- **Invoke AI Documentation**（documentation）：Invoke AI Documentation 证据：`docs/README.md`
- **Invoke - Professional Creative AI Tools for Visual Media**（documentation）：! project hero https://github.com/invoke-ai/InvokeAI/assets/31807370/6e3728c7-e90e-4711-905c-3b55844ff5be 证据：`README.md`
- **Invoke in Docker**（documentation）：- Ensure that Docker can use your NVIDIA nvidia docker docs or AMD amd docker docs GPU. - This document assumes a Linux system, but should work similarly under Windows with WSL2. - We don't recommend running Invoke in Docker on macOS at this time. It works, but very slowly. 证据：`docker/README.md`
- **Custom Nodes / Node Packs**（documentation）：Copy your node packs to this directory. 证据：`invokeai/app/invocations/custom_nodes/README.md`
- **InvokeAI Graph - Design Overview**（documentation）：High-level design for the graph module. Focuses on responsibilities, data flow, and how traversal works. 证据：`invokeai/app/services/shared/README.md`
- **Default Workflows**（documentation）：Workflows placed in this directory will be synced to the workflow library as default workflows on app startup. 证据：`invokeai/app/services/workflow_records/default_workflows/README.md`
- **Generic EfficientNets for PyTorch**（documentation）：A 'generic' implementation of EfficientNet, MixNet, MobileNetV3, etc. that covers most of the compute/parameter efficient architectures derived from the MobileNet V1/V2 block sequence, including those found via automated neural architecture search. 证据：`invokeai/backend/image_util/normal_bae/nets/submodules/efficientnet_repo/README.md`
- **IP-Adapter Model Formats**（documentation）：The official IP-Adapter models are released here: h94/IP-Adapter https://huggingface.co/h94/IP-Adapter 证据：`invokeai/backend/ip_adapter/README.md`
- **Model Management System**（documentation）：This document describes Invoke's model management system and common tasks for extending model support. 证据：`invokeai/backend/model_manager/README.md`
- **Readme**（documentation）：This directory contains custom implementations of common torch.nn.Module classes that add support for: - Streaming weights to the execution device - Applying sidecar patches at execution time e.g. sidecar LoRA layers 证据：`invokeai/backend/model_manager/load/model_cache/torch_module_autocast/custom_modules/README.md`
- **Invoke UI**（documentation）：Invoke UI 证据：`invokeai/frontend/web/README.md`
- **Canvas**（documentation）：The canvas is a fairly complex feature. It uses "native" KonvaJS i.e. not the Konva react bindings to render a drawing canvas. 证据：`invokeai/frontend/web/src/features/controlLayers/README.md`
- **Image cropper**（documentation）：This is a simple image cropping canvas app built with KonvaJS "native" Konva, not the react bindings . 证据：`invokeai/frontend/web/src/features/cropper/README.md`
- **Delete image modal**（documentation）：When users delete images, we show a confirmation dialog to prevent accidental deletions. Users can opt out of this, but we still check if dleeting an image would screw up their workspace and prompt if so. 证据：`invokeai/frontend/web/src/features/deleteImageModal/README.md`
- **Drag and drop**（documentation）：Dnd functionality is implemented with https://github.com/atlassian/pragmatic-drag-and-drop, the successor to https://github.com/atlassian/react-beautiful-dnd 证据：`invokeai/frontend/web/src/features/dnd/README.md`
- **Dynamic prompts**（documentation）：The backend API has a route to process a prompt into a list of prompts using the https://github.com/adieyal/dynamicprompts syntax 证据：`invokeai/frontend/web/src/features/dynamicPrompts/README.md`
- **Gallery Overview**（documentation）：The gallery renders a scrollable grid of images. The image sizes adapt to the viewport size, and the user can scroll to any part of their gallery. It supports keyboard navigation, multi-select and context menus. Images can be dragged from the gallery to use them in other parts of the app they are not removed from the gallery . 证据：`invokeai/frontend/web/src/features/gallery/README.md`
- **Image context menu**（documentation）：The context menu is loosely based on https://github.com/lukasbach/chakra-ui-contextmenu. 证据：`invokeai/frontend/web/src/features/gallery/components/ContextMenu/README.md`
- **Image actions**（documentation）：This dir is unintentially a dumping ground for things that we do with images. For example, adding an image as a canvas layer. 证据：`invokeai/frontend/web/src/features/imageActions/README.md`
- **UI/Layout**（documentation）：We use https://github.com/mathuo/dockview for layout. This library supports resizable and dockable panels. Users can drag and drop panels to rearrange them. 证据：`invokeai/frontend/web/src/features/ui/README.md`
- **API**（documentation）：The API client is a fairly standard Redux Toolkit Query RTK-Query setup. 证据：`invokeai/frontend/web/src/services/api/README.md`
- **Bash commands**（documentation）：All commands should be run from /invokeai/frontend/web/ . 证据：`invokeai/frontend/web/CLAUDE.md`
- **Package**（package_manifest）：{ "name": "docs", "type": "module", "version": "0.0.1", "scripts": { "dev": "astro dev", "start": "astro dev", "generate-docs-data": "uv run python ../scripts/generate docs json.py", "check-docs-data": "pnpm run generate-docs-data && git diff --exit-code -- src/generated", "check-deploy-output": "node ./scripts/verify-deploy-output.mjs", "check-redirects": "node ./scripts/validate-redirect-targets.mjs", "build": "astro build", "preview": "astro preview", "astro": "astro" }, "dependencies": { "@astrojs/starlight": "^0.39.2", "@fontsource-variable/inter": "^5.2.8", "@fontsource-variable/roboto-mono": "^5.2.9", "astro": "^6.3.7", "mermaid": "^11.15.0", "rehype-external-links": "^3.0.0", "sharp… 证据：`docs/package.json`
- **Package**（package_manifest）：{ "name": "@invoke-ai/invoke-ai-ui", "private": true, "version": "0.0.1", "publishConfig": { "access": "restricted", "registry": "https://npm.pkg.github.com" }, "main": "./dist/invoke-ai-ui.umd.js", "module": "./dist/invoke-ai-ui.es.js", "exports": { ".": { "import": "./dist/invoke-ai-ui.es.js", "require": "./dist/invoke-ai-ui.umd.js" } }, "types": "./dist/index.d.ts", "files": "dist" , "scripts": { "dev": "vite dev", "dev:host": "vite dev --host", "build": "pnpm run lint && vitest run && vite build", "typegen": "node scripts/typegen.js", "preview": "vite preview", "lint:knip": "knip --tags=-knipignore", "lint:dpdm": "dpdm --no-warning --no-tree --transform --exit-code circular:1 src/main.t… 证据：`invokeai/frontend/web/package.json`
- **Package**（package_manifest）：{ "type": "module", "packageManager": "pnpm@10.12.4" } 证据：`invokeai/frontend/web/scripts/package.json`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`LICENSE`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`invokeai/backend/image_util/basicsr/LICENSE`
- **License**（source_file）：Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files the "Software" , to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 证据：`invokeai/backend/image_util/normal_bae/LICENSE`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`invokeai/backend/image_util/normal_bae/nets/submodules/efficientnet_repo/LICENSE`
- **License**（source_file）：Copyright c 2021, Xintao Wang All rights reserved. 证据：`invokeai/backend/image_util/realesrgan/LICENSE`
- **InvokeAI - A Stable Diffusion Toolkit**（documentation）：InvokeAI - A Stable Diffusion Toolkit 证据：`docker/runpod-readme.md`
- **Goal**（documentation）：CallSavedWorkflowInvocation should become an engine-native workflow call boundary, not a frontend-only dynamic node and not a compile-time graph inliner. 证据：`docs/src/content/docs/contributing/call-saved-workflow.md`
- **Our Pledge**（documentation）：We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 证据：`docs/src/content/docs/contributing/code-of-conduct.md`
- **Original Author**（documentation）：We thank all contributors https://github.com/invoke-ai/InvokeAI/graphs/contributors for their time and hard work! 证据：`docs/src/content/docs/contributing/contributors.md`
- **1 Add a New External Model Existing Provider**（documentation）：1. Adding a new external model most common; existing provider . 2. Adding a brand-new external provider adapter + config + UI wiring . 证据：`docs/src/content/docs/contributing/external-providers.md`
- **Development**（documentation）：Invoke originated as a project built by the community, and that vision carries forward today as we aim to build the best pro-grade tools available. We work together to incorporate the latest in AI/ML research, making these tools available in over 20 languages to artists and creatives around the world as part of our fully permissive OSS project designed for individual users to self-host and use. 证据：`docs/src/content/docs/contributing/index.md`
- **Contributing**（documentation）：InvokeAI uses Weblate https://weblate.org/ for translation. Weblate is a FOSS project providing a scalable translation service. Weblate automates the tedious parts of managing translation of a growing project, and the service is generously provided at no cost to FOSS projects like InvokeAI. 证据：`docs/src/content/docs/contributing/translations.md`
- **Dev environment**（documentation）：Invoke's UI is made possible by many contributors and open-source libraries. Thank you! 证据：`docs/src/content/docs/development/Front End/index.md`
- **Expand Prompt**（documentation）：InvokeAI includes two built-in tools that use local language models to help you write better prompts. Both tools appear as small buttons in the top-right corner of the positive prompt area and are only visible when you have a compatible model installed. 证据：`docs/src/content/docs/features/prompt-tools.md`
- **syntax=docker/dockerfile:1.4**（source_file）：Web UI ------------------------------------ 证据：`docker/Dockerfile`
- **Auth Dependencies**（source_file）：logger = logging.getLogger name ⋮---- security = HTTPBearer auto error=False ⋮---- token = credentials.credentials token data = verify token token ⋮---- user service = ApiDependencies.invoker.services.users user = user service.get token data.user id ⋮---- config = ApiDependencies.invoker.services.configuration ⋮---- CurrentUser = Annotated TokenData, Depends get current user CurrentUserOrDefault = Annotated TokenData, Depends get current user or default AdminUser = Annotated TokenData, Depends require admin AdminUserOrDefault = Annotated TokenData, Depends require admin or default 证据：`invokeai/app/api/auth_dependencies.py`
- **Dependencies**（source_file）：def check internet - bool ⋮---- host = "http://huggingface.co" ⋮---- logger = InvokeAILogger.get logger ⋮---- class ApiDependencies ⋮---- invoker: Invoker ⋮---- output folder = config.outputs path ⋮---- image files = DiskImageFileStorage f"{output folder}/images" ⋮---- model images folder = config.models path style presets folder = config.style presets path workflow thumbnails folder = config.workflow thumbnails path ⋮---- db = init db config=config, logger=logger, image files=image files ⋮---- app settings = AppSettingsService db=db jwt secret = app settings.get jwt secret ⋮---- configuration = config logger = logger ⋮---- board image records = SqliteBoardImageRecordStorage db=db board ima… 证据：`invokeai/app/api/dependencies.py`
- **We expect the workflow, if embedded in the image, to be a JSON-stringified WorkflowWithoutID. We will store it**（source_file）：@dataclass class ExtractedMetadata ⋮---- invokeai metadata: str None invokeai workflow: str None invokeai graph: str None ⋮---- stringified metadata: str None = None ⋮---- metadata raw = ⋮---- metadata parsed = json.loads metadata raw ⋮---- stringified metadata = metadata raw ⋮---- We expect the workflow, if embedded in the image, to be a JSON-stringified WorkflowWithoutID. We will store it as a string. workflow raw: str None = ⋮---- stringified workflow: str None = None ⋮---- stringified workflow = workflow raw ⋮---- graph raw: str None = ⋮---- stringified graph: str None = None ⋮---- graph parsed = json.loads graph raw ⋮---- stringified graph = graph raw 证据：`invokeai/app/api/extract_metadata_from_image.py`
- **No Cache Staticfiles**（source_file）：class NoCacheStaticFiles StaticFiles ⋮---- def init self, args: Any, kwargs: Any ⋮---- def file response self, args: Any, kwargs: Any - Response ⋮---- resp = super .file response args, kwargs ⋮---- async def get response self, path: str, scope: Scope - Response 证据：`invokeai/app/api/no_cache_staticfiles.py`
- **Access**（source_file）：def assert image owner image name: str, current user: CurrentUserOrDefault - None ⋮---- owner = ApiDependencies.invoker.services.image records.get user id image name ⋮---- board id = ApiDependencies.invoker.services.board image records.get board for image image name ⋮---- board = ApiDependencies.invoker.services.boards.get dto board id=board id ⋮---- def assert image read access image name: str, current user: CurrentUserOrDefault - None ⋮---- def assert board read access board id: str, current user: CurrentUserOrDefault - None 证据：`invokeai/app/api/routers/_access.py`
- **App Info**（source_file）：class LogLevel int, Enum ⋮---- NotSet = logging.NOTSET Debug = logging.DEBUG Info = logging.INFO Warning = logging.WARNING Error = logging.ERROR Critical = logging.CRITICAL ⋮---- app router = APIRouter prefix="/v1/app", tags= "app" ⋮---- class AppVersion BaseModel ⋮---- version: str = Field description="App version" ⋮---- @app router.get "/version", operation id="app version", status code=200, response model=AppVersion async def get version - AppVersion ⋮---- @app router.get "/app deps", operation id="get app deps", status code=200, response model=dict str, str async def get app deps current user: CurrentUserOrDefault - dict str, str ⋮---- deps: dict str, str = {dist.metadata "Name" : dist.… 证据：`invokeai/app/api/routers/app_info.py`
- **Check context embedder txt in dimensions**（source_file）：DEFAULT LORA WEIGHT SLIDER MIN = -1.0 DEFAULT LORA WEIGHT SLIDER MAX = 2.0 ⋮---- class LoraModelDefaultSettings BaseModel ⋮---- weight: float None = Field default=None, description="Default weight for this model" weight min: float None = Field default=None, description="Minimum weight slider value for this model" weight max: float None = Field default=None, description="Maximum weight slider value for this model" model config = ConfigDict extra="forbid" ⋮---- @model validator mode="after" def validate weight bounds self - "LoraModelDefaultSettings" ⋮---- effective min = self.weight min if self.weight min is not None else DEFAULT LORA WEIGHT SLIDER MIN effective max = self.weight max if self… 证据：`invokeai/backend/model_manager/configs/lora.py`
- **Currently, we don't apply any conversions for SD1 and SD2 LoRA models.**（source_file）：@ModelLoaderRegistry.register base=BaseModelType.Flux, type=ModelType.LoRA, format=ModelFormat.OMI @ModelLoaderRegistry.register base=BaseModelType.StableDiffusionXL, type=ModelType.LoRA, format=ModelFormat.OMI @ModelLoaderRegistry.register base=BaseModelType.Any, type=ModelType.LoRA, format=ModelFormat.Diffusers @ModelLoaderRegistry.register base=BaseModelType.Any, type=ModelType.LoRA, format=ModelFormat.LyCORIS @ModelLoaderRegistry.register base=BaseModelType.Flux, type=ModelType.ControlLoRa, format=ModelFormat.LyCORIS @ModelLoaderRegistry.register base=BaseModelType.Flux, type=ModelType.ControlLoRa, format=ModelFormat.Diffusers class LoRALoader ModelLoader ⋮---- model path = Path config.… 证据：`invokeai/backend/model_manager/load/model_loaders/lora.py`
- **Convert Flux Lora**（source_file）：def map double transformer block key prefix: LoraConversionKeySet - list LoraConversionKeySet ⋮---- keys = ⋮---- def map single transformer block key prefix: LoraConversionKeySet - list LoraConversionKeySet ⋮---- def map transformer key prefix: LoraConversionKeySet - list LoraConversionKeySet ⋮---- def convert flux lora key sets - list LoraConversionKeySet 证据：`invokeai/backend/model_manager/omi/vendor/convert/lora/convert_flux_lora.py`
- **Convert Sdxl Lora**（source_file）：def map unet resnet block key prefix: LoraConversionKeySet - list LoraConversionKeySet ⋮---- keys = ⋮---- def map unet attention block key prefix: LoraConversionKeySet - list LoraConversionKeySet ⋮---- def map unet down blocks key prefix: LoraConversionKeySet - list LoraConversionKeySet ⋮---- def map unet mid block key prefix: LoraConversionKeySet - list LoraConversionKeySet ⋮---- def map unet up block key prefix: LoraConversionKeySet - list LoraConversionKeySet ⋮---- def map unet key prefix: LoraConversionKeySet - list LoraConversionKeySet ⋮---- def convert sdxl lora key sets - list LoraConversionKeySet 证据：`invokeai/backend/model_manager/omi/vendor/convert/lora/convert_sdxl_lora.py`
- **Lora**（source_file）：class LoRAExt ExtensionBase ⋮---- @contextmanager def patch unet self, unet: UNet2DConditionModel, original weights: OriginalWeightsStorage ⋮---- lora model = self. node context.models.load self. model id .model 证据：`invokeai/backend/stable_diffusion/extensions/lora.py`
- **App**（source_file）：import { Box, Center, Spinner } from '@invoke-ai/ui-library'; import { useStore } from '@nanostores/react'; import { GlobalHookIsolator } from 'app/components/GlobalHookIsolator'; import { GlobalModalIsolator } from 'app/components/GlobalModalIsolator'; import { clearStorage } from 'app/store/enhancers/reduxRemember/driver'; import Loading from 'common/components/Loading/Loading'; import { AdministratorSetup } from 'features/auth/components/AdministratorSetup'; import { LoginPage } from 'features/auth/components/LoginPage'; import { ProtectedRoute } from 'features/auth/components/ProtectedRoute'; import { UserManagement } from 'features/auth/components/UserManagement'; import { UserProfile… 证据：`invokeai/frontend/web/src/app/components/App.tsx`
- **Apperrorboundaryfallback**（source_file）：import { Button, Flex, Heading, Image, Link, Text } from '@invoke-ai/ui-library'; import { useClipboard } from 'common/hooks/useClipboard'; import { toast } from 'features/toast/toast'; import newGithubIssueUrl from 'new-github-issue-url'; import InvokeLogoYellow from 'public/assets/images/invoke-symbol-ylw-lrg.svg'; import { memo, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { PiArrowCounterClockwiseBold, PiArrowSquareOutBold, PiCopyBold } from 'react-icons/pi'; import { serializeError } from 'serialize-error'; ⋮---- type Props = { error: Error; resetErrorBoundary: = void; }; 证据：`invokeai/frontend/web/src/app/components/AppErrorBoundaryFallback.tsx`
- **Globalhookisolator**（source_file）：import { useGlobalModifiersInit } from '@invoke-ai/ui-library'; import { setupListeners } from '@reduxjs/toolkit/query'; import { useSyncFaviconQueueStatus } from 'app/hooks/useSyncFaviconQueueStatus'; import { useSyncLangDirection } from 'app/hooks/useSyncLangDirection'; import { useSyncLoggingConfig } from 'app/logging/useSyncLoggingConfig'; import { appStarted } from 'app/store/middleware/listenerMiddleware/listeners/appStarted'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { useFocusRegionWatcher } from 'common/hooks/focus'; import { useCloseChakraTooltipsOnDragFix } from 'common/hooks/useCloseChakraTooltipsOnDragFix'; import { useGlobalHotkeys } from 'c… 证据：`invokeai/frontend/web/src/app/components/GlobalHookIsolator.tsx`
- **Globalimagehotkeys**（source_file）：import { useAppSelector } from 'app/store/storeHooks'; import { useIsRegionFocused } from 'common/hooks/focus'; import { useAssertSingleton } from 'common/hooks/useAssertSingleton'; import { useLoadWorkflow } from 'features/gallery/hooks/useLoadWorkflow'; import { useRecallAll } from 'features/gallery/hooks/useRecallAllImageMetadata'; import { useRecallDimensions } from 'features/gallery/hooks/useRecallDimensions'; import { useRecallPrompts } from 'features/gallery/hooks/useRecallPrompts'; import { useRecallRemix } from 'features/gallery/hooks/useRecallRemix'; import { useRecallSeed } from 'features/gallery/hooks/useRecallSeed'; import { selectLastSelectedItem } from 'features/gallery/store… 证据：`invokeai/frontend/web/src/app/components/GlobalImageHotkeys.tsx`
- **Globalmodalisolator**（source_file）：import { GlobalImageHotkeys } from 'app/components/GlobalImageHotkeys'; import ChangeBoardModal from 'features/changeBoardModal/components/ChangeBoardModal'; import { CanvasPasteModal } from 'features/controlLayers/components/CanvasPasteModal'; import { CanvasWorkflowIntegrationModal } from 'features/controlLayers/components/CanvasWorkflowIntegration/CanvasWorkflowIntegrationModal'; import { LoadCanvasProjectConfirmationAlertDialog } from 'features/controlLayers/components/LoadCanvasProjectConfirmationAlertDialog'; import { SaveCanvasProjectDialog } from 'features/controlLayers/components/SaveCanvasProjectDialog'; import { CanvasManagerProviderGate } from 'features/controlLayers/contexts/Ca… 证据：`invokeai/frontend/web/src/app/components/GlobalModalIsolator.tsx`
- **Invokeaiui**（source_file）：import { configureLogging } from 'app/logging/logger'; import { addStorageListeners } from 'app/store/enhancers/reduxRemember/driver'; import { $store } from 'app/store/nanostores/store'; import { createStore } from 'app/store/store'; import Loading from 'common/components/Loading/Loading'; import { getBasePath } from 'common/util/baseUrl'; import React, { lazy, useEffect, useState } from 'react'; import { Provider } from 'react-redux'; import { BrowserRouter } from 'react-router-dom'; ⋮---- const InvokeAIUI = = 证据：`invokeai/frontend/web/src/app/components/InvokeAIUI.tsx`
- **Useinvokecanvas**（source_file）：import { useStore } from '@nanostores/react'; import { logger } from 'app/logging/logger'; import { useAppStore } from 'app/store/storeHooks'; import { useAssertSingleton } from 'common/hooks/useAssertSingleton'; import { CanvasManager } from 'features/controlLayers/konva/CanvasManager'; import { $canvasManager } from 'features/controlLayers/store/ephemeral'; import Konva from 'konva'; import { useLayoutEffect, useState } from 'react'; import { $socket } from 'services/events/stores'; import { useDevicePixelRatio } from 'use-device-pixel-ratio'; ⋮---- const useKonvaPixelRatioWatcher = = ⋮---- export const useInvokeCanvas = : el: HTMLDivElement null = void = 证据：`invokeai/frontend/web/src/features/controlLayers/hooks/useInvokeCanvas.ts`
- **Editor**（source_file）：import { TRANSPARENCY CHECKERBOARD PATTERN DARK DATAURL } from 'features/controlLayers/konva/patterns/transparency-checkerboard-pattern'; import Konva from 'konva'; import type { KonvaEventObject } from 'konva/lib/Node'; import { objectEntries } from 'tsafe'; ⋮---- export type CropBox = { x: number; y: number; width: number; height: number; }; ⋮---- type EditorCallbacks = { onCropBoxChange: Set = void ; onAspectRatioChange: Set void ; onZoomChange: Set void ; }; ⋮---- type HandleName = 'top-left' 'top-right' 'bottom-right' 'bottom-left' 'top' 'right' 'bottom' 'left'; ⋮---- type GuideName = 'left' 'right' 'top' 'bottom'; ⋮---- type KonvaObjects = { stage: Konva.Stage; bg: { layer: Konva.Laye… 证据：`invokeai/frontend/web/src/features/cropper/lib/editor.ts`
- **Useenqueuecanvas**（source_file）：import type { AlertStatus } from '@invoke-ai/ui-library'; import { logger } from 'app/logging/logger'; import type { AppStore } from 'app/store/store'; import { useAppStore } from 'app/store/storeHooks'; import { extractMessageFromAssertionError } from 'common/util/extractMessageFromAssertionError'; import { withResult, withResultAsync } from 'common/util/result'; import { useCanvasManagerSafe } from 'features/controlLayers/contexts/CanvasManagerProviderGate'; import type { CanvasManager } from 'features/controlLayers/konva/CanvasManager'; import { positivePromptAddedToHistory, selectNegativePrompt, selectPositivePrompt, } from 'features/controlLayers/store/paramsSlice'; import type { BaseM… 证据：`invokeai/frontend/web/src/features/queue/hooks/useEnqueueCanvas.ts`
- 其余 19 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`docs/README.md`, `README.md`, `docker/README.md`
- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`docs/README.md`, `README.md`, `docker/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, docker/Dockerfile, docker/README.md, invokeai/app/invocations/custom_nodes/README.md, invokeai/app/services/shared/README.md
- **Lib 模块**：importance `high`
  - source_paths: invokeai/frontend/web/src/features/cropper/lib/editor.ts
- **Api 模块**：importance `high`
  - source_paths: invokeai/app/api/auth_dependencies.py, invokeai/app/api/dependencies.py, invokeai/app/api/extract_metadata_from_image.py, invokeai/app/api/no_cache_staticfiles.py, invokeai/app/api/routers/_access.py
- **App 模块**：importance `high`
  - source_paths: invokeai/frontend/web/src/app/components/App.tsx, invokeai/frontend/web/src/app/components/AppErrorBoundaryFallback.tsx, invokeai/frontend/web/src/app/components/GlobalHookIsolator.tsx, invokeai/frontend/web/src/app/components/GlobalImageHotkeys.tsx, invokeai/frontend/web/src/app/components/GlobalModalIsolator.tsx

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `68b90174aafebbbba45d14b049fb6852271c76a8`
- inspected_files: `README.md`, `pyproject.toml`, `uv.lock`, `docs/README.md`, `docs/invoke-config.json`, `docs/package.json`, `docs/pnpm-lock.yaml`, `docs/pnpm-workspace.yaml`, `docs/src/config/head.ts`, `docs/src/config/index.ts`, `docs/src/config/redirects.ts`, `docs/src/config/sidebar.ts`, `docs/src/config/social.ts`, `docs/src/content/docs/concepts/diffusion.mdx`, `docs/src/content/docs/concepts/dynamic-prompting.mdx`, `docs/src/content/docs/concepts/image-generation.mdx`, `docs/src/content/docs/concepts/models.mdx`, `docs/src/content/docs/concepts/nodes-workflows.mdx`, `docs/src/content/docs/concepts/parameters.mdx`, `docs/src/content/docs/concepts/prompt-syntax.mdx`

宿主 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: 来源证据：[bug]: Add support for ROCm version for gfx1151 (Rocm >= 6.4)

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[bug]: Add support for ROCm version for gfx1151 (Rocm >= 6.4)
- Why it matters: 可能阻塞安装或首次运行。
- Evidence: community_evidence:github | https://github.com/invoke-ai/InvokeAI/issues/8655 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 来源证据：[bug]: Launcher crashes on startup with breakpoint exception (0x80000003) on systems with NVIDIA RTX 50-series (Blackwe…

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[bug]: Launcher crashes on startup with breakpoint exception (0x80000003) on systems with NVIDIA RTX 50-series (Blackwell) GPUs
- Why it matters: 可能阻塞安装或首次运行。
- Evidence: community_evidence:github | https://github.com/invoke-ai/InvokeAI/issues/9164 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 来源证据：[bug]: Move node's selected text hangs/crash the web interface UI

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[bug]: Move node's selected text hangs/crash the web interface UI
- Why it matters: 可能阻塞安装或首次运行。
- Evidence: community_evidence:github | https://github.com/invoke-ai/InvokeAI/issues/9285 | 来源讨论提到 node 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 来源证据：[bug]: PatchMatch fails to load due to libtiff/libjpeg ABI mismatch (jpeg12_* unresolved at runtime)

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[bug]: PatchMatch fails to load due to libtiff/libjpeg ABI mismatch (jpeg12_* unresolved at runtime)
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/invoke-ai/InvokeAI/issues/9287 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 来源证据：[bug]: Z-Image Turbo Generation Does Not Work Without Internet Access

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[bug]: Z-Image Turbo Generation Does Not Work Without Internet Access
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/invoke-ai/InvokeAI/issues/9031 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: 失败模式：security_permissions: [bug]: PatchMatch fails to load due to libtiff/libjpeg ABI mismatch (jpeg12_* unresolved at r...

- Trigger: Developers should check this security_permissions risk before relying on the project: [bug]: PatchMatch fails to load due to libtiff/libjpeg ABI mismatch (jpeg12_* unresolved at runtime)
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: [bug]: PatchMatch fails to load due to libtiff/libjpeg ABI mismatch (jpeg12_* unresolved at runtime). Context: Observed when using python, linux, cuda
- Why it matters: Developers may expose sensitive permissions or credentials: [bug]: PatchMatch fails to load due to libtiff/libjpeg ABI mismatch (jpeg12_* unresolved at runtime)
- Evidence: failure_mode_cluster:github_issue | https://github.com/invoke-ai/InvokeAI/issues/9287 | [bug]: PatchMatch fails to load due to libtiff/libjpeg ABI mismatch (jpeg12_* unresolved at runtime)
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 7: 来源证据：[bug]: Inpainting mask ignored with SDXL model

- Trigger: GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[bug]: Inpainting mask ignored with SDXL model
- Why it matters: 可能影响升级、迁移或版本选择。
- Evidence: community_evidence:github | https://github.com/invoke-ai/InvokeAI/issues/9268 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 8: 失败模式：installation: InvokeAI 6.13.0

- Trigger: Developers should check this installation risk before relying on the project: InvokeAI 6.13.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: InvokeAI 6.13.0. Context: Observed during installation or first-run setup.
- Why it matters: Upgrade or migration may change expected behavior: InvokeAI 6.13.0
- Evidence: failure_mode_cluster:github_release | https://github.com/invoke-ai/InvokeAI/releases/tag/v6.13.0 | InvokeAI 6.13.0
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 9: 失败模式：installation: Version 6.13.0.rc2

- Trigger: Developers should check this installation risk before relying on the project: Version 6.13.0.rc2
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Version 6.13.0.rc2. Context: Observed during installation or first-run setup.
- Why it matters: Upgrade or migration may change expected behavior: Version 6.13.0.rc2
- Evidence: failure_mode_cluster:github_release | https://github.com/invoke-ai/InvokeAI/releases/tag/v6.13.0.rc2 | Version 6.13.0.rc2
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 10: 失败模式：installation: Version 6.13.0.rc3

- Trigger: Developers should check this installation risk before relying on the project: Version 6.13.0.rc3
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Version 6.13.0.rc3. Context: Observed during installation or first-run setup.
- Why it matters: Upgrade or migration may change expected behavior: Version 6.13.0.rc3
- Evidence: failure_mode_cluster:github_release | https://github.com/invoke-ai/InvokeAI/releases/tag/v6.13.0.rc3 | Version 6.13.0.rc3
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
