{
  "canonical_name": "Comfy-Org/ComfyUI",
  "compilation_id": "pack_427e516aba2847928d74a49585143420",
  "created_at": "2026-05-15T20:19:00.444633+00:00",
  "created_by": "project-pack-compiler",
  "feedback": {
    "carrier_selection_notes": [
      "viable_asset_types=skill, recipe, host_instruction, eval, preflight",
      "recommended_asset_types=skill, recipe, host_instruction, eval, preflight"
    ],
    "evidence_delta": {
      "confirmed_claims": [
        "identity_anchor_present",
        "capability_and_host_targets_present",
        "install_path_declared_or_better"
      ],
      "missing_required_fields": [],
      "must_verify_forwarded": [
        "Run or inspect `pip install comfy-cli` in an isolated environment.",
        "Confirm the project exposes the claimed capability to at least one target host."
      ],
      "quickstart_execution_scope": "allowlisted_sandbox_smoke",
      "sandbox_command": "pip install comfy-cli",
      "sandbox_container_image": "python:3.12-slim",
      "sandbox_execution_backend": "docker",
      "sandbox_planner_decision": "llm_execute_isolated_install",
      "sandbox_validation_id": "sbx_d4732d4b4f944a5da71dea9dfe6143ad"
    },
    "feedback_event_type": "project_pack_compilation_feedback",
    "learning_candidate_reasons": [],
    "template_gaps": []
  },
  "identity": {
    "canonical_id": "project_005353b8855158caae3603cdacd6ee79",
    "canonical_name": "Comfy-Org/ComfyUI",
    "homepage_url": null,
    "license": "unknown",
    "repo_url": "https://github.com/Comfy-Org/ComfyUI",
    "slug": "comfyui",
    "source_packet_id": "phit_9d361299c3a941ec954db32c9ab3c987",
    "source_validation_id": "dval_00da00e89ada4d49b6f4c6a99d6e7b1b"
  },
  "merchandising": {
    "best_for": "需要视觉与多媒体创作能力，并使用 local_cli的用户",
    "github_forks": 13103,
    "github_stars": 112155,
    "one_liner_en": "The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.",
    "one_liner_zh": "The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.",
    "primary_category": {
      "category_id": "visual-media",
      "confidence": "high",
      "name_en": "Visual & Media Creation",
      "name_zh": "视觉与多媒体创作",
      "reason": "curated popular coverage category matched project identity"
    },
    "target_user": "使用 local_cli 等宿主 AI 的用户",
    "title_en": "ComfyUI",
    "title_zh": "ComfyUI 能力包",
    "visible_tags": [
      {
        "label_en": "Browser Agents",
        "label_zh": "浏览器 Agent",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "product_domain-browser-agents",
        "type": "product_domain"
      },
      {
        "label_en": "Web Task Automation",
        "label_zh": "网页任务自动化",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "user_job-web-task-automation",
        "type": "user_job"
      },
      {
        "label_en": "Browser Automation",
        "label_zh": "浏览器自动化",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "core_capability-browser-automation",
        "type": "core_capability"
      },
      {
        "label_en": "Checkpoint Resume",
        "label_zh": "断点恢复流程",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "workflow_pattern-checkpoint-resume",
        "type": "workflow_pattern"
      },
      {
        "label_en": "Evaluation Suite",
        "label_zh": "评测体系",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "selection_signal-evaluation-suite",
        "type": "selection_signal"
      }
    ]
  },
  "packet_id": "phit_9d361299c3a941ec954db32c9ab3c987",
  "page_model": {
    "artifacts": {
      "artifact_slug": "comfyui",
      "files": [
        "PROJECT_PACK.json",
        "QUICK_START.md",
        "PROMPT_PREVIEW.md",
        "HUMAN_MANUAL.md",
        "AI_CONTEXT_PACK.md",
        "BOUNDARY_RISK_CARD.md",
        "PITFALL_LOG.md",
        "REPO_INSPECTION.json",
        "REPO_INSPECTION.md",
        "CAPABILITY_CONTRACT.json",
        "EVIDENCE_INDEX.json",
        "CLAIM_GRAPH.json"
      ],
      "required_files": [
        "PROJECT_PACK.json",
        "QUICK_START.md",
        "PROMPT_PREVIEW.md",
        "HUMAN_MANUAL.md",
        "AI_CONTEXT_PACK.md",
        "BOUNDARY_RISK_CARD.md",
        "PITFALL_LOG.md",
        "REPO_INSPECTION.json"
      ]
    },
    "detail": {
      "capability_source": "Project Hit Packet + DownstreamValidationResult",
      "commands": [
        {
          "command": "pip install comfy-cli",
          "label": "Python / pip · 官方安装入口",
          "source": "https://github.com/Comfy-Org/ComfyUI#readme",
          "verified": true
        }
      ],
      "display_tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "浏览器自动化",
        "断点恢复流程",
        "评测体系"
      ],
      "eyebrow": "视觉与多媒体创作",
      "glance": [
        {
          "body": "判断自己是不是目标用户。",
          "label": "最适合谁",
          "value": "需要视觉与多媒体创作能力，并使用 local_cli的用户"
        },
        {
          "body": "先理解能力边界，再决定是否继续。",
          "label": "核心价值",
          "value": "The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface."
        },
        {
          "body": "未完成验证前保持审慎。",
          "label": "继续前",
          "value": "publish to Doramagic.ai project surfaces"
        }
      ],
      "guardrail_source": "Boundary & Risk Card",
      "guardrails": [
        {
          "body": "Prompt Preview 只展示流程，不证明项目已安装或运行。",
          "label": "Check 1",
          "value": "不要把试用当真实运行"
        },
        {
          "body": "local_cli",
          "label": "Check 2",
          "value": "确认宿主兼容"
        },
        {
          "body": "publish to Doramagic.ai project surfaces",
          "label": "Check 3",
          "value": "先隔离验证"
        }
      ],
      "mode": "skill, recipe, host_instruction, eval, preflight",
      "pitfall_log": {
        "items": [
          {
            "body": "仓库名 `comfyui` 与安装入口 `comfy-cli` 不完全一致。",
            "category": "身份坑",
            "evidence": [
              "identity.distribution | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | repo=comfyui; install=comfy-cli"
            ],
            "severity": "medium",
            "suggested_check": "在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。",
            "title": "仓库名和安装名不一致",
            "user_impact": "用户照着仓库名搜索包或照着包名找仓库时容易走错入口。"
          },
          {
            "body": "README/documentation is current enough for a first validation pass.",
            "category": "能力坑",
            "evidence": [
              "capability.assumptions | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | README/documentation is current enough for a first validation pass."
            ],
            "severity": "medium",
            "suggested_check": "将假设转成下游验证清单。",
            "title": "能力判断依赖假设",
            "user_impact": "假设不成立时，用户拿不到承诺的能力。"
          },
          {
            "body": "未记录 last_activity_observed。",
            "category": "维护坑",
            "evidence": [
              "evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | last_activity_observed missing"
            ],
            "severity": "medium",
            "suggested_check": "补 GitHub 最近 commit、release、issue/PR 响应信号。",
            "title": "维护活跃度未知",
            "user_impact": "新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。"
          },
          {
            "body": "no_demo",
            "category": "安全/权限坑",
            "evidence": [
              "downstream_validation.risk_items | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | no_demo; severity=medium"
            ],
            "severity": "medium",
            "suggested_check": "进入安全/权限治理复核队列。",
            "title": "下游验证发现风险项",
            "user_impact": "下游已经要求复核，不能在页面中弱化。"
          },
          {
            "body": "no_demo",
            "category": "安全/权限坑",
            "evidence": [
              "risks.scoring_risks | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | no_demo; severity=medium"
            ],
            "severity": "medium",
            "suggested_check": "把风险写入边界卡，并确认是否需要人工复核。",
            "title": "存在评分风险",
            "user_impact": "风险会影响是否适合普通用户安装。"
          },
          {
            "body": "issue_or_pr_quality=unknown。",
            "category": "维护坑",
            "evidence": [
              "evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | issue_or_pr_quality=unknown"
            ],
            "severity": "low",
            "suggested_check": "抽样最近 issue/PR，判断是否长期无人处理。",
            "title": "issue/PR 响应质量未知",
            "user_impact": "用户无法判断遇到问题后是否有人维护。"
          },
          {
            "body": "release_recency=unknown。",
            "category": "维护坑",
            "evidence": [
              "evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | release_recency=unknown"
            ],
            "severity": "low",
            "suggested_check": "确认最近 release/tag 和 README 安装命令是否一致。",
            "title": "发布节奏不明确",
            "user_impact": "安装命令和文档可能落后于代码，用户踩坑概率升高。"
          }
        ],
        "source": "ProjectPitfallLog + ProjectHitPacket + validation + community signals",
        "summary": "发现 7 个潜在踩坑项，其中 0 个为 high/blocking；最高优先级：身份坑 - 仓库名和安装名不一致。",
        "title": "踩坑日志"
      },
      "snapshot": {
        "contributors": 308,
        "forks": 13103,
        "license": "unknown",
        "note": "站点快照，非实时质量证明；用于开工前背景判断。",
        "stars": 112155
      },
      "source_url": "https://github.com/Comfy-Org/ComfyUI",
      "steps": [
        {
          "body": "不安装项目，先体验能力节奏。",
          "code": "preview",
          "title": "先试 Prompt"
        },
        {
          "body": "理解输入、输出、失败模式和边界。",
          "code": "manual",
          "title": "读说明书"
        },
        {
          "body": "把上下文交给宿主 AI 继续工作。",
          "code": "context",
          "title": "带给 AI"
        },
        {
          "body": "进入主力环境前先完成安装入口与风险边界验证。",
          "code": "verify",
          "title": "沙箱验证"
        }
      ],
      "subtitle": "The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.",
      "title": "ComfyUI 能力包",
      "trial_prompt": "# ComfyUI - Prompt Preview\n\n> Copy the prompt below into your AI host before installing anything.\n> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.\n\n## Copy this prompt\n\n```text\nYou are using an independent Doramagic capability pack for Comfy-Org/ComfyUI.\n\nProject:\n- Name: ComfyUI\n- Repository: https://github.com/Comfy-Org/ComfyUI\n- Summary: The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.\n- Host target: local_cli\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.\n\nBefore taking action:\n1. Restate my task, success standard, and boundary.\n2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.\n3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.\n4. If a real command, install step, API call, file write, or host integration is required, mark it as \"requires post-install verification\" and ask for approval first.\n5. If evidence is missing, say \"evidence is missing\" instead of filling the gap.\n\nPreviewable capabilities:\n- Capability 1: The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. page-introduction: Introduction to ComfyUI. Produce one small intermediate artifact and wait for confirmation.\n2. page-installation: Installation Guide. Produce one small intermediate artifact and wait for confirmation.\n3. page-architecture: System Architecture. Produce one small intermediate artifact and wait for confirmation.\n4. page-server-system: Server System. Produce one small intermediate artifact and wait for confirmation.\n5. page-execution-engine: Execution Engine. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/Comfy-Org/ComfyUI\n- https://github.com/Comfy-Org/ComfyUI#readme\n- README.md\n- main.py\n- requirements.txt\n- extra_model_paths.yaml.example\n- manager_requirements.txt\n- server.py\n- execution.py\n- comfy/options.py\n\nFirst response rules:\n1. Start Step 1 only.\n2. Explain the one service action you will perform first.\n3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.\n4. Stop and wait for my answers.\n\nStep 1 follow-up protocol:\n- After I answer the first three questions, stay in Step 1.\n- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.\n- End by asking whether I confirm the recommendation.\n- Do not move to Step 2 until I explicitly confirm.\n\nConversation rules:\n- Advance one step at a time and wait for confirmation after each small artifact.\n- Write outputs as recommendations or planned checks, not as completed execution.\n- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.\n- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.\n```\n",
      "voices": [
        {
          "body": "来源平台：github。github/github_issue: lora key not loaded anima（https://github.com/Comfy-Org/ComfyUI/issues/13747）；github/github_issue: New Memory Managment is a Disaster for me. OOM on my Lora Trainer WF whe（https://github.com/Comfy-Org/ComfyUI/issues/13458）；github/github_issue: Launch args to run LTX?（https://github.com/Comfy-Org/ComfyUI/issues/13217）；github/github_issue: Missing \"CosmosImageToVideoLatent\" node（https://github.com/Comfy-Org/ComfyUI/issues/6526）；github/github_issue: Please remove from Manager: ComfyUI-WhisperXX, it nukes the install.（https://github.com/Comfy-Org/ComfyUI/issues/13825）；github/github_issue: Segmentation fault（https://github.com/Comfy-Org/ComfyUI/issues/11369）；github/github_issue: impossible to drag and drop the workflow to the comfyui web interface.（https://github.com/Comfy-Org/ComfyUI/issues/13729）；github/github_issue: RuntimeError: Tensors must have same number of dimensions: got 4 and 3（https://github.com/Comfy-Org/ComfyUI/issues/13821）；github/github_release: v0.20.1（https://github.com/Comfy-Org/ComfyUI/releases/tag/v0.20.1）；github/github_release: v0.19.3（https://github.com/Comfy-Org/ComfyUI/releases/tag/v0.19.3）；github/github_release: v0.19.2（https://github.com/Comfy-Org/ComfyUI/releases/tag/v0.19.2）；github/github_release: v0.19.1（https://github.com/Comfy-Org/ComfyUI/releases/tag/v0.19.1）。这些是项目级外部声音，不作为单独质量证明。",
          "items": [
            {
              "kind": "github_issue",
              "source": "github",
              "title": "lora key not loaded anima",
              "url": "https://github.com/Comfy-Org/ComfyUI/issues/13747"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "New Memory Managment is a Disaster for me. OOM on my Lora Trainer WF whe",
              "url": "https://github.com/Comfy-Org/ComfyUI/issues/13458"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Launch args to run LTX?",
              "url": "https://github.com/Comfy-Org/ComfyUI/issues/13217"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Missing \"CosmosImageToVideoLatent\" node",
              "url": "https://github.com/Comfy-Org/ComfyUI/issues/6526"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Please remove from Manager: ComfyUI-WhisperXX, it nukes the install.",
              "url": "https://github.com/Comfy-Org/ComfyUI/issues/13825"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Segmentation fault",
              "url": "https://github.com/Comfy-Org/ComfyUI/issues/11369"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "impossible to drag and drop the workflow to the comfyui web interface.",
              "url": "https://github.com/Comfy-Org/ComfyUI/issues/13729"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "RuntimeError: Tensors must have same number of dimensions: got 4 and 3",
              "url": "https://github.com/Comfy-Org/ComfyUI/issues/13821"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v0.20.1",
              "url": "https://github.com/Comfy-Org/ComfyUI/releases/tag/v0.20.1"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v0.19.3",
              "url": "https://github.com/Comfy-Org/ComfyUI/releases/tag/v0.19.3"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v0.19.2",
              "url": "https://github.com/Comfy-Org/ComfyUI/releases/tag/v0.19.2"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v0.19.1",
              "url": "https://github.com/Comfy-Org/ComfyUI/releases/tag/v0.19.1"
            }
          ],
          "status": "已收录 13 条来源",
          "title": "社区讨论"
        }
      ]
    },
    "homepage_card": {
      "category": "视觉与多媒体创作",
      "desc": "The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.",
      "effort": "安装已验证",
      "forks": 13103,
      "icon": "image",
      "name": "ComfyUI 能力包",
      "risk": "可发布",
      "slug": "comfyui",
      "stars": 112155,
      "tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "浏览器自动化",
        "断点恢复流程",
        "评测体系"
      ],
      "thumb": "pink",
      "type": "Skill Pack"
    },
    "manual": {
      "markdown": "# https://github.com/Comfy-Org/ComfyUI 项目说明书\n\n生成时间：2026-05-15 19:52:25 UTC\n\n## 目录\n\n- [Introduction to ComfyUI](#page-introduction)\n- [Installation Guide](#page-installation)\n- [System Architecture](#page-architecture)\n- [Server System](#page-server-system)\n- [Execution Engine](#page-execution-engine)\n- [Graph Management](#page-graph-management)\n- [Model Loading and Detection](#page-model-loading)\n- [Diffusion Models](#page-diffusion-models)\n- [Text Processing and Encoders](#page-text-processing)\n- [Memory Management](#page-memory-management)\n\n<a id='page-introduction'></a>\n\n## Introduction to ComfyUI\n\n### 相关页面\n\n相关主题：[Installation Guide](#page-installation), [System Architecture](#page-architecture)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n- [comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n- [app/user_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n- [app/model_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/model_manager.py)\n- [app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n- [api_server/routes/internal/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/api_server/routes/internal/README.md)\n</details>\n\n# Introduction to ComfyUI\n\n## Overview\n\nComfyUI is a powerful, modular AI creation engine designed for visual professionals who demand precise control over every model, parameter, and output. It provides a node graph-based interface that enables users to generate images, videos, 3D models, audio, and other AI-driven content with granular control over the entire generation pipeline.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Key Characteristics\n\n| Characteristic | Description |\n|----------------|-------------|\n| **Type** | AI Generation Engine |\n| **Interface** | Node Graph / Visual Programming |\n| **License** | Open Source |\n| **Platforms** | Windows, Linux, macOS, Cloud |\n| **GPU Support** | NVIDIA, AMD (ROCm), Intel, Apple Silicon, Ascend, Iluvatar |\n\nComfyUI natively supports the latest open-source state-of-the-art models and provides API nodes for accessing closed-source models such as Seedance, Hunyuan3D, and others through the online Comfy API.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Core Features\n\n### Model Support\n\nComfyUI provides extensive support for various AI model types:\n\n| Model Category | Examples | Documentation Link |\n|----------------|----------|---------------------|\n| **Stable Diffusion** | SD 1.x, SD 2.x, SDXL, SD 3.x | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/) |\n| **ControlNet/T2I-Adapter** | Various preprocessors | [ControlNet Guide](https://comfyanonymous.github.io/ComfyUI_examples/controlnet/) |\n| **LoRA/LyCORIS** | Regular, locon, loha variants | [LoRA Guide](https://comfyanonymous.github.io/ComfyUI_examples/lora/) |\n| **Upscaling Models** | ESRGAN, SwinIR, Swin2SR | [Upscale Guide](https://comfyanonymous.github.io/ComfyUI_examples/upscale_models/) |\n| **Latent Models** | LCM models and Loras | [LCM Guide](https://comfyanonymous.github.io/ComfyUI_examples/lcm/) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Advanced Capabilities\n\n- **Textual Inversion & Hypernetworks**: Advanced embedding techniques for custom styling\n- **Area Composition**: Multi-region generation with precise control\n- **Inpainting**: Both regular and inpainting-specific models supported\n- **Model Merging**: Combine multiple models for unique outputs\n- **Latent Previews**: Real-time preview with TAESD for high-quality previews\n- **Workflow Export**: Save/load workflows as JSON, embed in PNG/WebP/FLAC metadata\n- **Offline Operation**: Core functionality works completely offline\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## System Architecture\n\n### High-Level Architecture\n\n```mermaid\ngraph TD\n    subgraph \"Frontend Layer\"\n        UI[User Interface]\n        WS[WebSocket Handler]\n    end\n    \n    subgraph \"API Layer\"\n        REST[REST API Routes]\n        INT[Internal Routes]\n    end\n    \n    subgraph \"Core Execution Engine\"\n        SG[Scheduling Graph]\n        EX[Execution Engine]\n        NODE[Node Registry]\n    end\n    \n    subgraph \"Model Management\"\n        MM[Model Manager]\n        LM[Loader Manager]\n    end\n    \n    subgraph \"Backend Services\"\n        UM[User Manager]\n        FM[Frontend Manager]\n    end\n    \n    UI <--> WS\n    WS <--> REST\n    REST <--> INT\n    REST <--> SG\n    SG <--> EX\n    EX <--> NODE\n    MM <--> LM\n    UM <--> FM\n    \n    style UI fill:#e1f5fe\n    style EX fill:#fff3e0\n    style MM fill:#e8f5e9\n```\n\n### Node Type System\n\nComfyUI uses a typed node system for type-safe workflow construction. The `comfy_types` module provides abstract base classes and type hints:\n\n```mermaid\nclassDiagram\n    class ComfyNodeABC {\n        <<abstract>>\n        +INPUT_TYPES() InputTypeDict\n        +FUNCTION() str\n        +OUTPUT_NODE() bool\n        +CATEGORY() str\n        +RETURN_TYPES() tuple\n    }\n    \n    class CheckLazyMixin {\n        <<mixin>>\n    }\n    \n    class IO {\n        <<enum>>\n        +ANY: \"*\"\n        +NUMBER: \"FLOAT,INT\"\n        +PRIMITIVE: \"STRING,FLOAT,INT,BOOLEAN\"\n    }\n    \n    ComfyNodeABC <-- CheckLazyMixin\n    ComfyNodeABC ..> IO : uses\n```\n\n资料来源：[comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n\n### Execution Model\n\nComfyUI employs a smart execution model that optimizes workflow processing:\n\n```mermaid\ngraph LR\n    A[Submit Workflow] --> B{Changed?}\n    B -->|First Run| C[Execute All Valid Paths]\n    B -->|Unchanged| D[Skip Execution]\n    B -->|Partial Change| E[Execute Changed + Dependencies]\n    C --> F[Output Results]\n    E --> F\n    D --> F\n```\n\n**Execution Rules:**\n- Only parts of the graph with all correct inputs will be executed\n- Only parts that change between executions are re-run\n- Submitting the same graph twice executes only the first instance\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Installation\n\n### Supported Platforms\n\n| Platform | GPU Options | Installation Type |\n|----------|-------------|-------------------|\n| **Windows** | NVIDIA, AMD, Intel, CPU | Portable Package, Manual Install |\n| **Linux** | NVIDIA, AMD (ROCm), Intel, CPU | Manual Install |\n| **macOS** | Apple Silicon (M1/M2), CPU | Manual Install |\n| **Cloud** | Comfy Cloud | Desktop Application |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Quick Start Commands\n\n```bash\n# Windows/Linux Manual Installation\npip install -r requirements.txt\npython main.py\n\n# NVIDIA GPU (Stable)\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130\n\n# NVIDIA GPU (Nightly)\npip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu132\n\n# AMD GPU (ROCm)\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm6.1\n\n# Apple Silicon\n# Install PyTorch nightly per Apple Developer Guide\npip install -r requirements.txt\n```\n\n### ComfyUI-Manager Setup\n\nComfyUI-Manager provides extension management capabilities:\n\n```bash\n# Install dependencies\npip install -r manager_requirements.txt\n\n# Enable with flags\npython main.py --enable-manager\n```\n\n| Manager Flag | Description |\n|--------------|-------------|\n| `--enable-manager` | Enable ComfyUI-Manager |\n| `--enable-manager-legacy-ui` | Use legacy manager UI |\n| `--disable-manager-ui` | Keep background features only |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## User Interface\n\n### Keyboard Shortcuts\n\n| Shortcut | Action |\n|----------|--------|\n| `Ctrl+Z` / `Ctrl+Y` | Undo/Redo |\n| `Ctrl+S` | Save workflow |\n| `Ctrl+O` | Load workflow |\n| `Ctrl+A` | Select all nodes |\n| `Alt+C` | Collapse/uncollapse selected |\n| `Ctrl+M` | Mute/unmute selected |\n| `Ctrl+B` | Bypass selected (reconnect wires) |\n| `Delete/Backspace` | Delete selected nodes |\n| `Space` + Drag | Pan canvas |\n| `Ctrl+Click` / `Shift+Click` | Add to selection |\n| `Ctrl+C` / `Ctrl+V` | Copy/paste nodes |\n| `Ctrl+Shift+V` | Paste with connections |\n| `Shift+Drag` | Move multiple nodes |\n| `Ctrl+D` | Load default graph |\n| `Alt++` / `Alt+-` | Zoom in/out |\n| `P` | Pin/unpin nodes |\n| `Ctrl+G` | Group selected |\n| `Double-Click` | Open node search palette |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Preview Methods\n\nComfyUI supports multiple preview rendering methods:\n\n| Method | Quality | Performance | Setup |\n|--------|---------|-------------|-------|\n| `auto` | Variable | Variable | Default |\n| `taesd` | High | Fast | Download TAESD decoder models |\n\nTo enable high-quality previews with TAESD:\n\n1. Download decoder files to `models/vae_approx` folder:\n   - `taesd_decoder.pth`\n   - `taesdxl_decoder.pth`\n   - `taesd3_decoder.pth`\n   - `taef1_decoder.pth`\n\n2. Launch with preview flag:\n   ```bash\n   python main.py --preview-method taesd\n   ```\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## API and Integration\n\n### API Structure\n\nComfyUI provides a comprehensive REST API for external integrations:\n\n```mermaid\ngraph TD\n    EXT[External Application] -->|HTTP/REST| API[API Server]\n    API -->|v2/userdata| UM[User Data Management]\n    API -->|v2/modelinfo| MM[Model Info]\n    API -->|v2/history| H[Execution History]\n    EXT -->|WebSocket| WS[WebSocket Connection]\n    WS -->|Real-time| STATUS[Execution Status]\n```\n\n### Internal Routes\n\nAll routes under `/internal` are designated for internal ComfyUI use only. These routes may change at any time without notice and are not intended for external application use.\n\n资料来源：[api_server/routes/internal/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/api_server/routes/internal/README.md)\n\n### User Data API\n\nThe user data management system provides secure file operations:\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/v2/userdata` | GET | List directory contents |\n| `/v2/userdata/{path}` | POST | Upload file |\n| `/v2/userdata/{file}` | DELETE | Delete file |\n| `/v2/userdata/{file}/move/{dest}` | POST | Move/rename file |\n\n**Query Parameters for Listing:**\n- `path`: Relative path within user's data directory\n- `recurse`: Enable recursive directory listing\n- `full_info`: Return detailed file information\n- `split`: Return path as array split by `/`\n\n资料来源：[app/user_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n\n### Model Discovery\n\nThe model manager provides intelligent model discovery with metadata extraction:\n\n```mermaid\ngraph TD\n    A[Model Path] --> B{Extension Check}\n    B -->|.safetensors| C[Extract Metadata]\n    B -->|.preview| D[Add Preview Image]\n    B -->|Other| E[Standard Add]\n    C --> F[Parse ssmd_cover_images]\n    D --> R[Result List]\n    E --> R\n    F --> R\n```\n\nThe system extracts preview images embedded in SafeTensors metadata under the `ssmd_cover_images` key.\n\n资料来源：[app/model_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/model_manager.py)\n\n## Frontend Management\n\n### Version Control\n\nComfyUI supports flexible frontend version management:\n\n```mermaid\ngraph LR\n    A[Default Frontend] --> B[Specific Version]\n    A --> C[Latest/Daily]\n    A --> D[Legacy Frontend]\n    \n    B -.->|v1.2.2| E[Stable]\n    C -.->|daily| F[Cutting Edge]\n    D -.->|legacy| G[Compatibility]\n```\n\n| Version String | Description |\n|----------------|-------------|\n| `Comfy-Org/ComfyUI_frontend@v1.2.2` | Specific stable version |\n| `Comfy-Org/ComfyUI_frontend@latest` | Latest release |\n| `Comfy-Org/ComfyUI_frontend@prerelease` | Pre-release build |\n\n**Version Pattern:**\n```\n^([a-zA-Z0-9][a-zA-Z0-9-]{0,38})/([a-zA-Z0-9_.-]+)@(v?\\d+\\.\\d+\\.\\d+[-._a-zA-Z0-9]*|latest|prerelease)$\n```\n\n资料来源：[app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n\n### Custom Frontends\n\nFrontends are stored in a configurable directory structure:\n\n```\nCUSTOM_FRONTENDS_ROOT/\n├── Comfy-Org_ComfyUI_frontend/\n│   ├── v1.2.2/\n│   ├── v1.3.0/\n│   └── latest/\n└── custom_provider_custom_frontend/\n    └── v2.0.0/\n```\n\nThe system supports embedding custom documentation and workflow templates through separate pip packages (`comfyui-embedded-docs`, `comfyui-workflow-templates`).\n\n资料来源：[app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n\n## Security Features\n\n### TLS/SSL Support\n\nComfyUI supports HTTPS for secure connections:\n\n```bash\n# Generate self-signed certificate\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem \\\n    -sha256 -days 3650 -nodes \\\n    -subj \"/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname\"\n\n# Launch with TLS\npython main.py --tls-keyfile key.pem --tls-certfile cert.pem\n```\n\n> Note: Self-signed certificates are not appropriate for shared or production environments.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Manager Security\n\nThe `--disable-manager-ui` flag allows keeping security checks and scheduled installation completion while disabling the manager UI and endpoints.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Release Process\n\nComfyUI follows a structured release cycle:\n\n```mermaid\ngraph TD\n    A[Commit to Repository] --> B{Which Branch?}\n    B -->|Master| C[Weekly Release Candidate]\n    B -->|Stable Tag| D[Backport Fixes]\n    C --> E[Major Version v0.X.Y]\n    D --> F[Patch Version v0.4.X]\n    \n    E -.->|~2 weeks| G[Next Major]\n    F -.->|as needed| H[Stable Update]\n```\n\n| Release Type | Frequency | Target |\n|---------------|------------|--------|\n| Major Version | ~2 weeks | Monday (variable) |\n| Patch Version | As needed | Stable branch backports |\n| Nightly Commits | Ongoing | Master branch (unstable) |\n\n> Warning: Commits outside stable release tags may be very unstable and break custom nodes.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## See Also\n\n- [Examples Page](https://comfyanonymous.github.io/ComfyUI_examples/) - Workflow examples\n- [ComfyUI-Manager](https://github.com/Comfy-Org/ComfyUI-Manager) - Custom node management\n- [Comfy Cloud](https://www.comfy.org/cloud) - Official cloud hosting\n- [Comfy API Documentation](https://docs.comfy.org/tutorials/api-nodes/overview) - API nodes guide\n- [GPU Recommendations](https://github.com/comfyanonymous/ComfyUI/wiki/Which-GPU-should-I-buy-for-ComfyUI) - Hardware guide\n\n---\n\n<a id='page-installation'></a>\n\n## Installation Guide\n\n### 相关页面\n\n相关主题：[Introduction to ComfyUI](#page-introduction)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n- [requirements.txt](https://github.com/Comfy-Org/ComfyUI/blob/main/requirements.txt)\n- [extra_model_paths.yaml.example](https://github.com/Comfy-Org/ComfyUI/blob/main/extra_model_paths.yaml.example)\n- [manager_requirements.txt](https://github.com/Comfy-Org/ComfyUI/blob/main/manager_requirements.txt)\n- [app/user_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n- [app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n</details>\n\n# Installation Guide\n\n## Overview\n\nThis guide covers all supported methods for installing ComfyUI, including local installations on Windows, Linux, and macOS, as well as platform-specific considerations for NVIDIA, AMD, Intel, and Apple Silicon GPUs. ComfyUI is designed to be modular and works fully offline—the core will never download anything unless explicitly requested by the user.\n\n资料来源：[README.md:1-50]()\n\n## Installation Methods Overview\n\nComfyUI supports multiple installation approaches to accommodate different user needs and technical expertise levels.\n\n```mermaid\ngraph TD\n    A[ComfyUI Installation] --> B[Desktop Application]\n    A --> C[Windows Portable Package]\n    A --> D[Manual Installation]\n    \n    D --> E[Windows]\n    D --> F[Linux]\n    D --> G[macOS]\n    \n    E --> H[NVIDIA GPU]\n    E --> I[AMD GPU]\n    E --> J[Intel GPU]\n    \n    F --> K[NVIDIA GPU]\n    F --> L[AMD ROCm]\n    F --> M[Intel XPU]\n    \n    G --> N[Apple Silicon M1/M2]\n```\n\n## Prerequisites\n\n### System Requirements\n\n| Component | Minimum | Recommended |\n|-----------|---------|-------------|\n| GPU VRAM | 4GB | 8GB+ |\n| RAM | 8GB | 16GB+ |\n| Disk Space | 10GB | 20GB+ |\n| OS | Windows 10, Linux, macOS | Windows 11, Latest Linux/macOS |\n\n### GPU Support Matrix\n\n| GPU Vendor | Support Level | Backend |\n|------------|---------------|---------|\n| NVIDIA | Full | CUDA (cu130/cu132) |\n| AMD | Full (ROCm) | ROCm |\n| Intel | Full (XPU) | oneAPI |\n| Apple Silicon | Full | Metal/MPS |\n\n资料来源：[README.md:200-280]()\n\n## PyTorch Installation\n\nPyTorch is the core dependency required for ComfyUI. The installation command varies by hardware platform.\n\n### NVIDIA GPUs\n\nFor stable PyTorch with CUDA support:\n\n```bash\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130\n```\n\nFor nightly builds with potential performance improvements:\n\n```bash\npip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu132\n```\n\n资料来源：[README.md:180-195]()\n\n### AMD GPUs (ROCm)\n\nFor AMD GPUs using ROCm, install the ROCm-compatible PyTorch build:\n\n```bash\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm\n```\n\nFor experimental memory-efficient attention on recent PyTorch with AMD GPUs:\n\n```bash\nTORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 python main.py --use-pytorch-cross-attention\n```\n\nFor non-officially supported AMD cards, use environment variable overrides:\n\n| GPU Series | Command |\n|------------|---------|\n| AMD 6700, 6600 (RDNA2) | `HSA_OVERRIDE_GFX_VERSION=10.3.0 python main.py` |\n| AMD 7600 (RDNA3) | `HSA_OVERRIDE_GFX_VERSION=11.0.0 python main.py` |\n\nAdditional performance tuning options:\n\n```bash\nPYTORCH_TUNABLEOP_ENABLED=1 python main.py\n```\n\n资料来源：[README.md:220-260]()\n\n### Intel GPUs (XPU)\n\nFor Intel discrete GPUs and APUs using the XPU backend:\n\n```bash\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/xpu\n```\n\nFor nightly builds with potential improvements:\n\n```bash\npip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu\n```\n\n资料来源：[README.md:160-178]()\n\n### Apple Silicon (M1/M2)\n\n1. Install the latest PyTorch nightly following Apple's [Accelerated PyTorch training on Mac](https://developer.apple.com/metal/pytorch/) developer guide.\n2. Follow the manual installation instructions for your operating system.\n3. Install ComfyUI dependencies as specified in the Dependencies section.\n\n资料来源：[README.md:290-310]()\n\n### Troubleshooting PyTorch\n\nIf you encounter the error \"Torch not compiled with CUDA enabled\":\n\n```bash\npip uninstall torch\n```\n\nThen reinstall using the appropriate command for your hardware from the sections above.\n\n资料来源：[README.md:196-199]()\n\n## Dependencies Installation\n\nAfter installing PyTorch, install the core ComfyUI dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\nThis installs all required Python packages for ComfyUI to function properly. After this step, ComfyUI should be ready to run.\n\n资料来源：[README.md:286-288]()\n\n## Windows Portable Package\n\nFor Windows users seeking a portable, self-contained installation:\n\n1. Download the portable standalone build from the [releases page](https://github.com/comfyanonymous/ComfyUI/releases).\n2. Extract the archive to your desired location.\n3. Run `python main.py` or the provided executable.\n\nThis package includes everything needed to run ComfyUI on NVIDIA GPUs or in CPU-only mode.\n\n资料来源：[README.md:95-110]()\n\n## Manual Installation\n\n### Windows and Linux\n\n```mermaid\ngraph LR\n    A[Download/Clone Repository] --> B[Install PyTorch]\n    B --> C[Install Dependencies]\n    C --> D[Configure Model Paths]\n    D --> E[Launch ComfyUI]\n```\n\n#### Step 1: Clone or Download the Repository\n\n```bash\ngit clone https://github.com/Comfy-Org/ComfyUI.git\ncd ComfyUI\n```\n\n#### Step 2: Install PyTorch\n\nFollow the PyTorch installation instructions for your GPU in the PyTorch Installation section above.\n\n#### Step 3: Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n#### Step 4: Launch\n\n```bash\npython main.py\n```\n\n资料来源：[README.md:280-295]()\n\n### Model Path Configuration\n\nComfyUI supports an optional configuration file to set custom search paths for models, useful if you have models stored in a different location or shared across multiple installations.\n\nCopy the example configuration:\n\n```bash\ncp extra_model_paths.yaml.example extra_model_paths.yaml\n```\n\nEdit `extra_model_paths.yaml` to specify your model directories:\n\n```yaml\n# Example extra_model_paths.yaml\nmodels:\n  checkpoints: /path/to/your/checkpoints\n  loras: /path/to/your/loras\n  vae: /path/to/your/vae\n```\n\n资料来源：[extra_model_paths.yaml.example](https://github.com/Comfy-Org/ComfyUI/blob/main/extra_model_paths.yaml.example)()\n\n## ComfyUI-Manager\n\nComfyUI-Manager is an extension that simplifies installation, updating, and management of custom nodes.\n\n### Installation\n\n1. Navigate to your ComfyUI installation directory\n2. Clone the ComfyUI-Manager repository into the `custom_nodes` folder:\n\n```bash\ncd custom_nodes\ngit clone https://github.com/Comfy-Org/ComfyUI-Manager.git\n```\n\n3. Install manager dependencies:\n\n```bash\npip install -r manager_requirements.txt\n```\n\n资料来源：[README.md:330-345]()\n\n### Enabling ComfyUI-Manager\n\nStart ComfyUI with the `--enable-manager` flag:\n\n```bash\npython main.py --enable-manager\n```\n\n### Manager Command Line Options\n\n| Flag | Description |\n|------|-------------|\n| `--enable-manager` | Enable ComfyUI-Manager |\n| `--enable-manager-legacy-ui` | Use the legacy manager UI (requires `--enable-manager`) |\n| `--disable-manager-ui` | Disable manager UI while keeping background features (requires `--enable-manager`) |\n\n资料来源：[README.md:346-365]()\n\n## Desktop Application\n\nFor the easiest getting-started experience, download the official Desktop Application:\n\n- Available for Windows and macOS\n- Download from [comfy.org/download](https://www.comfy.org/download)\n\nThis method requires no technical configuration and is recommended for new users.\n\n资料来源：[README.md:55-65]()\n\n## Cloud Deployment\n\nFor users without local hardware, ComfyUI is available on Comfy Cloud:\n\n- Official paid cloud version hosted at [comfy.org/cloud](https://www.comfy.org/cloud)\n- No local hardware required\n- Full ComfyUI functionality\n\n资料来源：[README.md:66-70]()\n\n## Advanced Configuration\n\n### Multi-User Setup\n\nFor server deployments with multiple users, enable multi-user mode:\n\n```bash\npython main.py --multi-user\n```\n\nThis enables server-side user profile storage instead of browser-based storage.\n\n资料来源：[app/user_manager.py:25-35]()\n\n### Frontend Version Management\n\nComfyUI ships its frontend as a separate pip package. To specify a frontend version:\n\n```bash\npython main.py --front-end-version Comfy-Org/ComfyUI_frontend@latest\n```\n\nFor stable releases:\n\n```bash\npython main.py --front-end-version Comfy-Org/ComfyUI_frontend@v1.2.2\n```\n\nFor legacy frontend:\n\n```bash\npython main.py --front-end-version Comfy-Org/ComfyUI_legacy_frontend@latest\n```\n\n资料来源：[app/frontend_management.py:40-75]()\n\n### Additional Command Line Arguments\n\n| Argument | Description |\n|----------|-------------|\n| `--preview-method auto` | Enable previews with automatic method selection |\n| `--preview-method taesd` | Use TAESD for high-quality previews |\n| `--tls-keyfile <file>` | Path to TLS private key |\n| `--tls-certfile <file>` | Path to TLS certificate |\n| `--use-pytorch-cross-attention` | Use PyTorch cross-attention implementation |\n| `--disable-api-nodes` | Disable optional API nodes |\n\n资料来源：[README.md:15-45]()\n\n## Post-Installation Verification\n\nAfter installation, verify your setup by:\n\n1. Launching ComfyUI: `python main.py`\n2. Opening the web interface (typically `http://localhost:8188`)\n3. Running a simple workflow to confirm GPU acceleration is working\n\nIf previews are enabled, you should see latent preview updates during image generation, confirming the installation is functioning correctly.\n\n资料来源：[README.md:10-20]()\n\n## Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| \"Torch not compiled with CUDA enabled\" | Reinstall PyTorch with CUDA support |\n| Import errors | Run `pip install -r requirements.txt` |\n| Model not found | Configure `extra_model_paths.yaml` or check model paths |\n| Manager installation fails | Ensure `manager_requirements.txt` dependencies are installed |\n\n资料来源：[README.md:196-199]()\n\n---\n\n<a id='page-architecture'></a>\n\n## System Architecture\n\n### 相关页面\n\n相关主题：[Server System](#page-server-system), [Execution Engine](#page-execution-engine), [Model Loading and Detection](#page-model-loading)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n- [comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n- [app/user_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n- [app/model_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/model_manager.py)\n- [app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n</details>\n\n# System Architecture\n\n## Overview\n\nComfyUI is a modular AI creation engine designed with a node-graph architecture that enables complex workflow orchestration for generative AI models. The system architecture follows a client-server model where the backend provides REST API endpoints for workflow execution, model management, and user administration, while the frontend communicates via WebSocket and HTTP protocols to render the visual node editor and manage execution state.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## High-Level Architecture\n\n```mermaid\ngraph TD\n    subgraph Client\n        Frontend[\"Web Frontend<br/>(React-based)\"]\n    end\n    \n    subgraph Server[\"ComfyUI Server\"]\n        API[\"REST API Routes\"]\n        WS[\"WebSocket Handler\"]\n        Execution[\"Execution Engine\"]\n        UserMgr[\"User Manager\"]\n        ModelMgr[\"Model Manager\"]\n    end\n    \n    subgraph Storage\n        Models[\"Model Files\"]\n        Settings[\"User Settings\"]\n        Cache[\"File Cache\"]\n    end\n    \n    Frontend <-->|HTTP/WS| API\n    Frontend <-->|WS| WS\n    API <--> UserMgr\n    API <--> ModelMgr\n    Execution <--> Models\n    UserMgr <--> Settings\n    ModelMgr <--> Cache\n```\n\n## Core Components\n\n### Execution Engine\n\nThe execution engine is the computational core of ComfyUI, responsible for processing node graphs in topological order. It implements intelligent caching where only parts of the graph that have changed between executions are re-processed.\n\n**Key Characteristics:**\n- Only parts of the graph that have an output with all the correct inputs will be executed\n- Only parts of the graph that change from each execution to the next will be executed\n- If the same graph is submitted twice, only the first will be executed\n- If the last part of the graph changes, only that part and its dependents are re-executed\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### User Manager\n\nThe `UserManager` class handles multi-user support and user-specific settings storage.\n\n```mermaid\nclassDiagram\n    class UserManager {\n        +settings: AppSettings\n        +users: dict\n        +__init__()\n        +get_users_file(): str\n    }\n    \n    class AppSettings {\n        +__init__(user_manager)\n        +get_default_user(): str\n    }\n```\n\n**User Configuration:**\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `multi_user` | Enable multiple user profiles | `False` |\n| User Directory | Location for user-specific data | `folder_paths.get_user_directory()` |\n\n**Initialization Logic:**\n\n```python\n# Single-user mode (default)\nself.users = {\"default\": \"default\"}\n\n# Multi-user mode (with --multi-user flag)\nif os.path.isfile(self.get_users_file()):\n    with open(self.get_users_file()) as f:\n        self.users = json.load(f)\n```\n\n资料来源：[app/user_manager.py:1-50](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n\n### Model Manager\n\nThe `ModelFileManager` class provides centralized model file discovery and caching.\n\n```mermaid\ngraph LR\n    A[Model Request] --> B[Cache Check]\n    B -->|Hit| C[Return Cached]\n    B -->|Miss| D[Scan Directories]\n    D --> E[Build File List]\n    E --> F[Cache Result]\n    F --> C\n```\n\n**Cache Data Structure:**\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `key` | `str` | Cache identifier |\n| `value` | `tuple[list[dict], dict[str, float], float]` | Models list, metadata, timestamp |\n\n**Model Discovery Features:**\n- Recursive directory scanning with glob patterns\n- Safe file filtering by extension and content type\n- Support for safetensors metadata extraction\n- Preview image detection (`*.preview` files)\n\n资料来源：[app/model_manager.py:1-80](https://github.com/Comfy-Org/ComfyUI/blob/main/app/model_manager.py)\n\n### Frontend Management\n\nThe `FrontendManagement` class handles frontend version control and installation verification.\n\n**Version Parsing Pattern:**\n\n```\n{provider}/{repo}@{version}\n```\n\nExample: `Comfy-Org/ComfyUI_frontend@v1.2.2`\n\n**Validation Regex:**\n```\n^([a-zA-Z0-9][a-zA-Z0-9-]{0,38})/([a-zA-Z0-9_.-]+)@(v?\\d+\\.\\d+\\.\\d+[-._a-zA-Z0-9]*|latest|prerelease)$\n```\n\n**Package Discovery:**\n\n| Package Type | Purpose |\n|--------------|---------|\n| `comfyui-frontend-package` | Main frontend assets |\n| `comfyui-workflow-templates` | Workflow template files |\n| `comfyui-embedded-docs` | Embedded documentation |\n\n资料来源：[app/frontend_management.py:1-100](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n\n## API Routes Architecture\n\n### REST Endpoints\n\n```mermaid\ngraph TD\n    R1[\"GET /v2/userdata\"] --> UM[UserManager]\n    R2[\"GET /experiment/models\"] --> MM[ModelFileManager]\n    R3[\"GET /experiment/models/{folder}\"] --> MM\n```\n\n**File Listing Parameters:**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `path` | `str` | Relative path within data directory |\n| `recurse` | `bool` | Enable recursive directory traversal |\n| `full_info` | `bool` | Return full file metadata |\n| `split` | `bool` | Return path as array (split by `/`) |\n\n**Response Format:**\n\n```python\nclass FileInfo(TypedDict):\n    path: str      # Relative file path\n    size: int      # File size in bytes\n    modified: int  # Modification time (milliseconds)\n    created: int   # Creation time (milliseconds)\n```\n\n资料来源：[app/user_manager.py:60-100](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n\n## Type System Architecture\n\nComfyUI implements a comprehensive type hinting system for node development.\n\n```mermaid\nclassDiagram\n    class ComfyNodeABC {\n        <<abstract>>\n        +INPUT_TYPES: InputTypeDict\n    }\n    \n    class IO {\n        <<enumeration>>\n        ANY = \"*\"\n        NUMBER = \"FLOAT,INT\"\n        PRIMITIVE = \"STRING,FLOAT,INT,BOOLEAN\"\n    }\n    \n    ComfyNodeABC --> IO\n```\n\n**Built-in IO Types:**\n\n| Type | Value | Description |\n|------|-------|-------------|\n| `ANY` | `\"*\"` | Accepts any input type |\n| `NUMBER` | `\"FLOAT,INT\"` | Numeric values |\n| `PRIMITIVE` | `\"STRING,FLOAT,INT,BOOLEAN\"` | Basic data types |\n\n资料来源：[comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n\n## Configuration and CLI Arguments\n\n### Command Line Options\n\n| Flag | Description |\n|------|-------------|\n| `--enable-manager` | Enable ComfyUI-Manager |\n| `--enable-manager-legacy-ui` | Use legacy manager UI |\n| `--disable-manager-ui` | Disable manager UI (keep background features) |\n| `--disable-api-nodes` | Disable optional API nodes |\n| `--preview-method {auto,taesd}` | Preview generation method |\n| `--front-end-version` | Specify frontend version |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Environment Variables\n\n| Variable | Purpose | Example |\n|----------|---------|---------|\n| `HSA_OVERRIDE_GFX_VERSION` | AMD GPU compatibility | `10.3.0` for RDNA2 |\n| `TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL` | ROCm memory optimization | `1` |\n| `PYTORCH_TUNABLEOP_ENABLED` | PyTorch tuning | `1` |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Data Flow: Workflow Execution\n\n```mermaid\nsequenceDiagram\n    participant Client\n    participant API\n    participant Execution\n    participant Cache\n    participant Models\n    \n    Client->>API: Submit Workflow Graph\n    API->>Execution: Parse Graph\n    Execution->>Cache: Check Node States\n    Cache-->>Execution: Cached Results\n    Execution->>Models: Load Required Models\n    Models-->>Execution: Model Data\n    Execution->>Execution: Topological Sort\n    Execution->>Execution: Execute Changed Nodes\n    Execution-->>API: Output Results\n    API-->>Client: WebSocket Update\n```\n\n## Node Graph Structure\n\nComfyUI workflows are represented as directed acyclic graphs (DAGs) where:\n\n- **Nodes** represent computational units (e.g., model loading, sampling, encoding)\n- **Edges** represent data flow between nodes\n- **Execution Order** is determined by topological sorting based on input dependencies\n\n```mermaid\ngraph LR\n    subgraph Inputs\n        Model[\"Model Loader\"]\n        Clip[\"CLIP Text Encode\"]\n        Latent[\"Empty Latent\"]\n    end\n    \n    subgraph Process\n        Sampler[\"KSampler\"]\n    end\n    \n    subgraph Outputs\n        Decode[\"VAE Decode\"]\n        Image[\"Save Image\"]\n    end\n    \n    Model --> Sampler\n    Clip --> Sampler\n    Latent --> Sampler\n    Sampler --> Decode\n    Decode --> Image\n```\n\n## Release Process Architecture\n\nComfyUI maintains three interconnected repositories with different release cadences:\n\n| Repository | Branch | Release Cycle | Purpose |\n|------------|--------|---------------|---------|\n| ComfyUI Core | master | ~2 weeks | Major stable releases |\n| ComfyUI Core | tags | as needed | Patch fixes for stable |\n| Frontend | various | weekly | UI updates |\n\n**Versioning Scheme:**\n- Major versions (e.g., v0.7.0) for significant releases\n- Minor versions for master branch releases\n- Patch versions for backported fixes\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Security Considerations\n\n### Multi-User Mode\n\nWhen `--multi-user` is enabled:\n- User settings are stored server-side instead of browser local storage\n- Each user has isolated data directories\n- User settings persist across sessions\n\n### File Access Control\n\nThe `/v2/userdata` endpoint implements path validation:\n- Prevents directory traversal attacks\n- Validates paths are within user's data directory\n- Returns appropriate HTTP status codes (400, 404) for invalid requests\n\n资料来源：[app/user_manager.py:80-120](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n\n---\n\n<a id='page-server-system'></a>\n\n## Server System\n\n### 相关页面\n\n相关主题：[System Architecture](#page-architecture), [Execution Engine](#page-execution-engine)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [server.py](https://github.com/Comfy-Org/ComfyUI/blob/main/server.py)\n- [protocol.py](https://github.com/Comfy-Org/ComfyUI/blob/main/protocol.py)\n- [api_server/routes/internal/internal_routes.py](https://github.com/Comfy-Org/ComfyUI/blob/main/api_server/routes/internal/internal_routes.py)\n- [api_server/services/terminal_service.py](https://github.com/Comfy-Org/ComfyUI/blob/main/api_server/services/terminal_service.py)\n- [api_server/utils/file_operations.py](https://github.com/Comfy-Org/ComfyUI/blob/main/api_server/utils/file_operations.py)\n</details>\n\n# Server System\n\n## Overview\n\nThe ComfyUI Server System is the core backend infrastructure responsible for handling client connections, executing workflows, managing files, and orchestrating the AI generation pipeline. Built on top of `aiohttp`, the server provides both REST API endpoints and WebSocket-based real-time communication for seamless interaction between the frontend interface and backend processing engines.\n\nThe server acts as the central hub that manages:\n- **Client connections** via WebSocket protocol\n- **Workflow execution** scheduling and queue management\n- **File operations** for models, outputs, and user data\n- **Frontend delivery** and management\n- **User authentication and multi-user support**\n\n资料来源：[server.py]() | [protocol.py]()\n\n## Architecture Overview\n\n```mermaid\ngraph TB\n    subgraph \"Client Layer\"\n        Frontend[Frontend UI]\n        ExternalAPI[External API Clients]\n    end\n\n    subgraph \"Server Core\"\n        WSS[WebSocket Server]\n        REST[REST API Routes]\n        Auth[Authentication Layer]\n    end\n\n    subgraph \"Services Layer\"\n        Exec[Execution Engine]\n        Terminal[Terminal Service]\n        FileOps[File Operations]\n        Queue[Queue Manager]\n    end\n\n    subgraph \"Data Layer\"\n        Models[Model Manager]\n        Users[User Manager]\n        Settings[App Settings]\n    end\n\n    Frontend --> WSS\n    ExternalAPI --> REST\n    WSS --> Auth\n    REST --> Auth\n    Auth --> Exec\n    Exec --> Queue\n    Exec --> Terminal\n    FileOps --> Models\n    FileOps --> Users\n    FileOps --> Settings\n```\n\n## Protocol Layer\n\n### WebSocket Protocol\n\nThe ComfyUI server uses a custom WebSocket-based protocol for real-time communication between the client and server. This protocol enables:\n\n- **Bidirectional messaging** - Both client and server can send messages independently\n- **Execution events** - Real-time updates on workflow execution progress\n- **Prompt submission** - Sending workflows for execution\n- **History tracking** - Recording and retrieving execution history\n\n资料来源：[protocol.py]()\n\n### Message Types\n\n| Message Type | Direction | Purpose |\n|--------------|-----------|---------|\n| `executing` | Server → Client | Notification when a node begins execution |\n| `executed` | Server → Client | Notification when a node completes execution |\n| `execution_error` | Server → Client | Reports errors during workflow execution |\n| `progress` | Server → Client | Progress updates for long-running operations |\n| `executing_node` | Server → Client | Identifies currently executing node |\n| `prompt` | Client → Server | Submit workflow for execution |\n| `interrupt` | Client → Server | Request to interrupt current execution |\n\n## Server Core Components\n\n### Main Server Entry Point\n\nThe `server.py` file contains the main server initialization and lifecycle management. Key responsibilities include:\n\n- Initializing the aiohttp web application\n- Registering routes and middleware\n- Setting up WebSocket endpoints\n- Managing server lifecycle (start, stop, restart)\n\n```python\n# Server initialization pattern\napp = web.Application()\nserver = Server()\nserver.setup_routes(app)\nweb.run_app(app, host=host, port=port)\n```\n\n资料来源：[server.py]()\n\n### API Routes Structure\n\nThe server organizes routes into logical namespaces:\n\n| Route Namespace | Purpose |\n|-----------------|---------|\n| `/api` | Public REST API endpoints |\n| `/internal` | Internal server-to-server communication |\n| `/v2/userdata` | User data management endpoints |\n| `/experiment` | Experimental features |\n\n### Internal Routes\n\nInternal routes under `/internal` are designated for ComfyUI's internal use only and may change without notice. These routes handle:\n\n- System-level operations\n- Queue management\n- Execution state tracking\n- Server configuration\n\n资料来源：[api_server/routes/internal/internal_routes.py]()\n\n## Services Layer\n\n### Terminal Service\n\nThe Terminal Service manages pseudo-terminal functionality for executing external processes. This service is crucial for:\n\n- Running Python scripts within workflows\n- Executing system commands\n- Managing subprocess lifecycle\n\nThe service provides:\n- PTY (pseudo-terminal) allocation\n- Stream multiplexing\n- Process lifecycle management\n\n资料来源：[api_server/services/terminal_service.py]()\n\n### File Operations\n\nThe file operations module provides utilities for:\n\n| Operation | Description |\n|-----------|-------------|\n| Directory listing | Recursive and non-recursive file traversal |\n| File metadata | Size, creation time, modification time |\n| Path validation | Security checks for path traversal |\n| User data access | Isolated access to user-specific directories |\n\n```python\n# File info structure returned by file operations\nclass FileInfo(TypedDict):\n    path: str      # Relative path from base directory\n    size: int      # File size in bytes\n    modified: int  # Modification timestamp (milliseconds)\n    created: int   # Creation timestamp (milliseconds)\n```\n\nThe `list_userdata_v2` endpoint provides structured access to user data directories with proper security constraints.\n\n资料来源：[api_server/utils/file_operations.py]()\n\n### Queue Manager\n\nThe queue manager handles workflow scheduling:\n\n- **Priority queuing** - Higher priority prompts execute first\n- **Execution caching** - Identical graphs skip re-execution\n- **Partial execution** - Only changed portions of graphs execute\n\nExecution behavior notes:\n- Only parts of the graph with all correct inputs will be executed\n- Only parts that change between executions are re-run\n- Submitting the same graph twice results in only the first execution\n\n## Data Management\n\n### User Manager\n\nThe UserManager handles multi-user support and user settings:\n\n- **User directory management** - Isolated storage per user\n- **Settings persistence** - Server-side storage instead of browser localStorage\n- **Multi-user mode** - Enabled via `--multi-user` CLI flag\n\n| Setting | Description |\n|---------|-------------|\n| `multi_user` | CLI argument to enable multiple user profiles |\n| `user_directory` | Base directory for user-specific data |\n| `users_file` | JSON file storing user configurations |\n\nUser data is stored in the user directory with each user having isolated access to their own data.\n\n资料来源：[app/user_manager.py]()\n\n### Model Manager\n\nThe ModelFileManager provides:\n\n- **Model discovery** - Listing models by type and folder\n- **Metadata extraction** - Reading safetensors headers for preview images\n- **Preview generation** - Supporting preview thumbnails for models\n\n| Feature | Supported Formats |\n|---------|-------------------|\n| Preview Images | PNG, JPG, WebP |\n| Model Metadata | safetensors headers |\n| Preview Thumbnails | Base64-encoded in safetensors metadata |\n\nThe `/experiment/models` endpoint provides a structured listing of available model types and folders.\n\n资料来源：[app/model_manager.py]()\n\n### Frontend Management\n\nFrontend management handles the web UI delivery:\n\n- **Version management** - Supports specific versions, nightly builds, or stable releases\n- **Custom frontends** - Allows loading frontends from external repositories\n- **Embedded docs** - Integration with embedded documentation package\n\n```bash\n# Example: Using specific frontend version\n--front-end-version Comfy-Org/ComfyUI_frontend@v1.2.2\n\n# Using legacy frontend\n--front-end-version Comfy-Org/ComfyUI_legacy_frontend@latest\n```\n\n| Frontend Provider | Description |\n|-------------------|-------------|\n| PyPI (stable) | Default stable releases |\n| GitHub | Cutting-edge daily updates |\n| Custom | Repository-specific versions |\n\n资料来源：[app/frontend_management.py]()\n\n## Security Model\n\n### User Data Isolation\n\nThe server implements strict user data isolation:\n\n- Each user has a dedicated data directory\n- Path traversal attacks are prevented via `glob.escape()`\n- User data endpoints validate paths against allowed directories\n- Multi-user mode requires explicit CLI activation\n\n### Internal Routes Protection\n\nRoutes under `/internal` are explicitly marked as:\n- Not intended for external application use\n- Subject to change without notice\n- Internal ComfyUI functionality only\n\n## Configuration\n\n### CLI Arguments\n\n| Argument | Description |\n|----------|-------------|\n| `--enable-manager` | Enable ComfyUI-Manager extension |\n| `--enable-manager-legacy-ui` | Use legacy manager UI |\n| `--disable-manager-ui` | Disable manager UI while keeping background features |\n| `--multi-user` | Enable multiple user profiles |\n| `--front-end-version` | Specify frontend version |\n| `--preview-method` | Set preview generation method (auto, taesd) |\n| `--tls-keyfile` | TLS private key file path |\n| `--tls-certfile` | TLS certificate file path |\n\n### Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| `TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL` | Enable experimental ROCm features |\n| `PYTORCH_TUNABLEOP_ENABLED` | Enable PyTorch tuning for potential speed improvements |\n| `HSA_OVERRIDE_GFX_VERSION` | Override AMD GPU architecture detection |\n\n## Execution Flow\n\n```mermaid\nsequenceDiagram\n    participant Client\n    participant Server\n    participant Queue\n    participant Executor\n\n    Client->>Server: WebSocket Connect\n    Server->>Client: Connection Acknowledged\n\n    Client->>Server: Submit Prompt (workflow)\n    Server->>Queue: Add to execution queue\n    Server->>Client: Queue position acknowledged\n\n    Loop Execution\n        Queue->>Executor: Dequeue next task\n        Executor->>Executor: Execute node(s)\n        Executor->>Server: Progress updates\n        Server->>Client: Real-time execution events\n\n        alt Node executes successfully\n            Executor->>Server: Node completed\n            Server->>Client: \"executed\" message\n        else Execution error\n            Executor->>Server: Error details\n            Server->>Client: \"execution_error\" message\n        end\n    end\n\n    Executor->>Server: All nodes complete\n    Server->>Client: Execution complete\n```\n\n## Summary\n\nThe ComfyUI Server System provides a robust, event-driven architecture for AI workflow execution. Built on aiohttp, it combines:\n\n- **WebSocket-based real-time communication** for interactive execution monitoring\n- **RESTful API endpoints** for external integration\n- **Service-oriented design** for modularity and maintainability\n- **Strong security boundaries** through user isolation and path validation\n\nThe server seamlessly integrates with the frontend to deliver a responsive user experience while managing complex AI model execution pipelines in the background.\n\n---\n\n<a id='page-execution-engine'></a>\n\n## Execution Engine\n\n### 相关页面\n\n相关主题：[Graph Management](#page-graph-management), [Server System](#page-server-system), [Memory Management](#page-memory-management)\n\n<details>\n<summary>Relevant Source Files</summary>\n\nThe following source files were used to generate this documentation:\n\n- [README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md) - Contains high-level execution engine behavior notes\n- [app/user_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py) - Contains API routes and file processing logic\n- [app/model_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/model_manager.py) - Contains model file management and caching\n- [app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py) - Contains frontend version management and installation logic\n- [comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md) - Contains type definitions for node development\n\n</details>\n\n# Execution Engine\n\nThe Execution Engine is the core component of ComfyUI responsible for processing node-based workflows. It analyzes the dependency graph, determines execution order, and runs only the nodes necessary to produce the requested outputs.\n\n## Overview\n\nComfyUI uses a directed acyclic graph (DAG) model where each node represents an operation and edges represent data dependencies. The execution engine processes this graph efficiently by:\n\n- Executing only nodes with all required inputs available\n- Skipping unchanged portions of the graph on re-execution\n- Caching intermediate results to avoid redundant computation\n\n资料来源：[README.md:1-50]()\n\n## Execution Model\n\n### Lazy Evaluation Strategy\n\nThe execution engine employs lazy evaluation, meaning nodes are only executed when their outputs are actually needed by other nodes or requested by the user.\n\n```mermaid\ngraph TD\n    A[User Request] --> B{Output Cached?}\n    B -->|Yes| C[Return Cached Result]\n    B -->|No| D[Find All Dependent Nodes]\n    D --> E[Check Input Availability]\n    E --> F[Execute Required Nodes]\n    F --> G[Cache Results]\n    G --> C\n```\n\n### Incremental Execution\n\nOne of the most powerful features of the execution engine is its ability to perform incremental execution:\n\n- If the same workflow is submitted twice, only the first execution runs\n- If only part of the graph changes, only that part and its downstream dependencies are re-executed\n- This dramatically improves performance for iterative workflows\n\n> \"Only parts of the graph that change from each execution to the next will be executed, if you submit the same graph twice only the first will be executed. If you change the last part of the graph only the part you changed and the part that depends on it will be executed.\"\n\n资料来源：[README.md:1-50]()\n\n## Node Execution\n\n### Input Validation\n\nBefore any node executes, the engine validates that all required inputs are present and correctly typed. Nodes that cannot satisfy their input requirements are skipped from execution.\n\n### Dependency Resolution\n\nThe execution engine uses topological sorting to determine the correct order of node execution, ensuring that all input dependencies are satisfied before a node runs.\n\n## Caching System\n\nComfyUI implements a sophisticated caching mechanism to avoid redundant computation.\n\n### Cache Structure\n\nThe `ModelFileManager` class manages caching with the following structure:\n\n```python\nself.cache: dict[str, tuple[list[dict], dict[str, float], float]] = {}\n```\n\nEach cache entry contains:\n- A list of dictionaries with file information\n- A dictionary mapping file paths to modification timestamps\n- A float representing cache creation time\n\n资料来源：[app/model_manager.py:1-50]()\n\n### Cache Operations\n\n| Operation | Method | Description |\n|-----------|--------|-------------|\n| Get Cache | `get_cache(key, default)` | Retrieves cached data by key |\n| Set Cache | `set_cache(key, value)` | Stores data in cache |\n| Clear Cache | `clear_cache()` | Removes all cached entries |\n\n资料来源：[app/model_manager.py:1-50]()\n\n## API Endpoints\n\nThe execution engine interacts with the following API endpoints for model and file management:\n\n### Model Routes\n\n| Endpoint | Method | Purpose |\n|----------|--------|---------|\n| `/experiment/models` | GET | List all available model folders |\n| `/experiment/models/{folder}` | GET | List all models in a specific folder |\n\n### File Routes\n\n| Endpoint | Method | Purpose |\n|----------|--------|---------|\n| `/files` | GET | List files in a directory |\n| `/v2/userdata` | GET | List user data directory contents |\n\nThe file listing endpoint supports query parameters:\n- `path`: Relative path within the data directory\n- `recurse`: Enable recursive directory traversal\n- `full_info`: Return detailed file information\n- `split`: Return path segments as array elements\n\n资料来源：[app/user_manager.py:1-50]()\n资料来源：[app/model_manager.py:50-100]()\n\n## Node Type System\n\nComfyUI uses a typed node system defined in `comfy/comfy_types/`:\n\n### Core Types\n\n| Type | Description |\n|------|-------------|\n| `IO.ANY` | Accepts any input type (\"*\") |\n| `IO.NUMBER` | Numeric values (FLOAT, INT) |\n| `IO.PRIMITIVE` | Basic types (STRING, FLOAT, INT, BOOLEAN) |\n\n### Base Class\n\nThe `ComfyNodeABC` abstract base class provides:\n- Type hinting support\n- Autocomplete for node developers\n- Standardized `INPUT_TYPES` interface\n\n资料来源：[comfy/comfy_types/README.md:1-50]()\n\n## Workflow Processing\n\n### File Operations\n\nWorkflows can be loaded from multiple formats:\n\n- PNG files with embedded workflow data\n- WebP images\n- FLAC audio files\n- JSON workflow files\n\nDragging a generated PNG onto the webpage automatically extracts the full workflow including seeds.\n\n资料来源：[README.md:1-50]()\n\n### Dynamic Prompts\n\nThe execution engine supports dynamic prompt syntax:\n\n| Syntax | Description |\n|--------|-------------|\n| `(text:1.2)` | Increase emphasis (1.2x) |\n| `(text:0.8)` | Decrease emphasis (0.8x) |\n| `{wild\\|card\\|test}` | Random selection |\n| `\\\\(` | Escape parentheses |\n| `\\\\{` | Escape braces |\n\n## Frontend Integration\n\nThe execution engine works with frontend version management to ensure compatibility:\n\n### Version String Format\n\n```\nprovider/repository@version\n```\n\nExample: `Comfy-Org/ComfyUI_frontend@1.2.2`\n\n### Version Pattern\n\n```\n^([a-zA-Z0-9][a-zA-Z0-9-]{0,38})/([a-zA-Z0-9_.-]+)@(v?\\d+\\.\\d+\\.\\d+[-._a-zA-Z0-9]*|latest|prerelease)$\n```\n\n资料来源：[app/frontend_management.py:1-50]()\n\n## Performance Optimizations\n\n### Graph Optimization\n\nThe execution engine optimizes performance through:\n\n1. **Dependency Analysis**: Identifies minimum required nodes\n2. **Caching**: Stores intermediate computation results\n3. **Incremental Updates**: Skips unchanged graph portions\n4. **Lazy Evaluation**: Only computes when outputs are needed\n\n### Parallel Execution\n\nWhile nodes within the same dependency level may have execution order constraints, the engine is designed to support parallel execution where possible.\n\n## Error Handling\n\nThe execution engine provides graceful error handling:\n\n- Invalid paths return appropriate HTTP status codes (400, 404)\n- Missing requirements are logged with installation instructions\n- The system can continue operating even if optional components are unavailable\n\n资料来源：[app/frontend_management.py:1-50]()\n\n---\n\n<a id='page-graph-management'></a>\n\n## Graph Management\n\n### 相关页面\n\n相关主题：[Execution Engine](#page-execution-engine)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [app/subgraph_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/subgraph_manager.py)\n- [app/node_replace_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/node_replace_manager.py)\n- [comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n- [README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n</details>\n\n# Graph Management\n\n## Overview\n\nGraph Management is a core system in ComfyUI that handles the creation, execution, caching, and manipulation of node-based computational graphs. The system orchestrates how nodes are executed, how workflows are processed, and how subgraphs are managed across the application. ComfyUI's node graph interface enables users to experiment and create complex Stable Diffusion workflows without needing to code, making graph management essential for both the UI layer and the execution engine.\n\nThe graph management system encompasses several interconnected components: the execution engine that processes node graphs, subgraph management for reusable workflow components, node replacement for runtime optimizations, and type hinting infrastructure for node development. Only parts of the graph that have an output with all the correct inputs will be executed, and only parts that change from each execution to the next will be re-executed, significantly optimizing performance for iterative workflows.\n\n## Core Architecture\n\n```mermaid\ngraph TD\n    A[User Workflow] --> B[Graph Execution Engine]\n    B --> C[Node Execution]\n    B --> D[Subgraph Manager]\n    B --> E[Node Replace Manager]\n    C --> F[Graph Utils]\n    D --> G[Custom Node Subgraphs]\n    D --> H[Blueprint Subgraphs]\n    E --> I[Registered Replacements]\n    F --> J[Graph Optimization]\n```\n\n## Subgraph Management\n\n### Purpose and Scope\n\nThe Subgraph Manager handles the registration, loading, and lifecycle of reusable workflow components called subgraphs. Subgraphs are self-contained node definitions stored as JSON files that can be imported and used within larger workflows. This system enables code modularity and reuse, allowing custom node developers to package complex node arrangements as single, reusable units.\n\nThe manager supports two distinct sources of subgraphs:\n\n| Source | Description | Path Location |\n|--------|-------------|---------------|\n| `custom_node` | Subgraphs bundled with custom node extensions | `<custom_node_dir>/subgraphs/<name>.json` |\n| `templates` | Built-in workflow templates | `blueprints/` directory |\n\n### Data Models\n\n#### Source Enum\n\n```python\nclass Source:\n    custom_node = \"custom_node\"\n    templates = \"templates\"\n```\n\n#### SubgraphEntry Structure\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `source` | `str` | Source identifier - custom_node or templates |\n| `path` | `str` | Relative path of the subgraph file |\n| `name` | `str` | Name of the subgraph file (without extension) |\n| `info` | `CustomNodeSubgraphEntryInfo` | Additional metadata (node pack name for custom nodes) |\n| `data` | `str` | Raw JSON content of the subgraph |\n\n资料来源：[app/subgraph_manager.py:1-45]()\n\n#### CustomNodeSubgraphEntryInfo\n\n```python\nclass CustomNodeSubgraphEntryInfo(TypedDict):\n    node_pack: str\n    \"\"\"Node pack name.\"\"\"\n```\n\n### Caching Strategy\n\nThe Subgraph Manager implements a caching mechanism to avoid redundant filesystem operations:\n\n```python\nclass SubgraphManager:\n    def __init__(self):\n        self.cached_custom_node_subgraphs: dict[SubgraphEntry] | None = None\n        self.cached_blueprint_subgraphs: dict[SubgraphEntry] | None = None\n```\n\nThe cache is invalidated when `force_reload=True` is passed to the retrieval methods, enabling refresh during custom node reload scenarios.\n\n### Entry Generation\n\nEach subgraph entry is assigned a unique identifier generated via SHA-256 hash:\n\n```python\ndef _create_entry(self, file: str, source: str, node_pack: str) -> tuple[str, SubgraphEntry]:\n    \"\"\"Create a subgraph entry from a file path. Expects normalized path (forward slashes).\"\"\"\n    entry_id = hashlib.sha256(f\"{source}{file}\".encode()).hexdigest()\n    entry: SubgraphEntry = {\n        \"source\": source,\n        \"name\": os.path.splitext(os.path.basename(file))[0],\n        \"path\": file,\n        ...\n    }\n```\n\n资料来源：[app/subgraph_manager.py:57-70]()\n\n### REST API Endpoints\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/global_subgraphs` | GET | Returns all subgraphs with optional data stripping |\n| `/global_subgraphs/{id}` | GET | Returns a specific subgraph by its SHA-256 ID |\n\nThe `get_all_subgraphs` method merges results from both custom nodes and blueprints:\n\n```python\nasync def get_all_subgraphs(self, loadedModules, force_reload=False):\n    \"\"\"Get all subgraphs from all sources (custom nodes and blueprints).\"\"\"\n    custom_node_subgraphs = await self.get_custom_node_subgraphs(loadedModules, force_reload)\n    blueprint_subgraphs = await self.get_blueprint_subgraphs(force_reload)\n    return {**custom_node_subgraphs, **blueprint_subgraphs}\n```\n\n## Node Replacement Management\n\n### Purpose\n\nThe Node Replace Manager registers runtime node substitutions that occur during graph execution. This system enables custom nodes to declare that certain node types should be replaced with alternative implementations, facilitating backward compatibility, optimization, and feature expansion without modifying existing workflows.\n\n### Registration Interface\n\n```python\nclass NodeReplaceManager:\n    \"\"\"Manages node replacement registrations.\"\"\"\n\n    def __init__(self):\n        self._replacements: dict[str, list[NodeReplace]] = {}\n\n    def register(self, node_replace: NodeReplace):\n        \"\"\"Register a node replacement mapping.\n\n        Idempotent: if a replacement with the same (old_node_id, new_node_id)\n        is already registered, the duplicate is ignored. This prevents stale\n        entries from accumulating when custom nodes are reloaded in the same\n        process (e.g. via ComfyUI-Manager).\n        \"\"\"\n```\n\n资料来源：[app/node_replace_manager.py:25-40]()\n\n### Idempotent Registration\n\nThe registration process is designed to be idempotent, preventing duplicate entries when custom nodes are reloaded:\n\n```python\nexisting = self._replacements.setdefault(node_replace.old_node_id, [])\nfor entry in existing:\n    if entry.new_node_id == node_replace.new_node_id:\n        logging.debug(\n            \"Node replacement %s -> %s already registered, ignoring duplicate.\",\n            ...\n        )\n```\n\nThis design prevents stale entries from accumulating during custom node reloads triggered by ComfyUI-Manager.\n\n## Node Type System\n\n### IO Types\n\nComfyUI provides a standardized type system through the `IO` enum for node input/output definitions:\n\n| Type | Value | Description |\n|------|-------|-------------|\n| `ANY` | `\"*\"` | Accepts any type |\n| `NUMBER` | `\"FLOAT,INT\"` | Numeric values |\n| `PRIMITIVE` | `\"STRING,FLOAT,INT,BOOLEAN\"` | Basic data types |\n\n资料来源：[comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n\n### ComfyNodeABC Base Class\n\nThe abstract base class provides type-hinting and autocomplete support for node developers:\n\n```python\nclass ExampleNode(ComfyNodeABC):\n    @classmethod\n    def INPUT_TYPES(s) -> InputTypeDict:\n        return {\"required\": {}}\n```\n\n## Graph Execution Model\n\n### Execution Optimization\n\nComfyUI's graph execution follows specific rules that optimize performance:\n\n1. **Complete Input Requirement**: Only parts of the graph that have an output with all the correct inputs will be executed.\n\n2. **Incremental Execution**: Only parts of the graph that change from each execution to the next will be executed. If you submit the same graph twice, only the first will be executed. If you change the last part of the graph, only the part you changed and the part that depends on it will be executed.\n\nThis model significantly reduces computational overhead for iterative workflows where users make incremental adjustments.\n\n### Workflow Serialization\n\nWorkflows can be saved and loaded as JSON files, enabling persistence and sharing of node graph configurations. Dragging a generated PNG on the webpage or loading one will give the full workflow including seeds that were used to create it, maintaining reproducibility.\n\n## Node Struct Operations\n\n### NodeStruct Definition\n\n```python\nclass NodeStruct(TypedDict):\n    inputs: dict[str, str | int | float | bool | tuple[str, int]]\n    class_type: str\n    _meta: dict[str, str]\n```\n\n### Copy Operations\n\nThe `copy_node_struct` function creates modified copies for graph manipulation:\n\n```python\ndef copy_node_struct(node_struct: NodeStruct, empty_inputs: bool = False) -> NodeStruct:\n    new_node_struct = node_struct.copy()\n    if empty_inputs:\n        new_node_struct[\"inputs\"] = {}\n    else:\n        new_node_struct[\"inputs\"] = node_struct[\"inputs\"].copy()\n    new_node_struct[\"_meta\"] = node_struct[\"_meta\"].copy()\n    return new_node_struct\n```\n\n资料来源：[app/node_replace_manager.py:16-25]()\n\n## Related Components\n\n| Component | File Path | Purpose |\n|-----------|-----------|---------|\n| Graph Execution | `comfy_execution/graph.py` | Core graph execution engine |\n| Graph Utilities | `comfy_execution/graph_utils.py` | Graph manipulation helpers |\n| Node Helpers | `node_helpers.py` | Common node development utilities |\n| Node Typing | `comfy/comfy_types/node_typing.py` | Type definitions for nodes |\n| User Manager | `app/user_manager.py` | User data and file operations |\n\n## Best Practices\n\n### Node Development\n\n- Use `ComfyNodeABC` as the base class for custom nodes to leverage type-hinting\n- Properly define `INPUT_TYPES` with correct type annotations\n- Register node replacements idempotently to support hot-reloading\n\n### Workflow Optimization\n\n- Structure workflows to minimize dependencies between unchanged sections\n- Use subgraphs for reusable workflow patterns\n- Leverage the incremental execution model by making changes at graph endpoints\n\n### Custom Node Packaging\n\n- Place subgraphs in the designated `subgraphs/` directory within custom node packages\n- Use the node pack name in `CustomNodeSubgraphEntryInfo` for proper namespacing\n- Follow JSON format for subgraph definition files\n\n---\n\n<a id='page-model-loading'></a>\n\n## Model Loading and Detection\n\n### 相关页面\n\n相关主题：[Diffusion Models](#page-diffusion-models), [Memory Management](#page-memory-management)\n\nI do not have access to the source files required to generate this wiki page. The provided context does not contain the following files that are essential for documenting the Model Loading and Detection system:\n\n**Required files that are missing:**\n\n- `comfy/model_detection.py`\n- `comfy/model_management.py`\n- `comfy/model_patcher.py`\n- `comfy/model_base.py`\n- `comfy/supported_models.py`\n- `comfy/lora.py`\n- `folder_paths.py`\n\nThe context only includes:\n\n- `README.md` (general documentation)\n- `app/user_manager.py` (user data management)\n- `app/model_manager.py` (model file manager - partial)\n- `app/frontend_management.py` (frontend version management)\n- `comfy/comfy_types/README.md` (type hinting documentation)\n\nWithout access to the actual source files for model loading and detection, I cannot provide accurate technical details, code citations, or architectural diagrams that would be factual and useful.\n\nTo generate this wiki page, I would need the repository to be re-analyzed with the specific files listed above included in the context.\n\n---\n\n<a id='page-diffusion-models'></a>\n\n## Diffusion Models\n\n### 相关页面\n\n相关主题：[Model Loading and Detection](#page-model-loading), [Text Processing and Encoders](#page-text-processing)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [comfy/ldm/modules/diffusionmodules/model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/modules/diffusionmodules/model.py)\n- [comfy/ldm/modules/diffusionmodules/openaimodel.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/modules/diffusionmodules/openaimodel.py)\n- [comfy/ldm/flux/model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/flux/model.py)\n- [comfy/ldm/wan/model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/wan/model.py)\n- [comfy/ldm/hunyuan_video/model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/hunyuan_video/model.py)\n- [comfy/ldm/cogvideo/model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/cogvideo/model.py)\n- [comfy/samplers.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/samplers.py)\n- [comfy/sample.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sample.py)\n</details>\n\n# Diffusion Models\n\n## Overview\n\nDiffusion models in ComfyUI are probabilistic generative models that learn to reverse a forward diffusion process. By gradually denoising random noise through a learned reverse process, these models generate high-quality images, videos, and audio from latent representations.\n\nComfyUI implements a modular architecture supporting multiple diffusion model families:\n\n| Model Family | Domain | Primary File |\n|--------------|--------|--------------|\n| Stable Diffusion | Image | `comfy/ldm/modules/diffusionmodules/model.py` |\n| Stable Diffusion XL | Image | `comfy/ldm/modules/diffusionmodules/openaimodel.py` |\n| Flux | Image | `comfy/ldm/flux/model.py` |\n| Wan | Video | `comfy/ldm/wan/model.py` |\n| Hunyuan Video | Video | `comfy/ldm/hunyuan_video/model.py` |\n| CogVideo | Video | `comfy/ldm/cogvideo/model.py` |\n\n## Architecture\n\n### Core Diffusion Module Structure\n\n```mermaid\ngraph TD\n    A[Latent Input] --> B[Diffusion Model]\n    B --> C[UNet Architecture]\n    C --> D[Time Embedding]\n    C --> E[Residual Blocks]\n    C --> F[Attention Layers]\n    D --> G[Denoised Output]\n    E --> G\n    F --> G\n    \n    H[Sampler] --> I[Noise Schedule]\n    I --> B\n    G --> J[VAE Decode]\n    J --> K[Final Output]\n```\n\n### Supported Model Types\n\nComfyUI natively supports state-of-the-art open-source diffusion models across multiple domains:\n\n#### Image Generation Models\n\n| Model Type | Description | Documentation Link |\n|------------|-------------|-------------------|\n| Stable Diffusion 1.5 | Latent diffusion model for image generation | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/) |\n| Stable Diffusion XL | Enhanced SD with improved quality | Included in core |\n| SDXL Turbo / LCM | Fast convergence models | [LCM Examples](https://comfyanonymous.github.io/ComfyUI_examples/lcm/) |\n| Stable Diffusion 3 / Flux | MM-DiT architecture for superior quality | [Flux Examples](https://comfyanonymous.github.io/ComfyUI_examples/flux/) |\n| Hunyuan DiT | Tencent's diffusion transformer | Included in core |\n| Ollin | Custom high-quality diffusion | Available via community |\n| Wan | Wan 2.1 and Wan 2.2 video models | [Wan Examples](https://comfyanonymous.github.io/ComfyUI_examples/wan/) |\n| HiDream | Advanced image generation | [HiDream Examples](https://comfyanonymous.github.io/ComfyUI_examples/hidream/) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n#### Video Generation Models\n\n| Model Type | Description | Documentation Link |\n|------------|-------------|-------------------|\n| Stable Video Diffusion | Frame interpolation and video generation | [Video Examples](https://comfyanonymous.github.io/ComfyUI_examples/video/) |\n| Mochi | High-quality video synthesis | [Mochi Examples](https://comfyanonymous.github.io/ComfyUI_examples/mochi/) |\n| LTX-Video | Lightweight video diffusion | [LTX Examples](https://comfyanonymous.github.io/ComfyUI_examples/ltxv/) |\n| Hunyuan Video | Tencent's video generation | [Hunyuan Examples](https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_video/) |\n| Wan 2.1/2.2 | Comprehensive video models | [Wan Examples](https://comfyanonymous.github.io/ComfyUI_examples/wan/) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n#### Audio Models\n\n| Model Type | Description |\n|------------|-------------|\n| Stable Audio | Audio generation and synthesis |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n#### Image Editing Models\n\n| Model Type | Description | Link |\n|------------|-------------|------|\n| Omnigen 2 | Unified image editing | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/omnigen/) |\n| Flux Kontext | In-context image editing | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/flux/#flux-kontext-image-editing-model) |\n| HiDream E1.1 | Advanced editing capabilities | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/hidream/#hidream-e11) |\n| Qwen Image Edit | Multi-modal editing | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/qwen_image/#edit-model) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Model Loading Architecture\n\n### Base Diffusion Model Files\n\n| File | Purpose |\n|------|---------|\n| `comfy/ldm/modules/diffusionmodules/model.py` | Core SD1.5/SD2.x diffusion model implementation |\n| `comfy/ldm/modules/diffusionmodules/openaimodel.py` | SDXL and newer architecture variants |\n| `comfy/ldm/flux/model.py` | Flux/MM-DiT architecture implementation |\n| `comfy/ldm/wan/model.py` | Wan video diffusion model |\n| `comfy/ldm/hunyuan_video/model.py` | Hunyuan video diffusion |\n| `comfy/ldm/cogvideo/model.py` | CogVideo model implementation |\n\n### Model Loading Workflow\n\n```mermaid\ngraph LR\n    A[Model Checkpoint] --> B[Model Loader Node]\n    B --> C[Load State Dict]\n    C --> D[Architecture Detection]\n    D --> E{Router}\n    E -->|SD 1.5/2.x| F[diffusionmodules/model.py]\n    E -->|SDXL| G[diffusionmodules/openaimodel.py]\n    E -->|Flux| H[flux/model.py]\n    E -->|Video| I[wan/hunyuan/cogvideo/model.py]\n```\n\n## Sampling System\n\n### Sampler Implementation\n\nThe sampling system is implemented in `comfy/samplers.py` and `comfy/sample.py`.\n\n| Component | File | Function |\n|-----------|------|----------|\n| SamplerFactory | `comfy/samplers.py` | Creates sampler instances |\n| KSampler | `comfy/samplers.py` | Main sampling loop implementation |\n| CFGGuider | `comfy/samplers.py` | Classifier-free guidance implementation |\n| Sampler | `comfy/sample.py` | Orchestrates the sampling process |\n\n### Sampling Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| steps | int | Number of denoising steps |\n| cfg | float | Classifier-free guidance scale |\n| sampler_name | str | Sampler algorithm (e.g., euler, dpmpp_2m) |\n| scheduler | str | Noise schedule type |\n| denoise | float | Denoising strength (0.0-1.0) |\n\n### Available Samplers\n\nComfyUI supports multiple sampling algorithms:\n\n| Sampler Category | Algorithms |\n|------------------|------------|\n| Euler Family | euler, euler_ancestral, euler_a |\n| DPM++ | dpmpp_2m, dpmpp_2m_karras, dpmpp_sde, dpmpp_sde_karras |\n| DDIM | ddim |\n| UniPC | unipc |\n| LCM | lcm (for LCM/SDXL-Turbo models) |\n\n### Noise Schedules\n\n| Scheduler | Description |\n|-----------|-------------|\n| normal | Standard noise schedule |\n| karras | Optimized schedule for better quality |\n| exponential | Exponential decay schedule |\n| simple | Simplified schedule |\n\n## Advanced Features\n\n### Textual Inversion\n\nComfyUI supports textual inversion embeddings for style and concept customization.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### LoRA Support\n\n| LoRA Type | Description |\n|-----------|-------------|\n| Regular LoRA | Standard low-rank adaptation |\n| LoCon | Location-aware conditioning |\n| LoHa | Low-rank Hadamard product adaptation |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Hypernetworks\n\nCustom hypernetworks can be loaded and applied to modify model behavior.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### ControlNet and T2I-Adapter\n\nStructural guidance for diffusion models through:\n\n| Type | Description |\n|------|-------------|\n| ControlNet | Conditioning via additional neural networks |\n| T2I-Adapter | Lightweight adapters for structure guidance |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Workflow Composition\n\n### Node Graph Architecture\n\n```mermaid\ngraph TD\n    A[Load Checkpoint] --> B[CLIP Text Encode]\n    B --> C[KSampler]\n    A --> D[VAE Encode]\n    D --> C\n    C --> E[VAE Decode]\n    E --> F[Save Image]\n    \n    G[Positive Prompt] --> B\n    H[Negative Prompt] --> B\n```\n\n### Example Workflows\n\n| Workflow | Purpose | Link |\n|----------|---------|------|\n| txt2img | Text-to-image generation | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/) |\n| img2img | Image-to-image transformation | Included in core |\n| Hires Fix | Two-pass upscaling | [Hires Fix](https://comfyanonymous.github.io/ComfyUI_examples/2_pass_txt2img/) |\n| Inpainting | Selective regeneration | [Inpaint](https://comfyanonymous.github.io/ComfyUI_examples/inpaint/) |\n| Area Composition | Multi-region composition | [Area Composition](https://comfyanonymous.github.io/ComfyUI_examples/area_composition/) |\n| Upscale | Super-resolution | [Upscale Models](https://comfyanonymous.github.io/ComfyUI_examples/upscale_models/) |\n| Model Merging | Combine model weights | [Model Merging](https://comfyanonymous.github.io/ComfyUI_examples/model_merging/) |\n| GLIGEN | Grounded generation | [GLIGEN](https://comfyanonymous.github.io/ComfyUI_examples/gligen/) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Performance Optimization\n\n### Latent Preview with TAESD\n\nComfyUI provides real-time preview capabilities using TAESD (Tiny AutoEncoder for Stable Diffusion):\n\n| Feature | Description |\n|---------|-------------|\n| Low-res Preview | Default fast latent preview |\n| TAESD Preview | High-quality previews |\n| --preview-method | CLI flag to select preview method |\n\nTo enable TAESD previews:\n\n1. Download decoder files from [taesd repository](https://github.com/madebyollin/taesd/):\n   - `taesd_decoder.pth`\n   - `taesdxl_decoder.pth`\n   - `taesd3_decoder.pth`\n   - `taef1_decoder.pth`\n\n2. Place files in `models/vae_approx` directory\n\n3. Launch with `--preview-method taesd`\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### GPU Support\n\n| Platform | Installation Command |\n|----------|---------------------|\n| NVIDIA (CUDA 12.1) | `pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121` |\n| NVIDIA (CUDA 12.4) | `pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu124` |\n| NVIDIA (CUDA 12.6) | `pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu126` |\n| AMD (ROCm) | `pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.1` |\n| Intel (XPU) | `pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu` |\n| Apple Silicon | Install PyTorch nightly per [Apple Developer Guide](https://developer.apple.com/metal/pytorch/) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Memory Efficient Attention\n\nFor AMD GPUs with ROCm, experimental memory efficient attention can be enabled:\n\n```bash\nTORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 python main.py --use-pytorch-cross-attention\n```\n\nFor potential speed improvements:\n\n```bash\nPYTORCH_TUNABLEOP_ENABLED=1 python main.py\n```\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Execution Model\n\n### Partial Graph Execution\n\nComfyUI's execution engine optimizes diffusion model runs:\n\n> Only parts of the graph that have an output with all the correct inputs will be executed.\n> Only parts of the graph that change from each execution to the next will be executed. If you submit the same graph twice, only the first will be executed. If you change the last part of the graph, only the part you changed and the part that depends on it will be re-executed.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Execution Flow\n\n```mermaid\ngraph TD\n    A[Submit Workflow] --> B[Analyze Dependencies]\n    B --> C[Identify Executable Nodes]\n    C --> D[Execute Required Nodes]\n    D --> E[Cache Results]\n    E --> F[Return Outputs]\n    \n    G[Submit Same Workflow] --> H{Cached?}\n    H -->|Yes| I[Skip Execution]\n    H -->|No| J[Execute Changed Nodes]\n    I --> F\n    J --> K[Update Cache]\n    K --> F\n```\n\n## API Integration\n\n### API Nodes\n\nComfyUI includes optional API nodes for accessing paid models from external providers through the official [Comfy API](https://docs.comfy.org/tutorials/api-nodes/overview).\n\nTo disable API nodes:\n\n```bash\npython main.py --disable-api-nodes\n```\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Offline Operation\n\nComfyUI works fully offline for core functionality:\n\n> Works fully offline: core will never download anything unless you want it to.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Release and Versioning\n\nComfyUI follows a structured release cycle:\n\n| Release Type | Frequency | Description |\n|--------------|-----------|-------------|\n| Major Stable | ~Every 2 weeks | New stable versions (e.g., v0.7.0) |\n| Patch | As needed | Backported fixes for stable releases |\n| Nightly | Daily | Cutting-edge updates from master branch |\n\n> Commits outside of the stable release tags may be very unstable and break many custom nodes.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## See Also\n\n- [ComfyUI Examples Repository](https://comfyanonymous.github.io/ComfyUI_examples/)\n- [ComfyUI Documentation](https://docs.comfy.org/)\n- [ComfyUI API Documentation](https://docs.comfy.org/tutorials/api-nodes/overview)\n- [Comfy Cloud](https://www.comfy.org/cloud)\n\n---\n\n<a id='page-text-processing'></a>\n\n## Text Processing and Encoders\n\n### 相关页面\n\n相关主题：[Diffusion Models](#page-diffusion-models)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [comfy/clip_model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/clip_model.py)\n- [comfy/sd1_clip.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sd1_clip.py)\n- [comfy/sdxl_clip.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sdxl_clip.py)\n- [comfy/text_encoders/flux.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/flux.py)\n- [comfy/text_encoders/t5.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/t5.py)\n- [comfy/text_encoders/llama.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/llama.py)\n- [comfy/sd.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sd.py)\n</details>\n\n# Text Processing and Encoders\n\n## Overview\n\nText processing and encoding in ComfyUI provides the mechanism to convert human-readable text prompts into numerical representations (embeddings) that can be consumed by diffusion models. This system supports various model architectures including SD1.x, SDXL, Flux, and modern multimodal models.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[User Text Prompt] --> B[Text Encoding Nodes]\n    B --> C[CLIPTextEncode]\n    B --> D[CLIP Text Encode Hires]\n    B --> E[Model-Specific Encoders]\n    C --> F[CLIP Models]\n    E --> G[Flux Encoder]\n    E --> H[T5 Encoder]\n    E --> I[Llama Encoder]\n    F --> J[Embedding Tensors]\n    G --> J\n    H --> J\n    I --> J\n    J --> K[Diffusion Model]\n```\n\n## CLIP Models\n\nThe `comfy/clip_model.py` module provides the foundational CLIP model implementation used across different model variants.\n\n资料来源：[comfy/clip_model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/clip_model.py)\n\n### SD1 CLIP\n\nThe SD1 CLIP implementation (`comfy/sd1_clip.py`) handles text encoding for Stable Diffusion 1.x models.\n\n资料来源：[comfy/sd1_clip.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sd1_clip.py)\n\n### SDXL CLIP\n\nThe SDXL CLIP implementation (`comfy/sdxl_clip.py`) extends text encoding capabilities for SDXL models with additional prompt handling.\n\n资料来源：[comfy/sdxl_clip.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sdxl_clip.py)\n\n## Text Encoders Module\n\nThe `comfy/text_encoders/` directory contains specialized encoders for modern model architectures.\n\n资料来源：[comfy/text_encoders/flux.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/flux.py), [comfy/text_encoders/t5.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/t5.py), [comfy/text_encoders/llama.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/llama.py)\n\n### Flux Encoder\n\nHandles text encoding for Flux models, typically combining CLIP and T5 encodings.\n\n### T5 Encoder\n\nImplements T5-based text encoding for models requiring transformer-based text processing.\n\n### Llama Encoder\n\nProvides Llama-based text encoding for advanced text understanding capabilities.\n\n## Embeddings System\n\nComfyUI supports custom embeddings stored in the `models/embeddings` directory.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Using Custom Embeddings\n\nEmbeddings can be referenced in the CLIPTextEncode node using the following syntax:\n\n```\nembedding:embedding_filename.pt\n```\n\nThe `.pt` extension can be omitted when specifying embeddings.\n\n## Model Integration\n\nText encoders are integrated into the broader model system through `comfy/sd.py`, which coordinates between different model components and their respective encoders.\n\n资料来源：[comfy/sd.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sd.py)\n\n## Supported Models\n\n| Model Family | Text Encoder(s) | Notes |\n|--------------|-----------------|-------|\n| SD 1.x | CLIP | Standard text encoding |\n| SDXL | CLIP | Dual CLIP support |\n| Flux | CLIP + T5 | Combined encoding approach |\n| HunyuanDiT | Custom | Model-specific implementation |\n\n## Text Encoding Workflow\n\n```mermaid\ngraph LR\n    A1[Positive Prompt] --> B[CLIPTextEncode]\n    A2[Negative Prompt] --> C[CLIPTextEncode]\n    B --> D[Positive Embeddings]\n    C --> E[Negative Embeddings]\n    D --> F[KSampler]\n    E --> F\n    F --> G[Image Generation]\n```\n\n## Node Types\n\n### CLIPTextEncode\n\nThe primary node for encoding text prompts into embeddings.\n\n**Input Parameters:**\n- `text`: The text prompt to encode\n- `clip`: The CLIP model to use for encoding\n\n**Output:**\n- `CONDITIONING`: The encoded text representation\n\n### Specialized Encoding Nodes\n\n| Node | Purpose | Use Case |\n|------|---------|----------|\n| CLIP Text Encode Hires | High-resolution aware encoding | Multi-pass workflows |\n| Model-Specific Encode | Architecture-specific handling | Flux, SDXL, etc. |\n\n## Best Practices\n\n1. **Prompt Formatting**: Use proper syntax for weight adjustments (e.g., `(text:1.2)`)\n2. **Embedding Loading**: Place custom embeddings in `models/embeddings`\n3. **Model Matching**: Ensure text encoder matches the generation model\n4. **Batch Processing**: Consider CLIP sequence length limitations\n\n## Related Components\n\n- **Model Management**: `app/model_manager.py` handles loading and caching of text encoder models\n- **Type System**: `comfy/comfy_types/` provides type hints for node development including IO types for text processing\n\n---\n\n<a id='page-memory-management'></a>\n\n## Memory Management\n\n### 相关页面\n\n相关主题：[Model Loading and Detection](#page-model-loading), [Execution Engine](#page-execution-engine)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [comfy/memory_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/memory_management.py) *(未在当前上下文检索到)*\n- [comfy/model_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/model_management.py) *(未在当前上下文检索到)*\n- [comfy/pinned_memory.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/pinned_memory.py) *(未在当前上下文检索到)*\n- [comfy/pixel_space_convert.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/pixel_space_convert.py) *(未在当前上下文检索到)*\n\n**注意**: 当前检索上下文未包含上述内存管理核心源文件。以下内容主要基于 README.md 中公开文档信息及可用上下文推断。实际实现细节请参阅实际源码文件。\n</details>\n\n# Memory Management\n\nComfyUI implements a sophisticated **smart memory management system** that enables efficient execution of large AI models on hardware with limited VRAM. This system is fundamental to ComfyUI's ability to run complex workflows on consumer-grade GPUs.\n\n## Overview\n\nThe memory management subsystem in ComfyUI handles the lifecycle of model data in GPU and system memory. Its primary objectives include:\n\n- **Automatic model offloading**: Dynamically moving models between GPU VRAM and system RAM\n- **VRAM optimization**: Enabling execution on GPUs with as little as 1GB of VRAM\n- **Execution caching**: Storing partial execution results to avoid redundant computation\n- **Memory cleanup**: Properly releasing resources when models are no longer needed\n\n资料来源：[README.md]()\n\n## Architecture Overview\n\n```mermaid\ngraph TD\n    A[Workflow Execution] --> B[Memory Manager]\n    B --> C{VRAM Available?}\n    C -->|Yes| D[Load Model to GPU]\n    C -->|No| E[Smart Offloading]\n    E --> F[Partial GPU Loading]\n    F --> G[System RAM Swap]\n    D --> H[Execute Nodes]\n    G --> H\n    H --> I[Cache Results]\n    I --> J[Memory Cleanup]\n    J --> K[Free VRAM]\n```\n\n## Key Memory Management Features\n\n### Smart Offloading\n\nComfyUI can automatically run large models on GPUs with limited VRAM through intelligent offloading strategies. When a model exceeds available VRAM, the system selectively keeps portions of the model in GPU memory while swapping other components to system RAM.\n\n### Low VRAM Support\n\nComfyUI supports execution on GPUs with as low as **1GB VRAM**. This is achieved through:\n\n| VRAM Level | Strategy |\n|------------|----------|\n| 1GB+ | Full offloading with sequential layer execution |\n| 4GB+ | Partial offloading with larger batch sizes |\n| 8GB+ | Minimal offloading, models stay loaded |\n| 16GB+ | Multiple models can stay in memory simultaneously |\n\n### Execution Optimization\n\nThe system implements intelligent execution optimization where:\n\n1. **Only changed graph segments execute** - If you submit the same graph twice, only the first execution runs\n2. **Dependency tracking** - Only parts of the graph that depend on changed nodes are re-executed\n3. **Partial graph execution** - Only graph segments with all correct inputs are executed\n\n资料来源：[README.md]()\n\n## Model Loading Strategies\n\nComfyUI supports multiple model formats and loading strategies:\n\n### Supported Model Formats\n\n| Format | Description | Safety |\n|--------|-------------|--------|\n| `.safetensors` | Safe tensor format, recommended | ✅ Safe |\n| `.ckpt` | Checkpoint files | ⚠️ Standard |\n| `.pt` / `.pth` | PyTorch state dicts | ⚠️ Legacy |\n\n### Memory-Efficient Loading\n\nThe system implements safe loading for all model formats, preventing arbitrary code execution from malicious model files.\n\n## GPU Memory Options\n\n### Command Line Options\n\nComfyUI provides several command-line options for memory management:\n\n```bash\n# CPU-only execution (slowest, works without GPU)\npython main.py --cpu\n\n# Force specific GPU device\npython main.py --device cuda:0\n```\n\n### Preview Method Configuration\n\nFor latent preview generation, ComfyUI supports different preview methods that vary in memory usage:\n\n| Method | Quality | Memory Usage | Description |\n|--------|---------|--------------|-------------|\n| `auto` | Low | Minimal | Default fast latent preview |\n| `taesd` | High | Low | TAESD decoder for high-quality previews |\n\nTo enable high-quality previews:\n\n```bash\n# Download TAESD decoder files to models/vae_approx/\n# Then launch with:\npython main.py --preview-method taesd\n```\n\n资料来源：[README.md]()\n\n## Memory Management Classes\n\nBased on the module structure, the memory management system consists of several key components:\n\n```mermaid\nclassDiagram\n    class MemoryManager {\n        +manage_vram()\n        +offload_model()\n        +load_model()\n    }\n    class ModelManager {\n        +register_model()\n        +get_model()\n        +unload_model()\n    }\n    class PinnedMemory {\n        +allocate_pinned()\n        +transfer_to_device()\n        +free_pinned()\n    }\n    class PixelSpaceConverter {\n        +to_latent()\n        +to_pixel()\n        +convert_tensor()\n    }\n```\n\n### Module Responsibilities\n\n| Module | Purpose |\n|--------|---------|\n| `memory_management.py` | Core VRAM management and model placement logic |\n| `model_management.py` | Model lifecycle, registration, and caching |\n| `pinned_memory.py` | Pinned memory allocation for efficient CPU-GPU transfers |\n| `pixel_space_convert.py` | Conversion between pixel and latent image spaces |\n\n## Execution Flow with Memory Management\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Workflow\n    participant MemoryManager\n    participant ModelCache\n    participant GPU\n    participant SystemRAM\n\n    User->>Workflow: Submit Workflow\n    Workflow->>MemoryManager: Request Model\n    MemoryManager->>ModelCache: Check Cache\n    alt Model in Cache\n        ModelCache-->>MemoryManager: Return Model Ref\n    else Model Not Cached\n        MemoryManager->>GPU: Check VRAM\n        alt Sufficient VRAM\n            GPU-->>MemoryManager: OK\n            MemoryManager->>GPU: Load Model\n        else Insufficient VRAM\n            MemoryManager->>SystemRAM: Offload Parts\n            MemoryManager->>GPU: Load Partial Model\n        end\n    end\n    MemoryManager-->>Workflow: Model Ready\n    Workflow->>GPU: Execute Nodes\n    GPU-->>Workflow: Results\n```\n\n## Best Practices\n\n1. **Close unused workflows** - Free memory for new models\n2. **Use `.safetensors` format** - Safer and often faster loading\n3. **Batch similar operations** - Reduces model loading/unloading cycles\n4. **Monitor VRAM usage** - Use system tools to track memory consumption\n\n## Configuration Files\n\nComfyUI supports model path configuration through `extra_model_paths.yaml`:\n\n```yaml\n# Example extra_model_paths.yaml\nmodels_dir: /path/to/models\ncheckpoints:\n  - /custom/checkpoint/path\n```\n\nThis allows sharing model directories with other Stable Diffusion installations, reducing duplicate storage.\n\n## Related Documentation\n\n- [GPU Requirements](https://github.com/comfyanonymous/ComfyUI/wiki/Which-GPU-should-I-buy-for-ComfyUI) - Hardware recommendations\n- [Model Installation](README.md#dependencies) - Setting up models\n- [Performance Tuning](#) - Optimization tips\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：Comfy-Org/ComfyUI\n\n摘要：发现 7 个潜在踩坑项，其中 0 个为 high/blocking；最高优先级：身份坑 - 仓库名和安装名不一致。\n\n## 1. 身份坑 · 仓库名和安装名不一致\n\n- 严重度：medium\n- 证据强度：runtime_trace\n- 发现：仓库名 `comfyui` 与安装入口 `comfy-cli` 不完全一致。\n- 对用户的影响：用户照着仓库名搜索包或照着包名找仓库时容易走错入口。\n- 建议检查：在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。\n- 复现命令：`pip install comfy-cli`\n- 防护动作：页面必须同时展示 repo 名和真实安装入口，避免用户搜索错包。\n- 证据：identity.distribution | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | repo=comfyui; install=comfy-cli\n\n## 2. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | README/documentation is current enough for a first validation pass.\n\n## 3. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | last_activity_observed missing\n\n## 4. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | no_demo; severity=medium\n\n## 5. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | no_demo; severity=medium\n\n## 6. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | issue_or_pr_quality=unknown\n\n## 7. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | release_recency=unknown\n\n<!-- canonical_name: Comfy-Org/ComfyUI; human_manual_source: deepwiki_human_wiki -->\n",
      "markdown_key": "comfyui",
      "pages": "draft",
      "source_refs": [
        {
          "evidence_id": "github_repo:589831718",
          "kind": "repo",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/Comfy-Org/ComfyUI"
        },
        {
          "evidence_id": "art_83bf33bc5149486696d9620fe38252c6",
          "kind": "docs",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/Comfy-Org/ComfyUI#readme"
        }
      ],
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "ComfyUI 说明书",
      "toc": [
        "https://github.com/Comfy-Org/ComfyUI 项目说明书",
        "目录",
        "Introduction to ComfyUI",
        "Overview",
        "Core Features",
        "System Architecture",
        "Installation",
        "Windows/Linux Manual Installation",
        "Doramagic 踩坑日志"
      ]
    }
  },
  "quality_gate": {
    "blocking_gaps": [],
    "category_confidence": "medium",
    "compile_status": "ready_for_review",
    "five_assets_present": true,
    "install_sandbox_verified": true,
    "missing_evidence": [],
    "next_action": "publish to Doramagic.ai project surfaces",
    "prompt_preview_boundary_ok": true,
    "publish_status": "publishable",
    "quick_start_verified": true,
    "repo_clone_verified": true,
    "repo_commit": "04856acc699f1559a11e00a9f68d2f9f9b9b8e96",
    "repo_inspection_error": null,
    "repo_inspection_files": [
      "pyproject.toml",
      "README.md",
      "requirements.txt"
    ],
    "repo_inspection_verified": true,
    "review_reasons": [],
    "tag_count_ok": true,
    "unsupported_claims": []
  },
  "schema_version": "0.1",
  "user_assets": {
    "ai_context_pack": {
      "asset_id": "ai_context_pack",
      "filename": "AI_CONTEXT_PACK.md",
      "markdown": "# comfyui - Doramagic AI Context Pack\n\n> 定位：安装前体验与判断资产。它帮助宿主 AI 有一个好的开始，但不代表已经安装、执行或验证目标项目。\n\n## 充分原则\n\n- **充分原则，不是压缩原则**：AI Context Pack 应该充分到让宿主 AI 在开工前理解项目价值、能力边界、使用入口、风险和证据来源；它可以分层组织，但不以最短摘要为目标。\n- **压缩策略**：只压缩噪声和重复内容，不压缩会影响判断和开工质量的上下文。\n\n## 给宿主 AI 的使用方式\n\n你正在读取 Doramagic 为 comfyui 编译的 AI Context Pack。请把它当作开工前上下文：帮助用户理解适合谁、能做什么、如何开始、哪些必须安装后验证、风险在哪里。不要声称你已经安装、运行或执行了目标项目。\n\n## Claim 消费规则\n\n- **事实来源**：Repo Evidence + Claim/Evidence Graph；Human Wiki 只提供显著性、术语和叙事结构。\n- **事实最低状态**：`supported`\n- `supported`：可以作为项目事实使用，但回答中必须引用 claim_id 和证据路径。\n- `weak`：只能作为低置信度线索，必须要求用户继续核实。\n- `inferred`：只能用于风险提示或待确认问题，不能包装成项目事实。\n- `unverified`：不得作为事实使用，应明确说证据不足。\n- `contradicted`：必须展示冲突来源，不得替用户强行选择一个版本。\n\n## 它最适合谁\n\n- **正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**：README 或插件配置提到多个宿主 AI。 证据：`README.md` Claim：`clm_0002` supported 0.86\n\n## 它能做什么\n\n- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`README.md` Claim：`clm_0001` supported 0.86\n\n## 怎么开始\n\n- `pip install comfy-cli` 证据：`README.md` Claim：`clm_0003` supported 0.86\n- `pip install -r manager_requirements.txt` 证据：`README.md` Claim：`clm_0004` supported 0.86\n\n## 继续前判断卡\n\n- **当前建议**：先做权限沙盒试用\n- **为什么**：项目存在安装命令、宿主配置或本地写入线索，不建议直接进入主力环境，应先在隔离环境试装。\n\n### 30 秒判断\n\n- **现在怎么做**：先做权限沙盒试用\n- **最小安全下一步**：先跑 Prompt Preview；若仍要安装，只在隔离环境试装\n- **先别相信**：工具权限边界不能在安装前相信。\n- **继续会触碰**：命令执行、本地环境或项目文件、宿主 AI 上下文\n\n### 现在可以相信\n\n- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86\n- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md` Claim：`clm_0001` supported 0.86\n- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0003` supported 0.86\n\n### 现在还不能相信\n\n- **工具权限边界不能在安装前相信。**（unverified）：MCP/tool 类项目通常会触碰文件、网络、浏览器或外部 API，必须真实检查权限和日志。\n- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。\n- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。\n- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。\n- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。\n- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。\n- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。\n- **安装命令是否需要网络、权限或全局写入？**（unverified）：这影响企业环境和个人环境的安装风险。 证据：`README.md`\n\n### 继续会触碰什么\n\n- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`\n- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`README.md`\n- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。\n\n### 最小安全下一步\n\n- **先跑 Prompt Preview**：用安装前交互式试用判断工作方式是否匹配，不需要授权或改环境。（适用：任何项目都适用，尤其是输出质量未知时。）\n- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）\n- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）\n\n### 退出方式\n\n- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。\n- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。\n- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。\n\n## 哪些只能预览\n\n- 解释项目适合谁和能做什么\n- 基于项目文档演示典型对话流程\n- 帮助用户判断是否值得安装或继续研究\n\n## 哪些必须安装后验证\n\n- 真实安装 Skill、插件或 CLI\n- 执行脚本、修改本地文件或访问外部服务\n- 验证真实输出质量、性能和兼容性\n\n## 边界与风险判断卡\n\n- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0005` inferred 0.45\n- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0006` supported 0.86\n- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。\n- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。\n- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。\n\n## 开工前工作上下文\n\n### 加载顺序\n\n- 先读取 how_to_use.host_ai_instruction，建立安装前判断资产的边界。\n- 读取 claim_graph_summary，确认事实来自 Claim/Evidence Graph，而不是 Human Wiki 叙事。\n- 再读取 intended_users、capabilities 和 quick_start_candidates，判断用户是否匹配。\n- 需要执行具体任务时，优先查 role_skill_index，再查 evidence_index。\n- 遇到真实安装、文件修改、网络访问、性能或兼容性问题时，转入 risk_card 和 boundaries.runtime_required。\n\n### 任务路由\n\n- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`README.md` Claim：`clm_0001` supported 0.86\n\n### 上下文规模\n\n- 文件总数：815\n- 重要文件覆盖：40/815\n- 证据索引条目：80\n- 角色 / Skill 条目：11\n\n### 证据不足时的处理\n\n- **missing_evidence**：说明证据不足，要求用户提供目标文件、README 段落或安装后验证记录；不要补全事实。\n- **out_of_scope_request**：说明该任务超出当前 AI Context Pack 证据范围，并建议用户先查看 Human Manual 或真实安装后验证。\n- **runtime_request**：给出安装前检查清单和命令来源，但不要替用户执行命令或声称已执行。\n- **source_conflict**：同时展示冲突来源，标记为待核实，不要强行选择一个版本。\n\n## Prompt Recipes\n\n### 适配判断\n\n- 目标：判断这个项目是否适合用户当前任务。\n- 预期输出：适配结论、关键理由、证据引用、安装前可预览内容、必须安装后验证内容、下一步建议。\n\n```text\n请基于 comfyui 的 AI Context Pack，先问我 3 个必要问题，然后判断它是否适合我的任务。回答必须包含：适合谁、能做什么、不能做什么、是否值得安装、证据来自哪里。所有项目事实必须引用 evidence_refs、source_paths 或 claim_id。\n```\n\n### 安装前体验\n\n- 目标：让用户在安装前感受核心工作流，同时避免把预览包装成真实能力或营销承诺。\n- 预期输出：一段带边界标签的体验剧本、安装后验证清单和谨慎建议；不含真实运行承诺或强营销表述。\n\n```text\n请把 comfyui 当作安装前体验资产，而不是已安装工具或真实运行环境。\n\n请严格输出四段：\n1. 先问我 3 个必要问题。\n2. 给出一段“体验剧本”：用 [安装前可预览]、[必须安装后验证]、[证据不足] 三种标签展示它可能如何引导工作流。\n3. 给出安装后验证清单：列出哪些能力只有真实安装、真实宿主加载、真实项目运行后才能确认。\n4. 给出谨慎建议：只能说“值得继续研究/试装”“先补充信息后再判断”或“不建议继续”，不得替项目背书。\n\n硬性边界：\n- 不要声称已经安装、运行、执行测试、修改文件或产生真实结果。\n- 不要写“自动适配”“确保通过”“完美适配”“强烈建议安装”等承诺性表达。\n- 如果描述安装后的工作方式，必须使用“如果安装成功且宿主正确加载 Skill，它可能会……”这种条件句。\n- 体验剧本只能写成“示例台词/假设流程”：使用“可能会询问/可能会建议/可能会展示”，不要写“已写入、已生成、已通过、正在运行、正在生成”。\n- Prompt Preview 不负责给安装命令；如用户准备试装，只能提示先阅读 Quick Start 和 Risk Card，并在隔离环境验证。\n- 所有项目事实必须来自 supported claim、evidence_refs 或 source_paths；inferred/unverified 只能作风险或待确认项。\n\n```\n\n### 角色 / Skill 选择\n\n- 目标：从项目里的角色或 Skill 中挑选最匹配的资产。\n- 预期输出：候选角色或 Skill 列表，每项包含适用场景、证据路径、风险边界和是否需要安装后验证。\n\n```text\n请读取 role_skill_index，根据我的目标任务推荐 3-5 个最相关的角色或 Skill。每个推荐都要说明适用场景、可能输出、风险边界和 evidence_refs。\n```\n\n### 风险预检\n\n- 目标：安装或引入前识别环境、权限、规则冲突和质量风险。\n- 预期输出：环境、权限、依赖、许可、宿主冲突、质量风险和未知项的检查清单。\n\n```text\n请基于 risk_card、boundaries 和 quick_start_candidates，给我一份安装前风险预检清单。不要替我执行命令，只说明我应该检查什么、为什么检查、失败会有什么影响。\n```\n\n### 宿主 AI 开工指令\n\n- 目标：把项目上下文转成一次对话开始前的宿主 AI 指令。\n- 预期输出：一段边界明确、证据引用明确、适合复制给宿主 AI 的开工前指令。\n\n```text\n请基于 comfyui 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。\n```\n\n\n## 角色 / Skill 索引\n\n- 共索引 11 个角色 / Skill / 项目文档条目。\n\n- **ComfyUI**（project_doc）：ComfyUI The most powerful and modular AI engine for content creation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`\n- **Generate new revision**（project_doc）：1. Update models in /app/database/models.py 2. Run alembic revision --autogenerate -m \"{your message}\" 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`alembic_db/README.md`\n- **Pytest Unit Tests**（project_doc）：pip install -r tests-unit/requirements.txt 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`tests-unit/README.md`\n- **Automated Testing**（project_doc）：Additional requirements for running tests: Run inference tests: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`tests/README.md`\n- **ComfyUI Internal Routes**（project_doc）：All routes under the /internal path are designated for internal use by ComfyUI only . These routes are not intended for use by external applications may change at any time without notice. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`api_server/routes/internal/README.md`\n- **GLSL Shader Sources**（project_doc）：This folder contains the GLSL fragment shaders extracted from blueprint JSON files for easier editing and version control. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`blueprints/.glsl/README.md`\n- **Comfy Typing**（project_doc）：Comfy Typing Type hinting for ComfyUI Node development 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`comfy/comfy_types/README.md`\n- **Contributing to ComfyUI**（project_doc）：Welcome, and thank you for your interest in contributing to ComfyUI! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`\n- **The Comfy guide to Quantization**（project_doc）：Quantization aims to map a high-precision value x f to a lower precision format with minimal loss in accuracy. These smaller formats then serve to reduce the models memory footprint and increase throughput by using specialized hardware. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`QUANTIZATION.md`\n- **Security Policy**（project_doc）：ComfyUI is designed to run locally. By default, the server binds to 127.0.0.1 , meaning only the user's own machine can reach it. Our threat model assumes: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`SECURITY.md`\n- **API Node PR Checklist**（project_doc）：Pricing & Billing - Need pricing update - No pricing update 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.github/PULL_REQUEST_TEMPLATE/api-node.md`\n\n## 证据索引\n\n- 共索引 80 条证据。\n\n- **ComfyUI**（documentation）：ComfyUI The most powerful and modular AI engine for content creation. 证据：`README.md`\n- **Generate new revision**（documentation）：1. Update models in /app/database/models.py 2. Run alembic revision --autogenerate -m \"{your message}\" 证据：`alembic_db/README.md`\n- **Pytest Unit Tests**（documentation）：pip install -r tests-unit/requirements.txt 证据：`tests-unit/README.md`\n- **Automated Testing**（documentation）：Additional requirements for running tests: Run inference tests: 证据：`tests/README.md`\n- **ComfyUI Internal Routes**（documentation）：All routes under the /internal path are designated for internal use by ComfyUI only . These routes are not intended for use by external applications may change at any time without notice. 证据：`api_server/routes/internal/README.md`\n- **GLSL Shader Sources**（documentation）：This folder contains the GLSL fragment shaders extracted from blueprint JSON files for easier editing and version control. 证据：`blueprints/.glsl/README.md`\n- **Comfy Typing**（documentation）：Comfy Typing Type hinting for ComfyUI Node development 证据：`comfy/comfy_types/README.md`\n- **Contributing to ComfyUI**（documentation）：Welcome, and thank you for your interest in contributing to ComfyUI! 证据：`CONTRIBUTING.md`\n- **License**（source_file）：GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 证据：`LICENSE`\n- **The Comfy guide to Quantization**（documentation）：Quantization aims to map a high-precision value x f to a lower precision format with minimal loss in accuracy. These smaller formats then serve to reduce the models memory footprint and increase throughput by using specialized hardware. 证据：`QUANTIZATION.md`\n- **Security Policy**（documentation）：ComfyUI is designed to run locally. By default, the server binds to 127.0.0.1 , meaning only the user's own machine can reach it. Our threat model assumes: 证据：`SECURITY.md`\n- **API Node PR Checklist**（documentation）：Pricing & Billing - Need pricing update - No pricing update 证据：`.github/PULL_REQUEST_TEMPLATE/api-node.md`\n- **Brightness And Contrast**（structured_config）：{ \"revision\": 0, \"last node id\": 140, \"last link id\": 0, \"nodes\": { \"id\": 140, \"type\": \"916dff42-6166-4d45-b028-04eaf69fbb35\", \"pos\": 500, 1440 , \"size\": 250, 178 , \"flags\": {}, \"order\": 2, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"properties\": { \"proxyWidgets\": \"4\", \"value\" , \"5\", \"value\" }, \"widgets values\": , \"title\": \"Brightness and Contrast\" } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"916dff42-6166-4d45-b028-04eaf69fbb35\", \"version\": 1, \"state\": { \"lastGroupId\":… 证据：`blueprints/Brightness and Contrast.json`\n- **Canny To Image (Z Image Turbo)**（structured_config）：{ \"id\": \"e046dd74-e2a7-4f31-a75b-5e11a8c72d4e\", \"revision\": 0, \"last node id\": 18, \"last link id\": 32, \"nodes\": { \"id\": 18, \"type\": \"c84f7959-3738-422b-ba6e-5808b5e90101\", \"pos\": 300, 3830 , \"size\": 400, 460 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"control image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"prompt\", \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"label\": \"canny low threshold\", \"name\": \"low threshold\", \"type\": \"FLOAT\", \"widget\": { \"name\": \"low threshold\" }, \"link\": null }, { \"label\": \"canny high threshold\", \"name\": \"high threshold\", \"type\": \"FLOAT\", \"widget\": { \"name\": \"high threshold\" }, \"link\": null },… 证据：`blueprints/Canny to Image (Z-Image-Turbo).json`\n- **Canny To Video (Ltx 2.0)**（structured_config）：{ \"id\": \"02f6166f-32f8-4673-b861-76be1464cba5\", \"revision\": 0, \"last node id\": 155, \"last link id\": 391, \"nodes\": { \"id\": 1, \"type\": \"884e1862-7567-4e72-bd2a-fd4fdfd06320\", \"pos\": 1519.643633934233, 3717.5350173634242 , \"size\": 400, 500 , \"flags\": { \"collapsed\": false }, \"order\": 0, \"mode\": 0, \"inputs\": { \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"label\": \"canny images\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"image strength\", \"name\": \"strength\", \"type\": \"FLOAT\", \"widget\": { \"name\": \"strength\" }, \"link\": null }, { \"label\": \"disable first frame\", \"name\": \"bypass\", \"type\": \"BOOLEAN\", \"widget\": { \"name\": \"bypass\" }, \"link\": null },… 证据：`blueprints/Canny to Video (LTX 2.0).json`\n- **Chromatic Aberration**（structured_config）：{ \"revision\": 0, \"last node id\": 19, \"last link id\": 0, \"nodes\": { \"id\": 19, \"type\": \"2c5ef154-2bde-496d-bc8b-9dcf42f2913f\", \"pos\": 3710, -2070 , \"size\": 260, 82 , \"flags\": {}, \"order\": 4, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"title\": \"Chromatic Aberration\", \"properties\": { \"proxyWidgets\": \"17\", \"choice\" , \"18\", \"value\" }, \"widgets values\": } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"2c5ef154-2bde-496d-bc8b-9dcf42f2913f\", \"version\": 1, \"state\": { \"lastGroupId\": 0,… 证据：`blueprints/Chromatic Aberration.json`\n- **Color Adjustment**（structured_config）：{ \"revision\": 0, \"last node id\": 14, \"last link id\": 0, \"nodes\": { \"id\": 14, \"type\": \"36677b92-5dd8-47a5-9380-4da982c1894f\", \"pos\": 3610, -2630 , \"size\": 270, 150 , \"flags\": {}, \"order\": 3, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"properties\": { \"proxyWidgets\": \"4\", \"value\" , \"5\", \"value\" , \"7\", \"value\" , \"6\", \"value\" }, \"widgets values\": , \"title\": \"Color Adjustment\" } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"36677b92-5dd8-47a5-9380-4da982c1894f\", \"version\": 1, \"st… 证据：`blueprints/Color Adjustment.json`\n- **Color Balance**（structured_config）：{ \"revision\": 0, \"last node id\": 20, \"last link id\": 0, \"nodes\": { \"id\": 20, \"type\": \"243b9e93-7303-4500-8c70-58acb712f5bc\", \"pos\": 3610, -2630 , \"size\": 270, 420 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"properties\": { \"proxyWidgets\": \"4\", \"value\" , \"5\", \"value\" , \"6\", \"value\" , \"7\", \"value\" , \"8\", \"value\" , \"9\", \"value\" , \"10\", \"value\" , \"11\", \"value\" , \"12\", \"value\" , \"13\", \"value\" }, \"widgets values\": , \"title\": \"Color Balance\" } , \"links\": , \"version\": 0.4, \"def… 证据：`blueprints/Color Balance.json`\n- **Color Curves**（structured_config）：{ \"revision\": 0, \"last node id\": 10, \"last link id\": 0, \"nodes\": { \"id\": 10, \"type\": \"d5c462c8-1372-4af8-84f2-547c83470d04\", \"pos\": 3610, -2630 , \"size\": 270, 420 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"properties\": { \"proxyWidgets\": \"4\", \"curve\" , \"5\", \"curve\" , \"6\", \"curve\" , \"7\", \"curve\" }, \"widgets values\": , \"title\": \"Color Curves\" } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"d5c462c8-1372-4af8-84f2-547c83470d04\", \"version\": 1, \"state\"… 证据：`blueprints/Color Curves.json`\n- **Controlnet (Z Image Turbo)**（structured_config）：{ \"revision\": 0, \"last node id\": 85, \"last link id\": 0, \"nodes\": { \"id\": 85, \"type\": \"d2e76ecf-6e84-4b8c-8913-48efc09ec1c4\", \"pos\": 440, 1220 , \"size\": 480, 0 , \"flags\": {}, \"order\": 6, \"mode\": 0, \"inputs\": { \"label\": \"control image\", \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"name\": \"seed\", \"type\": \"INT\", \"widget\": { \"name\": \"seed\" }, \"link\": null }, { \"name\": \"unet name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"unet name\" }, \"link\": null }, { \"name\": \"clip name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"clip name\" }, \"link\": null }, { \"name\": \"vae name\", \"type\": \"COMBO\", \"widg… 证据：`blueprints/ControlNet (Z-Image-Turbo).json`\n- **Crop Images 2X2**（structured_config）：{ \"revision\": 0, \"last node id\": 139, \"last link id\": 0, \"nodes\": { \"id\": 135, \"type\": \"3b5ed000-6ab3-4458-91f7-8d6d366b0b40\", \"pos\": -2479.9999801712506, 2019.9999372732784 , \"size\": 230, 170 , \"flags\": {}, \"order\": 3, \"mode\": 0, \"inputs\": { \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"top left\", \"localized name\": \"IMAGE\", \"name\": \"IMAGE\", \"type\": \"IMAGE\", \"links\": }, { \"label\": \"bottom left\", \"localized name\": \"IMAGE 1\", \"name\": \"IMAGE 1\", \"type\": \"IMAGE\", \"links\": }, { \"label\": \"top right\", \"localized name\": \"IMAGE 2\", \"name\": \"IMAGE 2\", \"type\": \"IMAGE\", \"links\": }, { \"label\": \"bottom right\", \"localized name\": \"IMAGE 3\", \"name\": \"IM… 证据：`blueprints/Crop Images 2x2.json`\n- **Crop Images 3X3**（structured_config）：{ \"revision\": 0, \"last node id\": 141, \"last link id\": 0, \"nodes\": { \"id\": 134, \"type\": \"7fd47bca-ff89-476c-a98d-ca6f7cf756fe\", \"pos\": -2620, 1620 , \"size\": 230, 290 , \"flags\": {}, \"order\": 2, \"mode\": 0, \"inputs\": { \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"top left\", \"localized name\": \"IMAGE\", \"name\": \"IMAGE\", \"type\": \"IMAGE\", \"links\": }, { \"label\": \"top center\", \"name\": \"IMAGE 1\", \"type\": \"IMAGE\", \"links\": }, { \"label\": \"top right\", \"name\": \"IMAGE 2\", \"type\": \"IMAGE\", \"links\": }, { \"label\": \"middle left\", \"name\": \"IMAGE 3\", \"type\": \"IMAGE\", \"links\": }, { \"label\": \"middle center\", \"name\": \"IMAGE 4\", \"type\": \"IMAGE\", \"links\": }, { \"l… 证据：`blueprints/Crop Images 3x3.json`\n- **Depth To Image (Z Image Turbo)**（structured_config）：{ \"id\": \"e046dd74-e2a7-4f31-a75b-5e11a8c72d4e\", \"revision\": 0, \"last node id\": 76, \"last link id\": 259, \"nodes\": { \"id\": 13, \"type\": \"d8492a46-9e6c-4917-b5ea-4273aabf5f51\", \"pos\": 400, 3630 , \"size\": 400, 470 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"control image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"prompt\", \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"name\": \"unet name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"unet name\" }, \"link\": null }, { \"name\": \"clip name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"clip name\" }, \"link\": null }, { \"name\": \"vae name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"vae name\" }, \"link\":… 证据：`blueprints/Depth to Image (Z-Image-Turbo).json`\n- **Depth To Video (Ltx 2.0)**（structured_config）：{ \"id\": \"ec176c82-4db5-4ab9-b5a0-8aa8e5684a81\", \"revision\": 0, \"last node id\": 191, \"last link id\": 433, \"nodes\": { \"id\": 143, \"type\": \"68857357-cbc2-4c3a-a786-c3a58d43f9b1\", \"pos\": 289.99998661973035, 3960.0002084505168 , \"size\": 400, 500 , \"flags\": { \"collapsed\": false }, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"prompt\", \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"label\": \"image strength\", \"name\": \"strength\", \"type\": \"FLOAT\", \"widget\": { \"name\": \"strength\" }, \"link\": null }, { \"label\": \"disable first frame\", \"name\": \"bypass\", \"type\": \"BOOLEAN\", \"widget\": { \"name\": \"bypass\" }, \"link\": null }, { \"label\": \"depth reference video\", \"name\": \"video\", \"t… 证据：`blueprints/Depth to Video (ltx 2.0).json`\n- **Edge Preserving Blur**（structured_config）：{ \"revision\": 0, \"last node id\": 136, \"last link id\": 0, \"nodes\": { \"id\": 136, \"type\": \"c6dc0f88-416b-4db1-bed1-442d793de5ad\", \"pos\": 669.0822222222221, 835.5507407407408 , \"size\": 210, 106 , \"flags\": {}, \"order\": 1, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"properties\": { \"proxyWidgets\": \"130\", \"value\" , \"131\", \"value\" , \"133\", \"value\" }, \"widgets values\": , \"title\": \"Edge-Preserving Blur\" } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"c6dc0f88-416b-4db1-bed1-442d793de5… 证据：`blueprints/Edge-Preserving Blur.json`\n- **Film Grain**（structured_config）：{ \"revision\": 0, \"last node id\": 22, \"last link id\": 0, \"nodes\": { \"id\": 22, \"type\": \"3324cf54-bcff-405f-a4bf-c5122c72fe56\", \"pos\": 4800, -1180 , \"size\": 250, 154 , \"flags\": {}, \"order\": 4, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"title\": \"Film Grain\", \"properties\": { \"proxyWidgets\": \"17\", \"value\" , \"18\", \"value\" , \"19\", \"value\" , \"20\", \"value\" , \"21\", \"choice\" }, \"widgets values\": } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"3324cf54-bcff-405f-a4bf-c5122c72fe56\", \"ve… 证据：`blueprints/Film Grain.json`\n- **First Last Frame To Video (Ltx 2.3)**（structured_config）：{ \"revision\": 0, \"last node id\": 228, \"last link id\": 0, \"nodes\": { \"id\": 228, \"type\": \"a5982aee-8136-4819-86a0-cf9d9e510ad6\", \"pos\": 1490, 4730 , \"size\": 274.8169921875, 276 , \"flags\": {}, \"order\": 3, \"mode\": 0, \"inputs\": { \"label\": \"first frame\", \"localized name\": \"input\", \"name\": \"input\", \"type\": \"IMAGE,MASK\", \"link\": null }, { \"label\": \"last frame\", \"localized name\": \"input 1\", \"name\": \"input 1\", \"type\": \"IMAGE,MASK\", \"link\": null }, { \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"label\": \"width\", \"name\": \"value\", \"type\": \"INT\", \"widget\": { \"name\": \"value\" }, \"link\": null }, { \"label\": \"height\", \"name\": \"value 1\", \"type\": \"INT\", \"widget\": { \"name\": \"… 证据：`blueprints/First-Last-Frame to Video (LTX-2.3).json`\n- **First Last Frame To Video**（structured_config）：{ \"revision\": 0, \"last node id\": 227, \"last link id\": 0, \"nodes\": { \"id\": 227, \"type\": \"283e4561-61a2-4538-b960-265736eb041f\", \"pos\": 620, 3140 , \"size\": 540, 0 , \"flags\": {}, \"order\": 3, \"mode\": 0, \"inputs\": { \"label\": \"first frame\", \"localized name\": \"input\", \"name\": \"input\", \"type\": \"IMAGE,MASK\", \"link\": null }, { \"label\": \"last frame\", \"localized name\": \"input 1\", \"name\": \"input 1\", \"type\": \"IMAGE,MASK\", \"link\": null }, { \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"label\": \"width\", \"name\": \"value\", \"type\": \"INT\", \"widget\": { \"name\": \"value\" }, \"link\": null }, { \"label\": \"height\", \"name\": \"value 1\", \"type\": \"INT\", \"widget\": { \"name\": \"value 1\" }, \"l… 证据：`blueprints/First-Last-Frame to Video.json`\n- **Frame Interpolation**（structured_config）：{ \"revision\": 0, \"last node id\": 16, \"last link id\": 0, \"nodes\": { \"id\": 16, \"type\": \"022693be-2baa-4009-870a-28921508a7ef\", \"pos\": -2990, -3240 , \"size\": 410, 200 , \"flags\": {}, \"order\": 2, \"mode\": 0, \"inputs\": { \"localized name\": \"video\", \"name\": \"video\", \"type\": \"VIDEO\", \"link\": null }, { \"label\": \"multiplier\", \"name\": \"value\", \"type\": \"INT\", \"widget\": { \"name\": \"value\" }, \"link\": null }, { \"label\": \"enable fps multiplier\", \"name\": \"value 1\", \"type\": \"BOOLEAN\", \"widget\": { \"name\": \"value 1\" }, \"link\": null }, { \"name\": \"model name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"model name\" }, \"link\": null } , \"outputs\": { \"label\": \"VIDEO\", \"name\": \"VIDEO 1\", \"type\": \"VIDEO\", \"links\": }, { \"name\"… 证据：`blueprints/Frame Interpolation.json`\n- **Get Any Video Frame**（structured_config）：{ \"revision\": 0, \"last node id\": 98, \"last link id\": 0, \"nodes\": { \"id\": 98, \"type\": \"dca6e78d-fb06-421e-97f7-6ce17a665260\", \"pos\": -410, -2230 , \"size\": 270, 104 , \"flags\": {}, \"order\": 7, \"mode\": 0, \"inputs\": { \"name\": \"video\", \"type\": \"VIDEO\", \"link\": null }, { \"label\": \"frame index\", \"name\": \"value\", \"type\": \"INT\", \"widget\": { \"name\": \"value\" }, \"link\": null } , \"outputs\": { \"name\": \"IMAGE\", \"type\": \"IMAGE\", \"links\": } , \"title\": \"Get Any Video Frame\", \"properties\": { \"proxyWidgets\": \"100\", \"value\" }, \"widgets values\": } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"dca6e78d-fb06-421e-97f7-6ce17a665260\", \"version\": 1, \"state\": { \"lastGroupId\": 1, \"lastNodeId\": 136,… 证据：`blueprints/Get Any Video Frame.json`\n- **Glow**（structured_config）：{ \"revision\": 0, \"last node id\": 37, \"last link id\": 0, \"nodes\": { \"id\": 37, \"type\": \"0a99445a-aaf8-4a7f-aec3-d7d710ae1495\", \"pos\": 2160, -360 , \"size\": 260, 154 , \"flags\": {}, \"order\": 4, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"properties\": { \"proxyWidgets\": \"34\", \"value\" , \"35\", \"value\" , \"33\", \"value\" , \"31\", \"choice\" , \"32\", \"color\" }, \"widgets values\": , \"title\": \"Glow\" } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"0a99445a-aaf8-4a7f-aec3-d7d710ae1495\", \"version\"… 证据：`blueprints/Glow.json`\n- **Hue And Saturation**（structured_config）：{ \"revision\": 0, \"last node id\": 11, \"last link id\": 0, \"nodes\": { \"id\": 11, \"type\": \"c64f83e9-aa5d-4031-89f1-0704e39299fe\", \"pos\": 870, -220 , \"size\": 250, 178 , \"flags\": {}, \"order\": 2, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"title\": \"Hue and Saturation\", \"properties\": { \"proxyWidgets\": \"2\", \"choice\" , \"4\", \"value\" , \"5\", \"value\" , \"6\", \"value\" , \"7\", \"value\" , \"3\", \"choice\" }, \"widgets values\": } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"c64f83e9-aa5d-4031-89f1-0… 证据：`blueprints/Hue and Saturation.json`\n- **Image Blur**（structured_config）：{ \"revision\": 0, \"last node id\": 8, \"last link id\": 0, \"nodes\": { \"id\": 8, \"type\": \"198632a3-ee76-4aab-9ce7-a69c624eaff9\", \"pos\": 4470, -1840 , \"size\": 210, 82 , \"flags\": {}, \"order\": 3, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"blurred image\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"properties\": { \"proxyWidgets\": \"12\", \"choice\" , \"10\", \"value\" }, \"widgets values\": , \"title\": \"Image Blur\" } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"198632a3-ee76-4aab-9ce7-a69c624eaff9\", \"version\": 1, \"state\": { \"lastGroupId\": 0, \"l… 证据：`blueprints/Image Blur.json`\n- **Image Captioning (Gemini)**（structured_config）：{ \"revision\": 0, \"last node id\": 231, \"last link id\": 0, \"nodes\": { \"id\": 231, \"type\": \"e3e78497-720e-45a2-b4fb-c7bfdb80dd11\", \"pos\": 23.13283014087665, 1034.468391137315 , \"size\": 280, 260 , \"flags\": {}, \"order\": 8, \"mode\": 0, \"inputs\": { \"localized name\": \"images\", \"name\": \"images\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"prompt\", \"type\": \"STRING\", \"widget\": { \"name\": \"prompt\" }, \"link\": null }, { \"name\": \"model\", \"type\": \"COMBO\", \"widget\": { \"name\": \"model\" }, \"link\": null } , \"outputs\": { \"localized name\": \"STRING\", \"name\": \"STRING\", \"type\": \"STRING\", \"links\": } , \"properties\": { \"proxyWidgets\": \"-1\", \"prompt\" , \"-1\", \"model\" , \"1\", \"seed\" , \"cnr id\": \"comfy-core\", \"ver\": \"0.13.0\" }… 证据：`blueprints/Image Captioning (gemini).json`\n- **Image Channels**（structured_config）：{ \"revision\": 0, \"last node id\": 29, \"last link id\": 0, \"nodes\": { \"id\": 29, \"type\": \"4c9d6ea4-b912-40e5-8766-6793a9758c53\", \"pos\": 1970, -230 , \"size\": 180, 86 , \"flags\": {}, \"order\": 5, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"R\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": }, { \"label\": \"G\", \"localized name\": \"IMAGE1\", \"name\": \"IMAGE1\", \"type\": \"IMAGE\", \"links\": }, { \"label\": \"B\", \"localized name\": \"IMAGE2\", \"name\": \"IMAGE2\", \"type\": \"IMAGE\", \"links\": }, { \"label\": \"A\", \"localized name\": \"IMAGE3\", \"name\": \"IMAGE3\", \"type\": \"IMAGE\", \"links\": } ,… 证据：`blueprints/Image Channels.json`\n- **Image Edit (Firered Image Edit 1.1)**（structured_config）：{ \"revision\": 0, \"last node id\": 213, \"last link id\": 0, \"nodes\": { \"id\": 213, \"type\": \"e35fbbeb-d7b1-46d1-a74e-959517d0fb1a\", \"pos\": -700, -470 , \"size\": 500, 0 , \"flags\": {}, \"order\": 2, \"mode\": 0, \"inputs\": { \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"image2 optional \", \"name\": \"image2 1\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"image3 optional \", \"name\": \"image3 1\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"prompt\", \"type\": \"STRING\", \"widget\": { \"name\": \"prompt\" }, \"link\": null }, { \"label\": \"enable turbo mode\", \"name\": \"value\", \"type\": \"BOOLEAN\", \"widget\": { \"name\": \"value\" }, \"link\": null }, { \"name\": \"seed\", \"type\": \"INT\", \"widget\"… 证据：`blueprints/Image Edit (FireRed Image Edit 1.1).json`\n- **Image Edit (Flux.2 Dev)**（structured_config）：{ \"revision\": 0, \"last node id\": 139, \"last link id\": 0, \"nodes\": { \"id\": 139, \"type\": \"41b0c117-7470-454c-914e-b8742dc06d62\", \"pos\": -650, 570 , \"size\": 400, 0 , \"flags\": {}, \"order\": 3, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"pixels\", \"name\": \"pixels\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"prompt\", \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"name\": \"unet name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"unet name\" }, \"link\": null }, { \"name\": \"clip name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"clip name\" }, \"link\": null }, { \"name\": \"vae name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"vae name\" }, \"link\": null }, { \"label\": \"enable… 证据：`blueprints/Image Edit (Flux.2 Dev).json`\n- **Image Edit (Flux.2 Klein 4B)**（structured_config）：{ \"id\": \"6686cb78-8003-4289-b969-929755e9a84d\", \"revision\": 0, \"last node id\": 81, \"last link id\": 179, \"nodes\": { \"id\": 75, \"type\": \"7b34ab90-36f9-45ba-a665-71d418f0df18\", \"pos\": 311.66672468419983, 830 , \"size\": 400, 470 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"prompt\", \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"unet name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"unet name\" }, \"link\": null }, { \"name\": \"clip name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"clip name\" }, \"link\": null }, { \"name\": \"vae name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"vae name\" }, \"link\": null } , \"ou… 证据：`blueprints/Image Edit (Flux.2 Klein 4B).json`\n- **Image Edit (Longcat Image Edit)**（structured_config）：{ \"revision\": 0, \"last node id\": 176, \"last link id\": 0, \"nodes\": { \"id\": 176, \"type\": \"372a02a0-a79c-40b4-84a9-34f246fe0e9c\", \"pos\": 967.0861152473078, 4977.534165136897 , \"size\": 330, 380 , \"flags\": {}, \"order\": 3, \"mode\": 0, \"inputs\": { \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"prompt\", \"type\": \"STRING\", \"widget\": { \"name\": \"prompt\" }, \"link\": null }, { \"name\": \"steps\", \"type\": \"INT\", \"widget\": { \"name\": \"steps\" }, \"link\": null }, { \"name\": \"cfg\", \"type\": \"FLOAT\", \"widget\": { \"name\": \"cfg\" }, \"link\": null }, { \"name\": \"seed\", \"type\": \"INT\", \"widget\": { \"name\": \"seed\" }, \"link\": null }, { \"name\": \"unet name\", \"type\": \"COMBO\", \"widget\": { \"name… 证据：`blueprints/Image Edit (LongCat Image Edit).json`\n- **Image Edit (Qwen 2509)**（structured_config）：{ \"revision\": 0, \"last node id\": 433, \"last link id\": 0, \"nodes\": { \"id\": 433, \"type\": \"eba40a3a-f6c5-48ac-b58e-55525d06b373\", \"pos\": 90, -160 , \"size\": 390, 610 , \"flags\": {}, \"order\": 3, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"image2 optional \", \"name\": \"image2\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"image3 optional \", \"name\": \"image3\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"prompt\", \"type\": \"STRING\", \"widget\": { \"name\": \"prompt\" }, \"link\": null }, { \"name\": \"seed\", \"type\": \"INT\", \"widget\": { \"name\": \"seed\" }, \"link\": null }, { \"label\": \"enable turbo mode\", \"name\": \"value\", \"type\": \"BOOLEAN\", \"widget\": { \"name\": \"v… 证据：`blueprints/Image Edit (Qwen 2509).json`\n- **Image Edit (Qwen 2511)**（structured_config）：{ \"id\": \"d84b7d1a-a73f-4e31-bd16-983ac0cf5f1b\", \"revision\": 0, \"last node id\": 17, \"last link id\": 32, \"nodes\": { \"id\": 17, \"type\": \"9fa6af8b-8c99-4446-8681-bccf8ba4ea54\", \"pos\": 183.33334355513557, -120.00000702649223 , \"size\": 383.0729166666667, 381.10677083333337 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"image 1\", \"name\": \"image1\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"image 2 optional \", \"name\": \"image2\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"image 3 optional \", \"name\": \"image3\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"prompt\", \"type\": \"STRING\", \"widget\": { \"name\": \"prompt\" }, \"link\": null }, { \"name\": \"unet name\", \"type\": \"COMBO\", \"widget\": { \"name\":… 证据：`blueprints/Image Edit (Qwen 2511).json`\n- **Image Inpainting (Flux.1 Fill Dev)**（structured_config）：{ \"revision\": 0, \"last node id\": 232, \"last link id\": 0, \"nodes\": { \"id\": 232, \"type\": \"6e8d6e38-bdc3-436c-be85-ef9e67e70e07\", \"pos\": 1270, 4640 , \"size\": 400, 470 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"pixels\", \"name\": \"pixels\", \"type\": \"IMAGE\", \"link\": null }, { \"localized name\": \"mask\", \"name\": \"mask\", \"type\": \"MASK\", \"link\": null }, { \"label\": \"prompt\", \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"name\": \"seed\", \"type\": \"INT\", \"widget\": { \"name\": \"seed\" }, \"link\": null }, { \"name\": \"unet name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"unet name\" }, \"link\": null }, { \"name\": \"clip name1\", \"type\": \"COMBO\",… 证据：`blueprints/Image Inpainting (Flux.1 Fill Dev).json`\n- **Image Inpainting (Qwen Image)**（structured_config）：{ \"id\": \"84318cde-a839-41d4-8632-df6d7c50ffc5\", \"revision\": 0, \"last node id\": 256, \"last link id\": 403, \"nodes\": { \"id\": 256, \"type\": \"c93d5779-7bfe-4511-98e2-6a665ed0dff2\", \"pos\": 2271.698367680439, -460.52399024524993 , \"size\": 420, 470 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"localized name\": \"mask\", \"name\": \"mask\", \"type\": \"MASK\", \"link\": null }, { \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"name\": \"clip name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"clip name\" }, \"link\": null }, { \"name\": \"vae name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"vae name\" }, \"link\": nu… 证据：`blueprints/Image Inpainting (Qwen-image).json`\n- **Image Levels**（structured_config）：{ \"revision\": 0, \"last node id\": 139, \"last link id\": 0, \"nodes\": { \"id\": 139, \"type\": \"75bf8a72-aad8-4f3e-83ee-380e70248240\", \"pos\": 620, 900 , \"size\": 240, 178 , \"flags\": {}, \"order\": 1, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"properties\": { \"proxyWidgets\": \"5\", \"choice\" , \"3\", \"value\" , \"6\", \"value\" , \"7\", \"value\" , \"8\", \"value\" , \"9\", \"value\" }, \"widgets values\": , \"title\": \"Image Levels\" } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"75bf8a72-aad8-4f3e-83ee-380e70… 证据：`blueprints/Image Levels.json`\n- **Image Outpainting (Qwen Image)**（structured_config）：{ \"id\": \"8f79c27f-bec4-412e-9b82-7c5b3b778ecf\", \"revision\": 0, \"last node id\": 255, \"last link id\": 401, \"nodes\": { \"id\": 224, \"type\": \"fbf07656-8ff8-4299-a3fc-7378e0f4a004\", \"pos\": 3200, 740 , \"size\": 400, 460 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"left\", \"type\": \"INT\", \"widget\": { \"name\": \"left\" }, \"link\": null }, { \"name\": \"top\", \"type\": \"INT\", \"widget\": { \"name\": \"top\" }, \"link\": null }, { \"name\": \"right\", \"type\": \"INT\", \"widget\": { \"name\": \"right\" }, \"link\": null }, { \"name\": \"bottom\", \"type\": \"INT\", \"widget\": { \"name\": \"bottom\" }, \"link\": null }, { \"name\": \"feathering\", \"type\": \"INT\", \"w… 证据：`blueprints/Image Outpainting (Qwen-Image).json`\n- **Image Segmentation (Sam3)**（structured_config）：{ \"revision\": 0, \"last node id\": 99, \"last link id\": 0, \"nodes\": { \"id\": 99, \"type\": \"6e7ab3ea-96aa-470f-9b94-3d9d0e01f481\", \"pos\": -1630, -3270 , \"size\": 290, 370 , \"flags\": {}, \"order\": 3, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"object\", \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"name\": \"bboxes\", \"type\": \"BOUNDING BOX\", \"link\": null }, { \"name\": \"positive coords\", \"type\": \"STRING\", \"link\": null }, { \"name\": \"negative coords\", \"type\": \"STRING\", \"link\": null }, { \"name\": \"threshold\", \"type\": \"FLOAT\", \"widget\": { \"name\": \"threshold\" }, \"link\": null }, { \"name\": \"r… 证据：`blueprints/Image Segmentation (SAM3).json`\n- **Image Upscale(Z Image Turbo)**（structured_config）：{ \"id\": \"bf8108f3-d857-46c9-aef5-0e8ad2a64bf5\", \"revision\": 0, \"last node id\": 95, \"last link id\": 115, \"nodes\": { \"id\": 87, \"type\": \"dd15cfd3-cd53-428c-b3e2-33ed4ff8fa78\", \"pos\": 960.6668984200231, 332.66676187423354 , \"size\": 400, 469.9869791666667 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"unet name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"unet name\" }, \"link\": null }, { \"name\": \"clip name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"clip name\" }, \"link\": null }, { \"name\": \"vae name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"vae name\" }, \"link\": null }, { \"label\": \"upscale model\", \"name\": \"model name\",… 证据：`blueprints/Image Upscale(Z-image-Turbo).json`\n- **Image To Depth Map (Lotus)**（structured_config）：{ \"id\": \"6af0a6c1-0161-4528-8685-65776e838d44\", \"revision\": 0, \"last node id\": 75, \"last link id\": 245, \"nodes\": { \"id\": 75, \"type\": \"488652fd-6edf-4d06-8f9f-4d84d3a34eaf\", \"pos\": 600, 830 , \"size\": 400, 110 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"localized name\": \"pixels\", \"name\": \"pixels\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"depth intensity\", \"name\": \"sigma\", \"type\": \"FLOAT\", \"widget\": { \"name\": \"sigma\" }, \"link\": null }, { \"name\": \"unet name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"unet name\" }, \"link\": null }, { \"name\": \"vae name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"vae name\" }, \"link\": null } , \"outputs\": { \"localized name\": \"IMAGE\", \"name\": \"IMAGE\", \"type\": \"IMAG… 证据：`blueprints/Image to Depth Map (Lotus).json`\n- **Image To Layers(Qwen Image Layered)**（structured_config）：{ \"revision\": 0, \"last node id\": 176, \"last link id\": 0, \"nodes\": { \"id\": 176, \"type\": \"2d2e3c8e-53b3-4618-be52-6d1d99382f0e\", \"pos\": -1150, 200 , \"size\": 400, 550 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"name\": \"steps\", \"type\": \"INT\", \"widget\": { \"name\": \"steps\" }, \"link\": null }, { \"name\": \"cfg\", \"type\": \"FLOAT\", \"widget\": { \"name\": \"cfg\" }, \"link\": null }, { \"name\": \"layers\", \"type\": \"INT\", \"widget\": { \"name\": \"layers\" }, \"link\": null }, { \"name\": \"seed\", \"type\": \"INT\", \"widget\": { \"name\": \"seed\" }, \"link\": null }, { \"n… 证据：`blueprints/Image to Layers(Qwen-Image-Layered).json`\n- **Image To Model (Hunyuan3D 2.1)**（structured_config）：{ \"id\": \"8fe311ec-2147-47a8-b618-7bd6fb6d4f9d\", \"revision\": 0, \"last node id\": 23, \"last link id\": 24, \"nodes\": { \"id\": 19, \"type\": \"feb7d184-edf3-4851-9fd6-57a92c00ec42\", \"pos\": 277.7327250391088, 256.4066470374603 , \"size\": 340, 70 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"ckpt name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"ckpt name\" }, \"link\": null } , \"outputs\": { \"localized name\": \"MESH\", \"name\": \"MESH\", \"type\": \"MESH\", \"links\": } , \"properties\": { \"proxyWidgets\": \"-1\", \"ckpt name\" , \"cnr id\": \"comfy-core\", \"ver\": \"0.3.65\" }, \"widgets values\": \"hunyuan 3d v2.1.safetensors\" } , \"links\": , \"gro… 证据：`blueprints/Image to Model (Hunyuan3d 2.1).json`\n- **Image To Video (Ltx 2.3)**（structured_config）：{ \"revision\": 0, \"last node id\": 320, \"last link id\": 0, \"nodes\": { \"id\": 320, \"type\": \"2454ad83-157c-40dd-9f19-5daaf4041ce0\", \"pos\": 30, 4150 , \"size\": 390, 466.625 , \"flags\": {}, \"order\": 2, \"mode\": 0, \"inputs\": { \"label\": \"first frame\", \"localized name\": \"input\", \"name\": \"input\", \"type\": \"IMAGE,MASK\", \"link\": null }, { \"name\": \"value\", \"type\": \"STRING\", \"widget\": { \"name\": \"value\" }, \"link\": null }, { \"label\": \"width\", \"name\": \"value 2\", \"type\": \"INT\", \"widget\": { \"name\": \"value 2\" }, \"link\": null }, { \"label\": \"height\", \"name\": \"value 3\", \"type\": \"INT\", \"widget\": { \"name\": \"value 3\" }, \"link\": null }, { \"label\": \"duration\", \"name\": \"value 4\", \"type\": \"INT\", \"widget\": { \"name\": \"value 4\"… 证据：`blueprints/Image to Video (LTX-2.3).json`\n- **Image To Video (Wan 2.2)**（structured_config）：{ \"id\": \"ec7da562-7e21-4dac-a0d2-f4441e1efd3b\", \"revision\": 0, \"last node id\": 119, \"last link id\": 231, \"nodes\": { \"id\": 116, \"type\": \"296b573f-1e7d-43df-a2df-925fe5e17063\", \"pos\": 1098.3332694531493, -268.3334707134305 , \"size\": 400, 470 , \"flags\": { \"collapsed\": false }, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"start image\", \"localized name\": \"start image\", \"name\": \"start image\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"prompt\", \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"name\": \"width\", \"type\": \"INT\", \"widget\": { \"name\": \"width\" }, \"link\": null }, { \"name\": \"height\", \"type\": \"INT\", \"widget\": { \"name\": \"height\" }, \"link\": null }, { \"name\": \"… 证据：`blueprints/Image to Video (Wan 2.2).json`\n- **Pose To Image (Z Image Turbo)**（structured_config）：{ \"id\": \"e046dd74-e2a7-4f31-a75b-5e11a8c72d4e\", \"revision\": 0, \"last node id\": 26, \"last link id\": 46, \"nodes\": { \"id\": 13, \"type\": \"d8492a46-9e6c-4917-b5ea-4273aabf5f51\", \"pos\": 400, 3630 , \"size\": 400, 470 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"prompt\", \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"name\": \"unet name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"unet name\" }, \"link\": null }, { \"name\": \"clip name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"clip name\" }, \"link\": null }, { \"name\": \"vae name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"vae name\" }, \"link\": null }, {… 证据：`blueprints/Pose to Image (Z-Image-Turbo).json`\n- **Pose To Video (Ltx 2.0)**（structured_config）：{ \"revision\": 0, \"last node id\": 143, \"last link id\": 0, \"nodes\": { \"id\": 143, \"type\": \"68857357-cbc2-4c3a-a786-c3a58d43f9b1\", \"pos\": 290, 3960 , \"size\": 400, 500 , \"flags\": { \"collapsed\": false }, \"order\": 13, \"mode\": 0, \"inputs\": { \"name\": \"text\", \"type\": \"STRING\", \"widget\": { \"name\": \"text\" }, \"link\": null }, { \"label\": \"control images\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"first frame\", \"name\": \"image 1\", \"type\": \"IMAGE\", \"link\": null }, { \"label\": \"image strength\", \"name\": \"strength 1\", \"type\": \"FLOAT\", \"widget\": { \"name\": \"strength 1\" }, \"link\": null }, { \"name\": \"noise seed\", \"type\": \"INT\", \"widget\": { \"name\": \"noise seed\" }, \"link\": null }, { \"name\": \"ckpt n… 证据：`blueprints/Pose to Video (LTX 2.0).json`\n- **Prompt Enhance**（structured_config）：{ \"revision\": 0, \"last node id\": 15, \"last link id\": 0, \"nodes\": { \"id\": 15, \"type\": \"24d8bbfd-39d4-4774-bff0-3de40cc7a471\", \"pos\": -1490, 2040 , \"size\": 400, 260 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"name\": \"prompt\", \"type\": \"STRING\", \"widget\": { \"name\": \"prompt\" }, \"link\": null }, { \"label\": \"reference images\", \"name\": \"images\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"name\": \"STRING\", \"type\": \"STRING\", \"links\": null } , \"title\": \"Prompt Enhance\", \"properties\": { \"proxyWidgets\": \"-1\", \"prompt\" , \"cnr id\": \"comfy-core\", \"ver\": \"0.14.1\" }, \"widgets values\": \"\" } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"24d8bbfd-39d4-4774-bff0-3de40cc7a471\", \"ve… 证据：`blueprints/Prompt Enhance.json`\n- **Remove Background (Birefnet)**（structured_config）：{ \"revision\": 0, \"last node id\": 19, \"last link id\": 0, \"nodes\": { \"id\": 19, \"type\": \"5b40ca21-ba1a-41d5-b403-4d2d7acdc195\", \"pos\": -6411.330578108367, 1940.2638932730042 , \"size\": 349.609375, 145.9375 , \"flags\": {}, \"order\": 2, \"mode\": 0, \"inputs\": { \"localized name\": \"image\", \"name\": \"image\", \"type\": \"IMAGE\", \"link\": null }, { \"name\": \"bg removal name\", \"type\": \"COMBO\", \"widget\": { \"name\": \"bg removal name\" }, \"link\": null } , \"outputs\": { \"localized name\": \"IMAGE\", \"name\": \"IMAGE\", \"type\": \"IMAGE\", \"links\": }, { \"name\": \"mask\", \"type\": \"MASK\", \"links\": } , \"properties\": { \"proxyWidgets\": \"14\", \"bg removal name\" }, \"widgets values\": , \"title\": \"Remove Background BiRefNet \" } , \"links\": ,… 证据：`blueprints/Remove Background (BiRefNet).json`\n- **Sharpen**（structured_config）：{ \"revision\": 0, \"last node id\": 25, \"last link id\": 0, \"nodes\": { \"id\": 25, \"type\": \"621ba4e2-22a8-482d-a369-023753198b7b\", \"pos\": 4610, -790 , \"size\": 230, 58 , \"flags\": {}, \"order\": 4, \"mode\": 0, \"inputs\": { \"label\": \"image\", \"localized name\": \"images.image0\", \"name\": \"images.image0\", \"type\": \"IMAGE\", \"link\": null } , \"outputs\": { \"label\": \"IMAGE\", \"localized name\": \"IMAGE0\", \"name\": \"IMAGE0\", \"type\": \"IMAGE\", \"links\": } , \"title\": \"Sharpen\", \"properties\": { \"proxyWidgets\": \"24\", \"value\" }, \"widgets values\": } , \"links\": , \"version\": 0.4, \"definitions\": { \"subgraphs\": { \"id\": \"621ba4e2-22a8-482d-a369-023753198b7b\", \"version\": 1, \"state\": { \"lastGroupId\": 0, \"lastNodeId\": 24, \"lastLinkId\"… 证据：`blueprints/Sharpen.json`\n- **Text To Audio (Ace Step 1.5)**（structured_config）：{ \"id\": \"67979fed-a490-450a-83f4-c7c0105d450e\", \"revision\": 0, \"last node id\": 110, \"last link id\": 288, \"nodes\": { \"id\": 21, \"type\": \"510f6b52-34ee-40dd-b532-475497dee41b\", \"pos\": 1810, -560 , \"size\": 390, 460 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"name\": \"tags\", \"type\": \"STRING\", \"widget\": { \"name\": \"tags\" }, \"link\": null }, { \"name\": \"lyrics\", \"type\": \"STRING\", \"widget\": { \"name\": \"lyrics\" }, \"link\": null }, { \"name\": \"timesignature\", \"type\": \"COMBO\", \"widget\": { \"name\": \"timesignature\" }, \"link\": null }, { \"name\": \"language\", \"type\": \"COMBO\", \"widget\": { \"name\": \"language\" }, \"link\": null }, { \"name\": \"keyscale\", \"type\": \"COMBO\", \"widget\": { \"name\": \"keyscale\" }, \"link\": nul… 证据：`blueprints/Text to Audio (ACE-Step 1.5).json`\n- **Text To Image (Ernie Image Turbo)**（structured_config）：{ \"revision\": 0, \"last node id\": 88, \"last link id\": 0, \"nodes\": { \"id\": 88, \"type\": \"2a4f0815-c4d2-4e8b-9bdf-991a8403889d\", \"pos\": -120, 240 , \"size\": 400, 540 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"prompt\", \"name\": \"value\", \"type\": \"STRING\", \"widget\": { \"name\": \"value\" }, \"link\": null }, { \"label\": \"prompt enhancement\", \"name\": \"value 1\", \"type\": \"BOOLEAN\", \"widget\": { \"name\": \"value 1\" }, \"link\": null }, { \"name\": \"width\", \"type\": \"INT\", \"widget\": { \"name\": \"width\" }, \"link\": null }, { \"name\": \"height\", \"type\": \"INT\", \"widget\": { \"name\": \"height\" }, \"link\": null }, { \"name\": \"seed\", \"type\": \"INT\", \"widget\": { \"name\": \"seed\" }, \"link\": null }, { \"name\": \"unet name\", \"… 证据：`blueprints/Text to Image (Ernie Image Turbo).json`\n- **Text To Image (Ernie Image)**（structured_config）：{ \"revision\": 0, \"last node id\": 88, \"last link id\": 0, \"nodes\": { \"id\": 88, \"type\": \"03921aea-a70e-44b4-bc77-f6bda10f2120\", \"pos\": -120, 240 , \"size\": 400, 540 , \"flags\": {}, \"order\": 0, \"mode\": 0, \"inputs\": { \"label\": \"prompt\", \"name\": \"value\", \"type\": \"STRING\", \"widget\": { \"name\": \"value\" }, \"link\": null }, { \"label\": \"prompt enhancement\", \"name\": \"value 1\", \"type\": \"BOOLEAN\", \"widget\": { \"name\": \"value 1\" }, \"link\": null }, { \"name\": \"width\", \"type\": \"INT\", \"widget\": { \"name\": \"width\" }, \"link\": null }, { \"name\": \"height\", \"type\": \"INT\", \"widget\": { \"name\": \"height\" }, \"link\": null }, { \"name\": \"steps\", \"type\": \"INT\", \"widget\": { \"name\": \"steps\" }, \"link\": null }, { \"name\": \"cfg\", \"type… 证据：`blueprints/Text to Image (Ernie Image).json`\n- 其余 20 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。\n\n## 宿主 AI 必须遵守的规则\n\n- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`README.md`, `alembic_db/README.md`, `tests-unit/README.md`\n- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`README.md`, `alembic_db/README.md`, `tests-unit/README.md`\n\n## 用户开工前应该回答的问题\n\n- 你准备在哪个宿主 AI 或本地环境中使用它？\n- 你只是想先体验工作流，还是准备真实安装？\n- 你最在意的是安装成本、输出质量、还是和现有规则的冲突？\n\n## 验收标准\n\n- 所有能力声明都能回指到 evidence_refs 中的文件路径。\n- AI_CONTEXT_PACK.md 没有把预览包装成真实运行。\n- 用户能在 3 分钟内看懂适合谁、能做什么、如何开始和风险边界。\n\n---\n\n## Doramagic Context Augmentation\n\n下面内容用于强化 Repomix/AI Context Pack 主体。Human Manual 只提供阅读骨架；踩坑日志会被转成宿主 AI 必须遵守的工作约束。\n\n## Human Manual 骨架\n\n使用规则：这里只是项目阅读路线和显著性信号，不是事实权威。具体事实仍必须回到 repo evidence / Claim Graph。\n\n宿主 AI 硬性规则：\n- 不得把页标题、章节顺序、摘要或 importance 当作项目事实证据。\n- 解释 Human Manual 骨架时，必须明确说它只是阅读路线/显著性信号。\n- 能力、安装、兼容性、运行状态和风险判断必须引用 repo evidence、source path 或 Claim Graph。\n\n- **Introduction to ComfyUI**：importance `high`\n  - source_paths: README.md, main.py\n- **Installation Guide**：importance `high`\n  - source_paths: requirements.txt, extra_model_paths.yaml.example, manager_requirements.txt\n- **System Architecture**：importance `high`\n  - source_paths: server.py, execution.py, comfy/options.py, comfy/cli_args.py\n- **Server System**：importance `high`\n  - source_paths: server.py, protocol.py, api_server/routes/internal/internal_routes.py, api_server/services/terminal_service.py, api_server/utils/file_operations.py\n- **Execution Engine**：importance `high`\n  - source_paths: execution.py, comfy_execution/graph.py, comfy_execution/jobs.py, comfy_execution/caching.py, comfy_execution/validation.py\n- **Graph Management**：importance `high`\n  - source_paths: nodes.py, node_helpers.py, comfy_execution/graph.py, comfy_execution/graph_utils.py, comfy/comfy_types/node_typing.py\n- **Model Loading and Detection**：importance `high`\n  - source_paths: comfy/model_detection.py, comfy/model_management.py, comfy/model_patcher.py, comfy/model_base.py, comfy/supported_models.py\n- **Diffusion Models**：importance `high`\n  - source_paths: comfy/ldm/modules/diffusionmodules/model.py, comfy/ldm/modules/diffusionmodules/openaimodel.py, comfy/ldm/flux/model.py, comfy/ldm/wan/model.py, comfy/ldm/hunyuan_video/model.py\n\n## Repo Inspection Evidence / 源码检查证据\n\n- repo_clone_verified: true\n- repo_inspection_verified: true\n- repo_commit: `04856acc699f1559a11e00a9f68d2f9f9b9b8e96`\n- inspected_files: `pyproject.toml`, `README.md`, `requirements.txt`\n\n宿主 AI 硬性规则：\n- 没有 repo_clone_verified=true 时，不得声称已经读过源码。\n- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。\n- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。\n\n## Doramagic Pitfall Constraints / 踩坑约束\n\n这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。\n\n### Constraint 1: 仓库名和安装名不一致\n\n- Trigger: 仓库名 `comfyui` 与安装入口 `comfy-cli` 不完全一致。\n- Host AI rule: 在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。\n- Why it matters: 用户照着仓库名搜索包或照着包名找仓库时容易走错入口。\n- Evidence: identity.distribution | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | repo=comfyui; install=comfy-cli\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 2: 能力判断依赖假设\n\n- Trigger: README/documentation is current enough for a first validation pass.\n- Host AI rule: 将假设转成下游验证清单。\n- Why it matters: 假设不成立时，用户拿不到承诺的能力。\n- Evidence: capability.assumptions | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | README/documentation is current enough for a first validation pass.\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 3: 维护活跃度未知\n\n- Trigger: 未记录 last_activity_observed。\n- Host AI rule: 补 GitHub 最近 commit、release、issue/PR 响应信号。\n- Why it matters: 新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- Evidence: evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | last_activity_observed missing\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 4: 下游验证发现风险项\n\n- Trigger: no_demo\n- Host AI rule: 进入安全/权限治理复核队列。\n- Why it matters: 下游已经要求复核，不能在页面中弱化。\n- Evidence: downstream_validation.risk_items | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | no_demo; severity=medium\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 5: 存在评分风险\n\n- Trigger: no_demo\n- Host AI rule: 把风险写入边界卡，并确认是否需要人工复核。\n- Why it matters: 风险会影响是否适合普通用户安装。\n- Evidence: risks.scoring_risks | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | no_demo; severity=medium\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 6: issue/PR 响应质量未知\n\n- Trigger: issue_or_pr_quality=unknown。\n- Host AI rule: 抽样最近 issue/PR，判断是否长期无人处理。\n- Why it matters: 用户无法判断遇到问题后是否有人维护。\n- Evidence: evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | issue_or_pr_quality=unknown\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 7: 发布节奏不明确\n\n- Trigger: release_recency=unknown。\n- Host AI rule: 确认最近 release/tag 和 README 安装命令是否一致。\n- Why it matters: 安装命令和文档可能落后于代码，用户踩坑概率升高。\n- Evidence: evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | release_recency=unknown\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n",
      "summary": "给宿主 AI 的上下文和工作边界。",
      "title": "AI Context Pack / 带给我的 AI"
    },
    "boundary_risk_card": {
      "asset_id": "boundary_risk_card",
      "filename": "BOUNDARY_RISK_CARD.md",
      "markdown": "# Boundary & Risk Card / 安装前决策卡\n\n项目：Comfy-Org/ComfyUI\n\n## Doramagic 试用结论\n\n当前结论：可以进入发布前推荐检查；首次使用仍应从最小权限、临时目录和可回滚配置开始。\n\n## 用户现在可以做\n\n- 可以先阅读 Human Manual，理解项目目的和主要工作流。\n- 可以复制 Prompt Preview 做安装前体验；这只验证交互感，不代表真实运行。\n- 可以把官方 Quick Start 命令放到隔离环境中验证，不要直接进主力环境。\n\n## 现在不要做\n\n- 不要把 Prompt Preview 当成项目实际运行结果。\n- 不要把 metadata-only validation 当成沙箱安装验证。\n- 不要把未验证能力写成“已支持、已跑通、可放心安装”。\n- 不要在首次试用时交出生产数据、私人文件、真实密钥或主力配置目录。\n\n## 安装前检查\n\n- 宿主 AI 是否匹配：local_cli\n- 官方安装入口状态：已发现官方入口\n- 是否在临时目录、临时宿主或容器中验证：必须是\n- 是否能回滚配置改动：必须能\n- 是否需要 API Key、网络访问、读写文件或修改宿主配置：未确认前按高风险处理\n- 是否记录了安装命令、实际输出和失败日志：必须记录\n\n## 当前阻塞项\n\n- 无阻塞项。\n\n## 项目专属踩坑\n\n- 仓库名和安装名不一致（medium）：用户照着仓库名搜索包或照着包名找仓库时容易走错入口。 建议检查：在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。\n- 能力判断依赖假设（medium）：假设不成立时，用户拿不到承诺的能力。 建议检查：将假设转成下游验证清单。\n- 维护活跃度未知（medium）：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 下游验证发现风险项（medium）：下游已经要求复核，不能在页面中弱化。 建议检查：进入安全/权限治理复核队列。\n- 存在评分风险（medium）：风险会影响是否适合普通用户安装。 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n\n## 风险与权限提示\n\n- no_demo: medium\n\n## 证据缺口\n\n- 暂未发现结构化证据缺口。\n",
      "summary": "安装、权限、验证和推荐前风险。",
      "title": "Boundary & Risk Card / 边界与风险卡"
    },
    "human_manual": {
      "asset_id": "human_manual",
      "filename": "HUMAN_MANUAL.md",
      "markdown": "# https://github.com/Comfy-Org/ComfyUI 项目说明书\n\n生成时间：2026-05-15 19:52:25 UTC\n\n## 目录\n\n- [Introduction to ComfyUI](#page-introduction)\n- [Installation Guide](#page-installation)\n- [System Architecture](#page-architecture)\n- [Server System](#page-server-system)\n- [Execution Engine](#page-execution-engine)\n- [Graph Management](#page-graph-management)\n- [Model Loading and Detection](#page-model-loading)\n- [Diffusion Models](#page-diffusion-models)\n- [Text Processing and Encoders](#page-text-processing)\n- [Memory Management](#page-memory-management)\n\n<a id='page-introduction'></a>\n\n## Introduction to ComfyUI\n\n### 相关页面\n\n相关主题：[Installation Guide](#page-installation), [System Architecture](#page-architecture)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n- [comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n- [app/user_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n- [app/model_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/model_manager.py)\n- [app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n- [api_server/routes/internal/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/api_server/routes/internal/README.md)\n</details>\n\n# Introduction to ComfyUI\n\n## Overview\n\nComfyUI is a powerful, modular AI creation engine designed for visual professionals who demand precise control over every model, parameter, and output. It provides a node graph-based interface that enables users to generate images, videos, 3D models, audio, and other AI-driven content with granular control over the entire generation pipeline.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Key Characteristics\n\n| Characteristic | Description |\n|----------------|-------------|\n| **Type** | AI Generation Engine |\n| **Interface** | Node Graph / Visual Programming |\n| **License** | Open Source |\n| **Platforms** | Windows, Linux, macOS, Cloud |\n| **GPU Support** | NVIDIA, AMD (ROCm), Intel, Apple Silicon, Ascend, Iluvatar |\n\nComfyUI natively supports the latest open-source state-of-the-art models and provides API nodes for accessing closed-source models such as Seedance, Hunyuan3D, and others through the online Comfy API.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Core Features\n\n### Model Support\n\nComfyUI provides extensive support for various AI model types:\n\n| Model Category | Examples | Documentation Link |\n|----------------|----------|---------------------|\n| **Stable Diffusion** | SD 1.x, SD 2.x, SDXL, SD 3.x | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/) |\n| **ControlNet/T2I-Adapter** | Various preprocessors | [ControlNet Guide](https://comfyanonymous.github.io/ComfyUI_examples/controlnet/) |\n| **LoRA/LyCORIS** | Regular, locon, loha variants | [LoRA Guide](https://comfyanonymous.github.io/ComfyUI_examples/lora/) |\n| **Upscaling Models** | ESRGAN, SwinIR, Swin2SR | [Upscale Guide](https://comfyanonymous.github.io/ComfyUI_examples/upscale_models/) |\n| **Latent Models** | LCM models and Loras | [LCM Guide](https://comfyanonymous.github.io/ComfyUI_examples/lcm/) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Advanced Capabilities\n\n- **Textual Inversion & Hypernetworks**: Advanced embedding techniques for custom styling\n- **Area Composition**: Multi-region generation with precise control\n- **Inpainting**: Both regular and inpainting-specific models supported\n- **Model Merging**: Combine multiple models for unique outputs\n- **Latent Previews**: Real-time preview with TAESD for high-quality previews\n- **Workflow Export**: Save/load workflows as JSON, embed in PNG/WebP/FLAC metadata\n- **Offline Operation**: Core functionality works completely offline\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## System Architecture\n\n### High-Level Architecture\n\n```mermaid\ngraph TD\n    subgraph \"Frontend Layer\"\n        UI[User Interface]\n        WS[WebSocket Handler]\n    end\n    \n    subgraph \"API Layer\"\n        REST[REST API Routes]\n        INT[Internal Routes]\n    end\n    \n    subgraph \"Core Execution Engine\"\n        SG[Scheduling Graph]\n        EX[Execution Engine]\n        NODE[Node Registry]\n    end\n    \n    subgraph \"Model Management\"\n        MM[Model Manager]\n        LM[Loader Manager]\n    end\n    \n    subgraph \"Backend Services\"\n        UM[User Manager]\n        FM[Frontend Manager]\n    end\n    \n    UI <--> WS\n    WS <--> REST\n    REST <--> INT\n    REST <--> SG\n    SG <--> EX\n    EX <--> NODE\n    MM <--> LM\n    UM <--> FM\n    \n    style UI fill:#e1f5fe\n    style EX fill:#fff3e0\n    style MM fill:#e8f5e9\n```\n\n### Node Type System\n\nComfyUI uses a typed node system for type-safe workflow construction. The `comfy_types` module provides abstract base classes and type hints:\n\n```mermaid\nclassDiagram\n    class ComfyNodeABC {\n        <<abstract>>\n        +INPUT_TYPES() InputTypeDict\n        +FUNCTION() str\n        +OUTPUT_NODE() bool\n        +CATEGORY() str\n        +RETURN_TYPES() tuple\n    }\n    \n    class CheckLazyMixin {\n        <<mixin>>\n    }\n    \n    class IO {\n        <<enum>>\n        +ANY: \"*\"\n        +NUMBER: \"FLOAT,INT\"\n        +PRIMITIVE: \"STRING,FLOAT,INT,BOOLEAN\"\n    }\n    \n    ComfyNodeABC <-- CheckLazyMixin\n    ComfyNodeABC ..> IO : uses\n```\n\n资料来源：[comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n\n### Execution Model\n\nComfyUI employs a smart execution model that optimizes workflow processing:\n\n```mermaid\ngraph LR\n    A[Submit Workflow] --> B{Changed?}\n    B -->|First Run| C[Execute All Valid Paths]\n    B -->|Unchanged| D[Skip Execution]\n    B -->|Partial Change| E[Execute Changed + Dependencies]\n    C --> F[Output Results]\n    E --> F\n    D --> F\n```\n\n**Execution Rules:**\n- Only parts of the graph with all correct inputs will be executed\n- Only parts that change between executions are re-run\n- Submitting the same graph twice executes only the first instance\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Installation\n\n### Supported Platforms\n\n| Platform | GPU Options | Installation Type |\n|----------|-------------|-------------------|\n| **Windows** | NVIDIA, AMD, Intel, CPU | Portable Package, Manual Install |\n| **Linux** | NVIDIA, AMD (ROCm), Intel, CPU | Manual Install |\n| **macOS** | Apple Silicon (M1/M2), CPU | Manual Install |\n| **Cloud** | Comfy Cloud | Desktop Application |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Quick Start Commands\n\n```bash\n# Windows/Linux Manual Installation\npip install -r requirements.txt\npython main.py\n\n# NVIDIA GPU (Stable)\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130\n\n# NVIDIA GPU (Nightly)\npip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu132\n\n# AMD GPU (ROCm)\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm6.1\n\n# Apple Silicon\n# Install PyTorch nightly per Apple Developer Guide\npip install -r requirements.txt\n```\n\n### ComfyUI-Manager Setup\n\nComfyUI-Manager provides extension management capabilities:\n\n```bash\n# Install dependencies\npip install -r manager_requirements.txt\n\n# Enable with flags\npython main.py --enable-manager\n```\n\n| Manager Flag | Description |\n|--------------|-------------|\n| `--enable-manager` | Enable ComfyUI-Manager |\n| `--enable-manager-legacy-ui` | Use legacy manager UI |\n| `--disable-manager-ui` | Keep background features only |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## User Interface\n\n### Keyboard Shortcuts\n\n| Shortcut | Action |\n|----------|--------|\n| `Ctrl+Z` / `Ctrl+Y` | Undo/Redo |\n| `Ctrl+S` | Save workflow |\n| `Ctrl+O` | Load workflow |\n| `Ctrl+A` | Select all nodes |\n| `Alt+C` | Collapse/uncollapse selected |\n| `Ctrl+M` | Mute/unmute selected |\n| `Ctrl+B` | Bypass selected (reconnect wires) |\n| `Delete/Backspace` | Delete selected nodes |\n| `Space` + Drag | Pan canvas |\n| `Ctrl+Click` / `Shift+Click` | Add to selection |\n| `Ctrl+C` / `Ctrl+V` | Copy/paste nodes |\n| `Ctrl+Shift+V` | Paste with connections |\n| `Shift+Drag` | Move multiple nodes |\n| `Ctrl+D` | Load default graph |\n| `Alt++` / `Alt+-` | Zoom in/out |\n| `P` | Pin/unpin nodes |\n| `Ctrl+G` | Group selected |\n| `Double-Click` | Open node search palette |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Preview Methods\n\nComfyUI supports multiple preview rendering methods:\n\n| Method | Quality | Performance | Setup |\n|--------|---------|-------------|-------|\n| `auto` | Variable | Variable | Default |\n| `taesd` | High | Fast | Download TAESD decoder models |\n\nTo enable high-quality previews with TAESD:\n\n1. Download decoder files to `models/vae_approx` folder:\n   - `taesd_decoder.pth`\n   - `taesdxl_decoder.pth`\n   - `taesd3_decoder.pth`\n   - `taef1_decoder.pth`\n\n2. Launch with preview flag:\n   ```bash\n   python main.py --preview-method taesd\n   ```\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## API and Integration\n\n### API Structure\n\nComfyUI provides a comprehensive REST API for external integrations:\n\n```mermaid\ngraph TD\n    EXT[External Application] -->|HTTP/REST| API[API Server]\n    API -->|v2/userdata| UM[User Data Management]\n    API -->|v2/modelinfo| MM[Model Info]\n    API -->|v2/history| H[Execution History]\n    EXT -->|WebSocket| WS[WebSocket Connection]\n    WS -->|Real-time| STATUS[Execution Status]\n```\n\n### Internal Routes\n\nAll routes under `/internal` are designated for internal ComfyUI use only. These routes may change at any time without notice and are not intended for external application use.\n\n资料来源：[api_server/routes/internal/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/api_server/routes/internal/README.md)\n\n### User Data API\n\nThe user data management system provides secure file operations:\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/v2/userdata` | GET | List directory contents |\n| `/v2/userdata/{path}` | POST | Upload file |\n| `/v2/userdata/{file}` | DELETE | Delete file |\n| `/v2/userdata/{file}/move/{dest}` | POST | Move/rename file |\n\n**Query Parameters for Listing:**\n- `path`: Relative path within user's data directory\n- `recurse`: Enable recursive directory listing\n- `full_info`: Return detailed file information\n- `split`: Return path as array split by `/`\n\n资料来源：[app/user_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n\n### Model Discovery\n\nThe model manager provides intelligent model discovery with metadata extraction:\n\n```mermaid\ngraph TD\n    A[Model Path] --> B{Extension Check}\n    B -->|.safetensors| C[Extract Metadata]\n    B -->|.preview| D[Add Preview Image]\n    B -->|Other| E[Standard Add]\n    C --> F[Parse ssmd_cover_images]\n    D --> R[Result List]\n    E --> R\n    F --> R\n```\n\nThe system extracts preview images embedded in SafeTensors metadata under the `ssmd_cover_images` key.\n\n资料来源：[app/model_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/model_manager.py)\n\n## Frontend Management\n\n### Version Control\n\nComfyUI supports flexible frontend version management:\n\n```mermaid\ngraph LR\n    A[Default Frontend] --> B[Specific Version]\n    A --> C[Latest/Daily]\n    A --> D[Legacy Frontend]\n    \n    B -.->|v1.2.2| E[Stable]\n    C -.->|daily| F[Cutting Edge]\n    D -.->|legacy| G[Compatibility]\n```\n\n| Version String | Description |\n|----------------|-------------|\n| `Comfy-Org/ComfyUI_frontend@v1.2.2` | Specific stable version |\n| `Comfy-Org/ComfyUI_frontend@latest` | Latest release |\n| `Comfy-Org/ComfyUI_frontend@prerelease` | Pre-release build |\n\n**Version Pattern:**\n```\n^([a-zA-Z0-9][a-zA-Z0-9-]{0,38})/([a-zA-Z0-9_.-]+)@(v?\\d+\\.\\d+\\.\\d+[-._a-zA-Z0-9]*|latest|prerelease)$\n```\n\n资料来源：[app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n\n### Custom Frontends\n\nFrontends are stored in a configurable directory structure:\n\n```\nCUSTOM_FRONTENDS_ROOT/\n├── Comfy-Org_ComfyUI_frontend/\n│   ├── v1.2.2/\n│   ├── v1.3.0/\n│   └── latest/\n└── custom_provider_custom_frontend/\n    └── v2.0.0/\n```\n\nThe system supports embedding custom documentation and workflow templates through separate pip packages (`comfyui-embedded-docs`, `comfyui-workflow-templates`).\n\n资料来源：[app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n\n## Security Features\n\n### TLS/SSL Support\n\nComfyUI supports HTTPS for secure connections:\n\n```bash\n# Generate self-signed certificate\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem \\\n    -sha256 -days 3650 -nodes \\\n    -subj \"/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname\"\n\n# Launch with TLS\npython main.py --tls-keyfile key.pem --tls-certfile cert.pem\n```\n\n> Note: Self-signed certificates are not appropriate for shared or production environments.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Manager Security\n\nThe `--disable-manager-ui` flag allows keeping security checks and scheduled installation completion while disabling the manager UI and endpoints.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Release Process\n\nComfyUI follows a structured release cycle:\n\n```mermaid\ngraph TD\n    A[Commit to Repository] --> B{Which Branch?}\n    B -->|Master| C[Weekly Release Candidate]\n    B -->|Stable Tag| D[Backport Fixes]\n    C --> E[Major Version v0.X.Y]\n    D --> F[Patch Version v0.4.X]\n    \n    E -.->|~2 weeks| G[Next Major]\n    F -.->|as needed| H[Stable Update]\n```\n\n| Release Type | Frequency | Target |\n|---------------|------------|--------|\n| Major Version | ~2 weeks | Monday (variable) |\n| Patch Version | As needed | Stable branch backports |\n| Nightly Commits | Ongoing | Master branch (unstable) |\n\n> Warning: Commits outside stable release tags may be very unstable and break custom nodes.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## See Also\n\n- [Examples Page](https://comfyanonymous.github.io/ComfyUI_examples/) - Workflow examples\n- [ComfyUI-Manager](https://github.com/Comfy-Org/ComfyUI-Manager) - Custom node management\n- [Comfy Cloud](https://www.comfy.org/cloud) - Official cloud hosting\n- [Comfy API Documentation](https://docs.comfy.org/tutorials/api-nodes/overview) - API nodes guide\n- [GPU Recommendations](https://github.com/comfyanonymous/ComfyUI/wiki/Which-GPU-should-I-buy-for-ComfyUI) - Hardware guide\n\n---\n\n<a id='page-installation'></a>\n\n## Installation Guide\n\n### 相关页面\n\n相关主题：[Introduction to ComfyUI](#page-introduction)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n- [requirements.txt](https://github.com/Comfy-Org/ComfyUI/blob/main/requirements.txt)\n- [extra_model_paths.yaml.example](https://github.com/Comfy-Org/ComfyUI/blob/main/extra_model_paths.yaml.example)\n- [manager_requirements.txt](https://github.com/Comfy-Org/ComfyUI/blob/main/manager_requirements.txt)\n- [app/user_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n- [app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n</details>\n\n# Installation Guide\n\n## Overview\n\nThis guide covers all supported methods for installing ComfyUI, including local installations on Windows, Linux, and macOS, as well as platform-specific considerations for NVIDIA, AMD, Intel, and Apple Silicon GPUs. ComfyUI is designed to be modular and works fully offline—the core will never download anything unless explicitly requested by the user.\n\n资料来源：[README.md:1-50]()\n\n## Installation Methods Overview\n\nComfyUI supports multiple installation approaches to accommodate different user needs and technical expertise levels.\n\n```mermaid\ngraph TD\n    A[ComfyUI Installation] --> B[Desktop Application]\n    A --> C[Windows Portable Package]\n    A --> D[Manual Installation]\n    \n    D --> E[Windows]\n    D --> F[Linux]\n    D --> G[macOS]\n    \n    E --> H[NVIDIA GPU]\n    E --> I[AMD GPU]\n    E --> J[Intel GPU]\n    \n    F --> K[NVIDIA GPU]\n    F --> L[AMD ROCm]\n    F --> M[Intel XPU]\n    \n    G --> N[Apple Silicon M1/M2]\n```\n\n## Prerequisites\n\n### System Requirements\n\n| Component | Minimum | Recommended |\n|-----------|---------|-------------|\n| GPU VRAM | 4GB | 8GB+ |\n| RAM | 8GB | 16GB+ |\n| Disk Space | 10GB | 20GB+ |\n| OS | Windows 10, Linux, macOS | Windows 11, Latest Linux/macOS |\n\n### GPU Support Matrix\n\n| GPU Vendor | Support Level | Backend |\n|------------|---------------|---------|\n| NVIDIA | Full | CUDA (cu130/cu132) |\n| AMD | Full (ROCm) | ROCm |\n| Intel | Full (XPU) | oneAPI |\n| Apple Silicon | Full | Metal/MPS |\n\n资料来源：[README.md:200-280]()\n\n## PyTorch Installation\n\nPyTorch is the core dependency required for ComfyUI. The installation command varies by hardware platform.\n\n### NVIDIA GPUs\n\nFor stable PyTorch with CUDA support:\n\n```bash\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130\n```\n\nFor nightly builds with potential performance improvements:\n\n```bash\npip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu132\n```\n\n资料来源：[README.md:180-195]()\n\n### AMD GPUs (ROCm)\n\nFor AMD GPUs using ROCm, install the ROCm-compatible PyTorch build:\n\n```bash\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm\n```\n\nFor experimental memory-efficient attention on recent PyTorch with AMD GPUs:\n\n```bash\nTORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 python main.py --use-pytorch-cross-attention\n```\n\nFor non-officially supported AMD cards, use environment variable overrides:\n\n| GPU Series | Command |\n|------------|---------|\n| AMD 6700, 6600 (RDNA2) | `HSA_OVERRIDE_GFX_VERSION=10.3.0 python main.py` |\n| AMD 7600 (RDNA3) | `HSA_OVERRIDE_GFX_VERSION=11.0.0 python main.py` |\n\nAdditional performance tuning options:\n\n```bash\nPYTORCH_TUNABLEOP_ENABLED=1 python main.py\n```\n\n资料来源：[README.md:220-260]()\n\n### Intel GPUs (XPU)\n\nFor Intel discrete GPUs and APUs using the XPU backend:\n\n```bash\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/xpu\n```\n\nFor nightly builds with potential improvements:\n\n```bash\npip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu\n```\n\n资料来源：[README.md:160-178]()\n\n### Apple Silicon (M1/M2)\n\n1. Install the latest PyTorch nightly following Apple's [Accelerated PyTorch training on Mac](https://developer.apple.com/metal/pytorch/) developer guide.\n2. Follow the manual installation instructions for your operating system.\n3. Install ComfyUI dependencies as specified in the Dependencies section.\n\n资料来源：[README.md:290-310]()\n\n### Troubleshooting PyTorch\n\nIf you encounter the error \"Torch not compiled with CUDA enabled\":\n\n```bash\npip uninstall torch\n```\n\nThen reinstall using the appropriate command for your hardware from the sections above.\n\n资料来源：[README.md:196-199]()\n\n## Dependencies Installation\n\nAfter installing PyTorch, install the core ComfyUI dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\nThis installs all required Python packages for ComfyUI to function properly. After this step, ComfyUI should be ready to run.\n\n资料来源：[README.md:286-288]()\n\n## Windows Portable Package\n\nFor Windows users seeking a portable, self-contained installation:\n\n1. Download the portable standalone build from the [releases page](https://github.com/comfyanonymous/ComfyUI/releases).\n2. Extract the archive to your desired location.\n3. Run `python main.py` or the provided executable.\n\nThis package includes everything needed to run ComfyUI on NVIDIA GPUs or in CPU-only mode.\n\n资料来源：[README.md:95-110]()\n\n## Manual Installation\n\n### Windows and Linux\n\n```mermaid\ngraph LR\n    A[Download/Clone Repository] --> B[Install PyTorch]\n    B --> C[Install Dependencies]\n    C --> D[Configure Model Paths]\n    D --> E[Launch ComfyUI]\n```\n\n#### Step 1: Clone or Download the Repository\n\n```bash\ngit clone https://github.com/Comfy-Org/ComfyUI.git\ncd ComfyUI\n```\n\n#### Step 2: Install PyTorch\n\nFollow the PyTorch installation instructions for your GPU in the PyTorch Installation section above.\n\n#### Step 3: Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n#### Step 4: Launch\n\n```bash\npython main.py\n```\n\n资料来源：[README.md:280-295]()\n\n### Model Path Configuration\n\nComfyUI supports an optional configuration file to set custom search paths for models, useful if you have models stored in a different location or shared across multiple installations.\n\nCopy the example configuration:\n\n```bash\ncp extra_model_paths.yaml.example extra_model_paths.yaml\n```\n\nEdit `extra_model_paths.yaml` to specify your model directories:\n\n```yaml\n# Example extra_model_paths.yaml\nmodels:\n  checkpoints: /path/to/your/checkpoints\n  loras: /path/to/your/loras\n  vae: /path/to/your/vae\n```\n\n资料来源：[extra_model_paths.yaml.example](https://github.com/Comfy-Org/ComfyUI/blob/main/extra_model_paths.yaml.example)()\n\n## ComfyUI-Manager\n\nComfyUI-Manager is an extension that simplifies installation, updating, and management of custom nodes.\n\n### Installation\n\n1. Navigate to your ComfyUI installation directory\n2. Clone the ComfyUI-Manager repository into the `custom_nodes` folder:\n\n```bash\ncd custom_nodes\ngit clone https://github.com/Comfy-Org/ComfyUI-Manager.git\n```\n\n3. Install manager dependencies:\n\n```bash\npip install -r manager_requirements.txt\n```\n\n资料来源：[README.md:330-345]()\n\n### Enabling ComfyUI-Manager\n\nStart ComfyUI with the `--enable-manager` flag:\n\n```bash\npython main.py --enable-manager\n```\n\n### Manager Command Line Options\n\n| Flag | Description |\n|------|-------------|\n| `--enable-manager` | Enable ComfyUI-Manager |\n| `--enable-manager-legacy-ui` | Use the legacy manager UI (requires `--enable-manager`) |\n| `--disable-manager-ui` | Disable manager UI while keeping background features (requires `--enable-manager`) |\n\n资料来源：[README.md:346-365]()\n\n## Desktop Application\n\nFor the easiest getting-started experience, download the official Desktop Application:\n\n- Available for Windows and macOS\n- Download from [comfy.org/download](https://www.comfy.org/download)\n\nThis method requires no technical configuration and is recommended for new users.\n\n资料来源：[README.md:55-65]()\n\n## Cloud Deployment\n\nFor users without local hardware, ComfyUI is available on Comfy Cloud:\n\n- Official paid cloud version hosted at [comfy.org/cloud](https://www.comfy.org/cloud)\n- No local hardware required\n- Full ComfyUI functionality\n\n资料来源：[README.md:66-70]()\n\n## Advanced Configuration\n\n### Multi-User Setup\n\nFor server deployments with multiple users, enable multi-user mode:\n\n```bash\npython main.py --multi-user\n```\n\nThis enables server-side user profile storage instead of browser-based storage.\n\n资料来源：[app/user_manager.py:25-35]()\n\n### Frontend Version Management\n\nComfyUI ships its frontend as a separate pip package. To specify a frontend version:\n\n```bash\npython main.py --front-end-version Comfy-Org/ComfyUI_frontend@latest\n```\n\nFor stable releases:\n\n```bash\npython main.py --front-end-version Comfy-Org/ComfyUI_frontend@v1.2.2\n```\n\nFor legacy frontend:\n\n```bash\npython main.py --front-end-version Comfy-Org/ComfyUI_legacy_frontend@latest\n```\n\n资料来源：[app/frontend_management.py:40-75]()\n\n### Additional Command Line Arguments\n\n| Argument | Description |\n|----------|-------------|\n| `--preview-method auto` | Enable previews with automatic method selection |\n| `--preview-method taesd` | Use TAESD for high-quality previews |\n| `--tls-keyfile <file>` | Path to TLS private key |\n| `--tls-certfile <file>` | Path to TLS certificate |\n| `--use-pytorch-cross-attention` | Use PyTorch cross-attention implementation |\n| `--disable-api-nodes` | Disable optional API nodes |\n\n资料来源：[README.md:15-45]()\n\n## Post-Installation Verification\n\nAfter installation, verify your setup by:\n\n1. Launching ComfyUI: `python main.py`\n2. Opening the web interface (typically `http://localhost:8188`)\n3. Running a simple workflow to confirm GPU acceleration is working\n\nIf previews are enabled, you should see latent preview updates during image generation, confirming the installation is functioning correctly.\n\n资料来源：[README.md:10-20]()\n\n## Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| \"Torch not compiled with CUDA enabled\" | Reinstall PyTorch with CUDA support |\n| Import errors | Run `pip install -r requirements.txt` |\n| Model not found | Configure `extra_model_paths.yaml` or check model paths |\n| Manager installation fails | Ensure `manager_requirements.txt` dependencies are installed |\n\n资料来源：[README.md:196-199]()\n\n---\n\n<a id='page-architecture'></a>\n\n## System Architecture\n\n### 相关页面\n\n相关主题：[Server System](#page-server-system), [Execution Engine](#page-execution-engine), [Model Loading and Detection](#page-model-loading)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n- [comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n- [app/user_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n- [app/model_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/model_manager.py)\n- [app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n</details>\n\n# System Architecture\n\n## Overview\n\nComfyUI is a modular AI creation engine designed with a node-graph architecture that enables complex workflow orchestration for generative AI models. The system architecture follows a client-server model where the backend provides REST API endpoints for workflow execution, model management, and user administration, while the frontend communicates via WebSocket and HTTP protocols to render the visual node editor and manage execution state.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## High-Level Architecture\n\n```mermaid\ngraph TD\n    subgraph Client\n        Frontend[\"Web Frontend<br/>(React-based)\"]\n    end\n    \n    subgraph Server[\"ComfyUI Server\"]\n        API[\"REST API Routes\"]\n        WS[\"WebSocket Handler\"]\n        Execution[\"Execution Engine\"]\n        UserMgr[\"User Manager\"]\n        ModelMgr[\"Model Manager\"]\n    end\n    \n    subgraph Storage\n        Models[\"Model Files\"]\n        Settings[\"User Settings\"]\n        Cache[\"File Cache\"]\n    end\n    \n    Frontend <-->|HTTP/WS| API\n    Frontend <-->|WS| WS\n    API <--> UserMgr\n    API <--> ModelMgr\n    Execution <--> Models\n    UserMgr <--> Settings\n    ModelMgr <--> Cache\n```\n\n## Core Components\n\n### Execution Engine\n\nThe execution engine is the computational core of ComfyUI, responsible for processing node graphs in topological order. It implements intelligent caching where only parts of the graph that have changed between executions are re-processed.\n\n**Key Characteristics:**\n- Only parts of the graph that have an output with all the correct inputs will be executed\n- Only parts of the graph that change from each execution to the next will be executed\n- If the same graph is submitted twice, only the first will be executed\n- If the last part of the graph changes, only that part and its dependents are re-executed\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### User Manager\n\nThe `UserManager` class handles multi-user support and user-specific settings storage.\n\n```mermaid\nclassDiagram\n    class UserManager {\n        +settings: AppSettings\n        +users: dict\n        +__init__()\n        +get_users_file(): str\n    }\n    \n    class AppSettings {\n        +__init__(user_manager)\n        +get_default_user(): str\n    }\n```\n\n**User Configuration:**\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `multi_user` | Enable multiple user profiles | `False` |\n| User Directory | Location for user-specific data | `folder_paths.get_user_directory()` |\n\n**Initialization Logic:**\n\n```python\n# Single-user mode (default)\nself.users = {\"default\": \"default\"}\n\n# Multi-user mode (with --multi-user flag)\nif os.path.isfile(self.get_users_file()):\n    with open(self.get_users_file()) as f:\n        self.users = json.load(f)\n```\n\n资料来源：[app/user_manager.py:1-50](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n\n### Model Manager\n\nThe `ModelFileManager` class provides centralized model file discovery and caching.\n\n```mermaid\ngraph LR\n    A[Model Request] --> B[Cache Check]\n    B -->|Hit| C[Return Cached]\n    B -->|Miss| D[Scan Directories]\n    D --> E[Build File List]\n    E --> F[Cache Result]\n    F --> C\n```\n\n**Cache Data Structure:**\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `key` | `str` | Cache identifier |\n| `value` | `tuple[list[dict], dict[str, float], float]` | Models list, metadata, timestamp |\n\n**Model Discovery Features:**\n- Recursive directory scanning with glob patterns\n- Safe file filtering by extension and content type\n- Support for safetensors metadata extraction\n- Preview image detection (`*.preview` files)\n\n资料来源：[app/model_manager.py:1-80](https://github.com/Comfy-Org/ComfyUI/blob/main/app/model_manager.py)\n\n### Frontend Management\n\nThe `FrontendManagement` class handles frontend version control and installation verification.\n\n**Version Parsing Pattern:**\n\n```\n{provider}/{repo}@{version}\n```\n\nExample: `Comfy-Org/ComfyUI_frontend@v1.2.2`\n\n**Validation Regex:**\n```\n^([a-zA-Z0-9][a-zA-Z0-9-]{0,38})/([a-zA-Z0-9_.-]+)@(v?\\d+\\.\\d+\\.\\d+[-._a-zA-Z0-9]*|latest|prerelease)$\n```\n\n**Package Discovery:**\n\n| Package Type | Purpose |\n|--------------|---------|\n| `comfyui-frontend-package` | Main frontend assets |\n| `comfyui-workflow-templates` | Workflow template files |\n| `comfyui-embedded-docs` | Embedded documentation |\n\n资料来源：[app/frontend_management.py:1-100](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py)\n\n## API Routes Architecture\n\n### REST Endpoints\n\n```mermaid\ngraph TD\n    R1[\"GET /v2/userdata\"] --> UM[UserManager]\n    R2[\"GET /experiment/models\"] --> MM[ModelFileManager]\n    R3[\"GET /experiment/models/{folder}\"] --> MM\n```\n\n**File Listing Parameters:**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `path` | `str` | Relative path within data directory |\n| `recurse` | `bool` | Enable recursive directory traversal |\n| `full_info` | `bool` | Return full file metadata |\n| `split` | `bool` | Return path as array (split by `/`) |\n\n**Response Format:**\n\n```python\nclass FileInfo(TypedDict):\n    path: str      # Relative file path\n    size: int      # File size in bytes\n    modified: int  # Modification time (milliseconds)\n    created: int   # Creation time (milliseconds)\n```\n\n资料来源：[app/user_manager.py:60-100](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n\n## Type System Architecture\n\nComfyUI implements a comprehensive type hinting system for node development.\n\n```mermaid\nclassDiagram\n    class ComfyNodeABC {\n        <<abstract>>\n        +INPUT_TYPES: InputTypeDict\n    }\n    \n    class IO {\n        <<enumeration>>\n        ANY = \"*\"\n        NUMBER = \"FLOAT,INT\"\n        PRIMITIVE = \"STRING,FLOAT,INT,BOOLEAN\"\n    }\n    \n    ComfyNodeABC --> IO\n```\n\n**Built-in IO Types:**\n\n| Type | Value | Description |\n|------|-------|-------------|\n| `ANY` | `\"*\"` | Accepts any input type |\n| `NUMBER` | `\"FLOAT,INT\"` | Numeric values |\n| `PRIMITIVE` | `\"STRING,FLOAT,INT,BOOLEAN\"` | Basic data types |\n\n资料来源：[comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n\n## Configuration and CLI Arguments\n\n### Command Line Options\n\n| Flag | Description |\n|------|-------------|\n| `--enable-manager` | Enable ComfyUI-Manager |\n| `--enable-manager-legacy-ui` | Use legacy manager UI |\n| `--disable-manager-ui` | Disable manager UI (keep background features) |\n| `--disable-api-nodes` | Disable optional API nodes |\n| `--preview-method {auto,taesd}` | Preview generation method |\n| `--front-end-version` | Specify frontend version |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Environment Variables\n\n| Variable | Purpose | Example |\n|----------|---------|---------|\n| `HSA_OVERRIDE_GFX_VERSION` | AMD GPU compatibility | `10.3.0` for RDNA2 |\n| `TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL` | ROCm memory optimization | `1` |\n| `PYTORCH_TUNABLEOP_ENABLED` | PyTorch tuning | `1` |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Data Flow: Workflow Execution\n\n```mermaid\nsequenceDiagram\n    participant Client\n    participant API\n    participant Execution\n    participant Cache\n    participant Models\n    \n    Client->>API: Submit Workflow Graph\n    API->>Execution: Parse Graph\n    Execution->>Cache: Check Node States\n    Cache-->>Execution: Cached Results\n    Execution->>Models: Load Required Models\n    Models-->>Execution: Model Data\n    Execution->>Execution: Topological Sort\n    Execution->>Execution: Execute Changed Nodes\n    Execution-->>API: Output Results\n    API-->>Client: WebSocket Update\n```\n\n## Node Graph Structure\n\nComfyUI workflows are represented as directed acyclic graphs (DAGs) where:\n\n- **Nodes** represent computational units (e.g., model loading, sampling, encoding)\n- **Edges** represent data flow between nodes\n- **Execution Order** is determined by topological sorting based on input dependencies\n\n```mermaid\ngraph LR\n    subgraph Inputs\n        Model[\"Model Loader\"]\n        Clip[\"CLIP Text Encode\"]\n        Latent[\"Empty Latent\"]\n    end\n    \n    subgraph Process\n        Sampler[\"KSampler\"]\n    end\n    \n    subgraph Outputs\n        Decode[\"VAE Decode\"]\n        Image[\"Save Image\"]\n    end\n    \n    Model --> Sampler\n    Clip --> Sampler\n    Latent --> Sampler\n    Sampler --> Decode\n    Decode --> Image\n```\n\n## Release Process Architecture\n\nComfyUI maintains three interconnected repositories with different release cadences:\n\n| Repository | Branch | Release Cycle | Purpose |\n|------------|--------|---------------|---------|\n| ComfyUI Core | master | ~2 weeks | Major stable releases |\n| ComfyUI Core | tags | as needed | Patch fixes for stable |\n| Frontend | various | weekly | UI updates |\n\n**Versioning Scheme:**\n- Major versions (e.g., v0.7.0) for significant releases\n- Minor versions for master branch releases\n- Patch versions for backported fixes\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Security Considerations\n\n### Multi-User Mode\n\nWhen `--multi-user` is enabled:\n- User settings are stored server-side instead of browser local storage\n- Each user has isolated data directories\n- User settings persist across sessions\n\n### File Access Control\n\nThe `/v2/userdata` endpoint implements path validation:\n- Prevents directory traversal attacks\n- Validates paths are within user's data directory\n- Returns appropriate HTTP status codes (400, 404) for invalid requests\n\n资料来源：[app/user_manager.py:80-120](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py)\n\n---\n\n<a id='page-server-system'></a>\n\n## Server System\n\n### 相关页面\n\n相关主题：[System Architecture](#page-architecture), [Execution Engine](#page-execution-engine)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [server.py](https://github.com/Comfy-Org/ComfyUI/blob/main/server.py)\n- [protocol.py](https://github.com/Comfy-Org/ComfyUI/blob/main/protocol.py)\n- [api_server/routes/internal/internal_routes.py](https://github.com/Comfy-Org/ComfyUI/blob/main/api_server/routes/internal/internal_routes.py)\n- [api_server/services/terminal_service.py](https://github.com/Comfy-Org/ComfyUI/blob/main/api_server/services/terminal_service.py)\n- [api_server/utils/file_operations.py](https://github.com/Comfy-Org/ComfyUI/blob/main/api_server/utils/file_operations.py)\n</details>\n\n# Server System\n\n## Overview\n\nThe ComfyUI Server System is the core backend infrastructure responsible for handling client connections, executing workflows, managing files, and orchestrating the AI generation pipeline. Built on top of `aiohttp`, the server provides both REST API endpoints and WebSocket-based real-time communication for seamless interaction between the frontend interface and backend processing engines.\n\nThe server acts as the central hub that manages:\n- **Client connections** via WebSocket protocol\n- **Workflow execution** scheduling and queue management\n- **File operations** for models, outputs, and user data\n- **Frontend delivery** and management\n- **User authentication and multi-user support**\n\n资料来源：[server.py]() | [protocol.py]()\n\n## Architecture Overview\n\n```mermaid\ngraph TB\n    subgraph \"Client Layer\"\n        Frontend[Frontend UI]\n        ExternalAPI[External API Clients]\n    end\n\n    subgraph \"Server Core\"\n        WSS[WebSocket Server]\n        REST[REST API Routes]\n        Auth[Authentication Layer]\n    end\n\n    subgraph \"Services Layer\"\n        Exec[Execution Engine]\n        Terminal[Terminal Service]\n        FileOps[File Operations]\n        Queue[Queue Manager]\n    end\n\n    subgraph \"Data Layer\"\n        Models[Model Manager]\n        Users[User Manager]\n        Settings[App Settings]\n    end\n\n    Frontend --> WSS\n    ExternalAPI --> REST\n    WSS --> Auth\n    REST --> Auth\n    Auth --> Exec\n    Exec --> Queue\n    Exec --> Terminal\n    FileOps --> Models\n    FileOps --> Users\n    FileOps --> Settings\n```\n\n## Protocol Layer\n\n### WebSocket Protocol\n\nThe ComfyUI server uses a custom WebSocket-based protocol for real-time communication between the client and server. This protocol enables:\n\n- **Bidirectional messaging** - Both client and server can send messages independently\n- **Execution events** - Real-time updates on workflow execution progress\n- **Prompt submission** - Sending workflows for execution\n- **History tracking** - Recording and retrieving execution history\n\n资料来源：[protocol.py]()\n\n### Message Types\n\n| Message Type | Direction | Purpose |\n|--------------|-----------|---------|\n| `executing` | Server → Client | Notification when a node begins execution |\n| `executed` | Server → Client | Notification when a node completes execution |\n| `execution_error` | Server → Client | Reports errors during workflow execution |\n| `progress` | Server → Client | Progress updates for long-running operations |\n| `executing_node` | Server → Client | Identifies currently executing node |\n| `prompt` | Client → Server | Submit workflow for execution |\n| `interrupt` | Client → Server | Request to interrupt current execution |\n\n## Server Core Components\n\n### Main Server Entry Point\n\nThe `server.py` file contains the main server initialization and lifecycle management. Key responsibilities include:\n\n- Initializing the aiohttp web application\n- Registering routes and middleware\n- Setting up WebSocket endpoints\n- Managing server lifecycle (start, stop, restart)\n\n```python\n# Server initialization pattern\napp = web.Application()\nserver = Server()\nserver.setup_routes(app)\nweb.run_app(app, host=host, port=port)\n```\n\n资料来源：[server.py]()\n\n### API Routes Structure\n\nThe server organizes routes into logical namespaces:\n\n| Route Namespace | Purpose |\n|-----------------|---------|\n| `/api` | Public REST API endpoints |\n| `/internal` | Internal server-to-server communication |\n| `/v2/userdata` | User data management endpoints |\n| `/experiment` | Experimental features |\n\n### Internal Routes\n\nInternal routes under `/internal` are designated for ComfyUI's internal use only and may change without notice. These routes handle:\n\n- System-level operations\n- Queue management\n- Execution state tracking\n- Server configuration\n\n资料来源：[api_server/routes/internal/internal_routes.py]()\n\n## Services Layer\n\n### Terminal Service\n\nThe Terminal Service manages pseudo-terminal functionality for executing external processes. This service is crucial for:\n\n- Running Python scripts within workflows\n- Executing system commands\n- Managing subprocess lifecycle\n\nThe service provides:\n- PTY (pseudo-terminal) allocation\n- Stream multiplexing\n- Process lifecycle management\n\n资料来源：[api_server/services/terminal_service.py]()\n\n### File Operations\n\nThe file operations module provides utilities for:\n\n| Operation | Description |\n|-----------|-------------|\n| Directory listing | Recursive and non-recursive file traversal |\n| File metadata | Size, creation time, modification time |\n| Path validation | Security checks for path traversal |\n| User data access | Isolated access to user-specific directories |\n\n```python\n# File info structure returned by file operations\nclass FileInfo(TypedDict):\n    path: str      # Relative path from base directory\n    size: int      # File size in bytes\n    modified: int  # Modification timestamp (milliseconds)\n    created: int   # Creation timestamp (milliseconds)\n```\n\nThe `list_userdata_v2` endpoint provides structured access to user data directories with proper security constraints.\n\n资料来源：[api_server/utils/file_operations.py]()\n\n### Queue Manager\n\nThe queue manager handles workflow scheduling:\n\n- **Priority queuing** - Higher priority prompts execute first\n- **Execution caching** - Identical graphs skip re-execution\n- **Partial execution** - Only changed portions of graphs execute\n\nExecution behavior notes:\n- Only parts of the graph with all correct inputs will be executed\n- Only parts that change between executions are re-run\n- Submitting the same graph twice results in only the first execution\n\n## Data Management\n\n### User Manager\n\nThe UserManager handles multi-user support and user settings:\n\n- **User directory management** - Isolated storage per user\n- **Settings persistence** - Server-side storage instead of browser localStorage\n- **Multi-user mode** - Enabled via `--multi-user` CLI flag\n\n| Setting | Description |\n|---------|-------------|\n| `multi_user` | CLI argument to enable multiple user profiles |\n| `user_directory` | Base directory for user-specific data |\n| `users_file` | JSON file storing user configurations |\n\nUser data is stored in the user directory with each user having isolated access to their own data.\n\n资料来源：[app/user_manager.py]()\n\n### Model Manager\n\nThe ModelFileManager provides:\n\n- **Model discovery** - Listing models by type and folder\n- **Metadata extraction** - Reading safetensors headers for preview images\n- **Preview generation** - Supporting preview thumbnails for models\n\n| Feature | Supported Formats |\n|---------|-------------------|\n| Preview Images | PNG, JPG, WebP |\n| Model Metadata | safetensors headers |\n| Preview Thumbnails | Base64-encoded in safetensors metadata |\n\nThe `/experiment/models` endpoint provides a structured listing of available model types and folders.\n\n资料来源：[app/model_manager.py]()\n\n### Frontend Management\n\nFrontend management handles the web UI delivery:\n\n- **Version management** - Supports specific versions, nightly builds, or stable releases\n- **Custom frontends** - Allows loading frontends from external repositories\n- **Embedded docs** - Integration with embedded documentation package\n\n```bash\n# Example: Using specific frontend version\n--front-end-version Comfy-Org/ComfyUI_frontend@v1.2.2\n\n# Using legacy frontend\n--front-end-version Comfy-Org/ComfyUI_legacy_frontend@latest\n```\n\n| Frontend Provider | Description |\n|-------------------|-------------|\n| PyPI (stable) | Default stable releases |\n| GitHub | Cutting-edge daily updates |\n| Custom | Repository-specific versions |\n\n资料来源：[app/frontend_management.py]()\n\n## Security Model\n\n### User Data Isolation\n\nThe server implements strict user data isolation:\n\n- Each user has a dedicated data directory\n- Path traversal attacks are prevented via `glob.escape()`\n- User data endpoints validate paths against allowed directories\n- Multi-user mode requires explicit CLI activation\n\n### Internal Routes Protection\n\nRoutes under `/internal` are explicitly marked as:\n- Not intended for external application use\n- Subject to change without notice\n- Internal ComfyUI functionality only\n\n## Configuration\n\n### CLI Arguments\n\n| Argument | Description |\n|----------|-------------|\n| `--enable-manager` | Enable ComfyUI-Manager extension |\n| `--enable-manager-legacy-ui` | Use legacy manager UI |\n| `--disable-manager-ui` | Disable manager UI while keeping background features |\n| `--multi-user` | Enable multiple user profiles |\n| `--front-end-version` | Specify frontend version |\n| `--preview-method` | Set preview generation method (auto, taesd) |\n| `--tls-keyfile` | TLS private key file path |\n| `--tls-certfile` | TLS certificate file path |\n\n### Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| `TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL` | Enable experimental ROCm features |\n| `PYTORCH_TUNABLEOP_ENABLED` | Enable PyTorch tuning for potential speed improvements |\n| `HSA_OVERRIDE_GFX_VERSION` | Override AMD GPU architecture detection |\n\n## Execution Flow\n\n```mermaid\nsequenceDiagram\n    participant Client\n    participant Server\n    participant Queue\n    participant Executor\n\n    Client->>Server: WebSocket Connect\n    Server->>Client: Connection Acknowledged\n\n    Client->>Server: Submit Prompt (workflow)\n    Server->>Queue: Add to execution queue\n    Server->>Client: Queue position acknowledged\n\n    Loop Execution\n        Queue->>Executor: Dequeue next task\n        Executor->>Executor: Execute node(s)\n        Executor->>Server: Progress updates\n        Server->>Client: Real-time execution events\n\n        alt Node executes successfully\n            Executor->>Server: Node completed\n            Server->>Client: \"executed\" message\n        else Execution error\n            Executor->>Server: Error details\n            Server->>Client: \"execution_error\" message\n        end\n    end\n\n    Executor->>Server: All nodes complete\n    Server->>Client: Execution complete\n```\n\n## Summary\n\nThe ComfyUI Server System provides a robust, event-driven architecture for AI workflow execution. Built on aiohttp, it combines:\n\n- **WebSocket-based real-time communication** for interactive execution monitoring\n- **RESTful API endpoints** for external integration\n- **Service-oriented design** for modularity and maintainability\n- **Strong security boundaries** through user isolation and path validation\n\nThe server seamlessly integrates with the frontend to deliver a responsive user experience while managing complex AI model execution pipelines in the background.\n\n---\n\n<a id='page-execution-engine'></a>\n\n## Execution Engine\n\n### 相关页面\n\n相关主题：[Graph Management](#page-graph-management), [Server System](#page-server-system), [Memory Management](#page-memory-management)\n\n<details>\n<summary>Relevant Source Files</summary>\n\nThe following source files were used to generate this documentation:\n\n- [README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md) - Contains high-level execution engine behavior notes\n- [app/user_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/user_manager.py) - Contains API routes and file processing logic\n- [app/model_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/model_manager.py) - Contains model file management and caching\n- [app/frontend_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/frontend_management.py) - Contains frontend version management and installation logic\n- [comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md) - Contains type definitions for node development\n\n</details>\n\n# Execution Engine\n\nThe Execution Engine is the core component of ComfyUI responsible for processing node-based workflows. It analyzes the dependency graph, determines execution order, and runs only the nodes necessary to produce the requested outputs.\n\n## Overview\n\nComfyUI uses a directed acyclic graph (DAG) model where each node represents an operation and edges represent data dependencies. The execution engine processes this graph efficiently by:\n\n- Executing only nodes with all required inputs available\n- Skipping unchanged portions of the graph on re-execution\n- Caching intermediate results to avoid redundant computation\n\n资料来源：[README.md:1-50]()\n\n## Execution Model\n\n### Lazy Evaluation Strategy\n\nThe execution engine employs lazy evaluation, meaning nodes are only executed when their outputs are actually needed by other nodes or requested by the user.\n\n```mermaid\ngraph TD\n    A[User Request] --> B{Output Cached?}\n    B -->|Yes| C[Return Cached Result]\n    B -->|No| D[Find All Dependent Nodes]\n    D --> E[Check Input Availability]\n    E --> F[Execute Required Nodes]\n    F --> G[Cache Results]\n    G --> C\n```\n\n### Incremental Execution\n\nOne of the most powerful features of the execution engine is its ability to perform incremental execution:\n\n- If the same workflow is submitted twice, only the first execution runs\n- If only part of the graph changes, only that part and its downstream dependencies are re-executed\n- This dramatically improves performance for iterative workflows\n\n> \"Only parts of the graph that change from each execution to the next will be executed, if you submit the same graph twice only the first will be executed. If you change the last part of the graph only the part you changed and the part that depends on it will be executed.\"\n\n资料来源：[README.md:1-50]()\n\n## Node Execution\n\n### Input Validation\n\nBefore any node executes, the engine validates that all required inputs are present and correctly typed. Nodes that cannot satisfy their input requirements are skipped from execution.\n\n### Dependency Resolution\n\nThe execution engine uses topological sorting to determine the correct order of node execution, ensuring that all input dependencies are satisfied before a node runs.\n\n## Caching System\n\nComfyUI implements a sophisticated caching mechanism to avoid redundant computation.\n\n### Cache Structure\n\nThe `ModelFileManager` class manages caching with the following structure:\n\n```python\nself.cache: dict[str, tuple[list[dict], dict[str, float], float]] = {}\n```\n\nEach cache entry contains:\n- A list of dictionaries with file information\n- A dictionary mapping file paths to modification timestamps\n- A float representing cache creation time\n\n资料来源：[app/model_manager.py:1-50]()\n\n### Cache Operations\n\n| Operation | Method | Description |\n|-----------|--------|-------------|\n| Get Cache | `get_cache(key, default)` | Retrieves cached data by key |\n| Set Cache | `set_cache(key, value)` | Stores data in cache |\n| Clear Cache | `clear_cache()` | Removes all cached entries |\n\n资料来源：[app/model_manager.py:1-50]()\n\n## API Endpoints\n\nThe execution engine interacts with the following API endpoints for model and file management:\n\n### Model Routes\n\n| Endpoint | Method | Purpose |\n|----------|--------|---------|\n| `/experiment/models` | GET | List all available model folders |\n| `/experiment/models/{folder}` | GET | List all models in a specific folder |\n\n### File Routes\n\n| Endpoint | Method | Purpose |\n|----------|--------|---------|\n| `/files` | GET | List files in a directory |\n| `/v2/userdata` | GET | List user data directory contents |\n\nThe file listing endpoint supports query parameters:\n- `path`: Relative path within the data directory\n- `recurse`: Enable recursive directory traversal\n- `full_info`: Return detailed file information\n- `split`: Return path segments as array elements\n\n资料来源：[app/user_manager.py:1-50]()\n资料来源：[app/model_manager.py:50-100]()\n\n## Node Type System\n\nComfyUI uses a typed node system defined in `comfy/comfy_types/`:\n\n### Core Types\n\n| Type | Description |\n|------|-------------|\n| `IO.ANY` | Accepts any input type (\"*\") |\n| `IO.NUMBER` | Numeric values (FLOAT, INT) |\n| `IO.PRIMITIVE` | Basic types (STRING, FLOAT, INT, BOOLEAN) |\n\n### Base Class\n\nThe `ComfyNodeABC` abstract base class provides:\n- Type hinting support\n- Autocomplete for node developers\n- Standardized `INPUT_TYPES` interface\n\n资料来源：[comfy/comfy_types/README.md:1-50]()\n\n## Workflow Processing\n\n### File Operations\n\nWorkflows can be loaded from multiple formats:\n\n- PNG files with embedded workflow data\n- WebP images\n- FLAC audio files\n- JSON workflow files\n\nDragging a generated PNG onto the webpage automatically extracts the full workflow including seeds.\n\n资料来源：[README.md:1-50]()\n\n### Dynamic Prompts\n\nThe execution engine supports dynamic prompt syntax:\n\n| Syntax | Description |\n|--------|-------------|\n| `(text:1.2)` | Increase emphasis (1.2x) |\n| `(text:0.8)` | Decrease emphasis (0.8x) |\n| `{wild\\|card\\|test}` | Random selection |\n| `\\\\(` | Escape parentheses |\n| `\\\\{` | Escape braces |\n\n## Frontend Integration\n\nThe execution engine works with frontend version management to ensure compatibility:\n\n### Version String Format\n\n```\nprovider/repository@version\n```\n\nExample: `Comfy-Org/ComfyUI_frontend@1.2.2`\n\n### Version Pattern\n\n```\n^([a-zA-Z0-9][a-zA-Z0-9-]{0,38})/([a-zA-Z0-9_.-]+)@(v?\\d+\\.\\d+\\.\\d+[-._a-zA-Z0-9]*|latest|prerelease)$\n```\n\n资料来源：[app/frontend_management.py:1-50]()\n\n## Performance Optimizations\n\n### Graph Optimization\n\nThe execution engine optimizes performance through:\n\n1. **Dependency Analysis**: Identifies minimum required nodes\n2. **Caching**: Stores intermediate computation results\n3. **Incremental Updates**: Skips unchanged graph portions\n4. **Lazy Evaluation**: Only computes when outputs are needed\n\n### Parallel Execution\n\nWhile nodes within the same dependency level may have execution order constraints, the engine is designed to support parallel execution where possible.\n\n## Error Handling\n\nThe execution engine provides graceful error handling:\n\n- Invalid paths return appropriate HTTP status codes (400, 404)\n- Missing requirements are logged with installation instructions\n- The system can continue operating even if optional components are unavailable\n\n资料来源：[app/frontend_management.py:1-50]()\n\n---\n\n<a id='page-graph-management'></a>\n\n## Graph Management\n\n### 相关页面\n\n相关主题：[Execution Engine](#page-execution-engine)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [app/subgraph_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/subgraph_manager.py)\n- [app/node_replace_manager.py](https://github.com/Comfy-Org/ComfyUI/blob/main/app/node_replace_manager.py)\n- [comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n- [README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n</details>\n\n# Graph Management\n\n## Overview\n\nGraph Management is a core system in ComfyUI that handles the creation, execution, caching, and manipulation of node-based computational graphs. The system orchestrates how nodes are executed, how workflows are processed, and how subgraphs are managed across the application. ComfyUI's node graph interface enables users to experiment and create complex Stable Diffusion workflows without needing to code, making graph management essential for both the UI layer and the execution engine.\n\nThe graph management system encompasses several interconnected components: the execution engine that processes node graphs, subgraph management for reusable workflow components, node replacement for runtime optimizations, and type hinting infrastructure for node development. Only parts of the graph that have an output with all the correct inputs will be executed, and only parts that change from each execution to the next will be re-executed, significantly optimizing performance for iterative workflows.\n\n## Core Architecture\n\n```mermaid\ngraph TD\n    A[User Workflow] --> B[Graph Execution Engine]\n    B --> C[Node Execution]\n    B --> D[Subgraph Manager]\n    B --> E[Node Replace Manager]\n    C --> F[Graph Utils]\n    D --> G[Custom Node Subgraphs]\n    D --> H[Blueprint Subgraphs]\n    E --> I[Registered Replacements]\n    F --> J[Graph Optimization]\n```\n\n## Subgraph Management\n\n### Purpose and Scope\n\nThe Subgraph Manager handles the registration, loading, and lifecycle of reusable workflow components called subgraphs. Subgraphs are self-contained node definitions stored as JSON files that can be imported and used within larger workflows. This system enables code modularity and reuse, allowing custom node developers to package complex node arrangements as single, reusable units.\n\nThe manager supports two distinct sources of subgraphs:\n\n| Source | Description | Path Location |\n|--------|-------------|---------------|\n| `custom_node` | Subgraphs bundled with custom node extensions | `<custom_node_dir>/subgraphs/<name>.json` |\n| `templates` | Built-in workflow templates | `blueprints/` directory |\n\n### Data Models\n\n#### Source Enum\n\n```python\nclass Source:\n    custom_node = \"custom_node\"\n    templates = \"templates\"\n```\n\n#### SubgraphEntry Structure\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `source` | `str` | Source identifier - custom_node or templates |\n| `path` | `str` | Relative path of the subgraph file |\n| `name` | `str` | Name of the subgraph file (without extension) |\n| `info` | `CustomNodeSubgraphEntryInfo` | Additional metadata (node pack name for custom nodes) |\n| `data` | `str` | Raw JSON content of the subgraph |\n\n资料来源：[app/subgraph_manager.py:1-45]()\n\n#### CustomNodeSubgraphEntryInfo\n\n```python\nclass CustomNodeSubgraphEntryInfo(TypedDict):\n    node_pack: str\n    \"\"\"Node pack name.\"\"\"\n```\n\n### Caching Strategy\n\nThe Subgraph Manager implements a caching mechanism to avoid redundant filesystem operations:\n\n```python\nclass SubgraphManager:\n    def __init__(self):\n        self.cached_custom_node_subgraphs: dict[SubgraphEntry] | None = None\n        self.cached_blueprint_subgraphs: dict[SubgraphEntry] | None = None\n```\n\nThe cache is invalidated when `force_reload=True` is passed to the retrieval methods, enabling refresh during custom node reload scenarios.\n\n### Entry Generation\n\nEach subgraph entry is assigned a unique identifier generated via SHA-256 hash:\n\n```python\ndef _create_entry(self, file: str, source: str, node_pack: str) -> tuple[str, SubgraphEntry]:\n    \"\"\"Create a subgraph entry from a file path. Expects normalized path (forward slashes).\"\"\"\n    entry_id = hashlib.sha256(f\"{source}{file}\".encode()).hexdigest()\n    entry: SubgraphEntry = {\n        \"source\": source,\n        \"name\": os.path.splitext(os.path.basename(file))[0],\n        \"path\": file,\n        ...\n    }\n```\n\n资料来源：[app/subgraph_manager.py:57-70]()\n\n### REST API Endpoints\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/global_subgraphs` | GET | Returns all subgraphs with optional data stripping |\n| `/global_subgraphs/{id}` | GET | Returns a specific subgraph by its SHA-256 ID |\n\nThe `get_all_subgraphs` method merges results from both custom nodes and blueprints:\n\n```python\nasync def get_all_subgraphs(self, loadedModules, force_reload=False):\n    \"\"\"Get all subgraphs from all sources (custom nodes and blueprints).\"\"\"\n    custom_node_subgraphs = await self.get_custom_node_subgraphs(loadedModules, force_reload)\n    blueprint_subgraphs = await self.get_blueprint_subgraphs(force_reload)\n    return {**custom_node_subgraphs, **blueprint_subgraphs}\n```\n\n## Node Replacement Management\n\n### Purpose\n\nThe Node Replace Manager registers runtime node substitutions that occur during graph execution. This system enables custom nodes to declare that certain node types should be replaced with alternative implementations, facilitating backward compatibility, optimization, and feature expansion without modifying existing workflows.\n\n### Registration Interface\n\n```python\nclass NodeReplaceManager:\n    \"\"\"Manages node replacement registrations.\"\"\"\n\n    def __init__(self):\n        self._replacements: dict[str, list[NodeReplace]] = {}\n\n    def register(self, node_replace: NodeReplace):\n        \"\"\"Register a node replacement mapping.\n\n        Idempotent: if a replacement with the same (old_node_id, new_node_id)\n        is already registered, the duplicate is ignored. This prevents stale\n        entries from accumulating when custom nodes are reloaded in the same\n        process (e.g. via ComfyUI-Manager).\n        \"\"\"\n```\n\n资料来源：[app/node_replace_manager.py:25-40]()\n\n### Idempotent Registration\n\nThe registration process is designed to be idempotent, preventing duplicate entries when custom nodes are reloaded:\n\n```python\nexisting = self._replacements.setdefault(node_replace.old_node_id, [])\nfor entry in existing:\n    if entry.new_node_id == node_replace.new_node_id:\n        logging.debug(\n            \"Node replacement %s -> %s already registered, ignoring duplicate.\",\n            ...\n        )\n```\n\nThis design prevents stale entries from accumulating during custom node reloads triggered by ComfyUI-Manager.\n\n## Node Type System\n\n### IO Types\n\nComfyUI provides a standardized type system through the `IO` enum for node input/output definitions:\n\n| Type | Value | Description |\n|------|-------|-------------|\n| `ANY` | `\"*\"` | Accepts any type |\n| `NUMBER` | `\"FLOAT,INT\"` | Numeric values |\n| `PRIMITIVE` | `\"STRING,FLOAT,INT,BOOLEAN\"` | Basic data types |\n\n资料来源：[comfy/comfy_types/README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/comfy_types/README.md)\n\n### ComfyNodeABC Base Class\n\nThe abstract base class provides type-hinting and autocomplete support for node developers:\n\n```python\nclass ExampleNode(ComfyNodeABC):\n    @classmethod\n    def INPUT_TYPES(s) -> InputTypeDict:\n        return {\"required\": {}}\n```\n\n## Graph Execution Model\n\n### Execution Optimization\n\nComfyUI's graph execution follows specific rules that optimize performance:\n\n1. **Complete Input Requirement**: Only parts of the graph that have an output with all the correct inputs will be executed.\n\n2. **Incremental Execution**: Only parts of the graph that change from each execution to the next will be executed. If you submit the same graph twice, only the first will be executed. If you change the last part of the graph, only the part you changed and the part that depends on it will be executed.\n\nThis model significantly reduces computational overhead for iterative workflows where users make incremental adjustments.\n\n### Workflow Serialization\n\nWorkflows can be saved and loaded as JSON files, enabling persistence and sharing of node graph configurations. Dragging a generated PNG on the webpage or loading one will give the full workflow including seeds that were used to create it, maintaining reproducibility.\n\n## Node Struct Operations\n\n### NodeStruct Definition\n\n```python\nclass NodeStruct(TypedDict):\n    inputs: dict[str, str | int | float | bool | tuple[str, int]]\n    class_type: str\n    _meta: dict[str, str]\n```\n\n### Copy Operations\n\nThe `copy_node_struct` function creates modified copies for graph manipulation:\n\n```python\ndef copy_node_struct(node_struct: NodeStruct, empty_inputs: bool = False) -> NodeStruct:\n    new_node_struct = node_struct.copy()\n    if empty_inputs:\n        new_node_struct[\"inputs\"] = {}\n    else:\n        new_node_struct[\"inputs\"] = node_struct[\"inputs\"].copy()\n    new_node_struct[\"_meta\"] = node_struct[\"_meta\"].copy()\n    return new_node_struct\n```\n\n资料来源：[app/node_replace_manager.py:16-25]()\n\n## Related Components\n\n| Component | File Path | Purpose |\n|-----------|-----------|---------|\n| Graph Execution | `comfy_execution/graph.py` | Core graph execution engine |\n| Graph Utilities | `comfy_execution/graph_utils.py` | Graph manipulation helpers |\n| Node Helpers | `node_helpers.py` | Common node development utilities |\n| Node Typing | `comfy/comfy_types/node_typing.py` | Type definitions for nodes |\n| User Manager | `app/user_manager.py` | User data and file operations |\n\n## Best Practices\n\n### Node Development\n\n- Use `ComfyNodeABC` as the base class for custom nodes to leverage type-hinting\n- Properly define `INPUT_TYPES` with correct type annotations\n- Register node replacements idempotently to support hot-reloading\n\n### Workflow Optimization\n\n- Structure workflows to minimize dependencies between unchanged sections\n- Use subgraphs for reusable workflow patterns\n- Leverage the incremental execution model by making changes at graph endpoints\n\n### Custom Node Packaging\n\n- Place subgraphs in the designated `subgraphs/` directory within custom node packages\n- Use the node pack name in `CustomNodeSubgraphEntryInfo` for proper namespacing\n- Follow JSON format for subgraph definition files\n\n---\n\n<a id='page-model-loading'></a>\n\n## Model Loading and Detection\n\n### 相关页面\n\n相关主题：[Diffusion Models](#page-diffusion-models), [Memory Management](#page-memory-management)\n\nI do not have access to the source files required to generate this wiki page. The provided context does not contain the following files that are essential for documenting the Model Loading and Detection system:\n\n**Required files that are missing:**\n\n- `comfy/model_detection.py`\n- `comfy/model_management.py`\n- `comfy/model_patcher.py`\n- `comfy/model_base.py`\n- `comfy/supported_models.py`\n- `comfy/lora.py`\n- `folder_paths.py`\n\nThe context only includes:\n\n- `README.md` (general documentation)\n- `app/user_manager.py` (user data management)\n- `app/model_manager.py` (model file manager - partial)\n- `app/frontend_management.py` (frontend version management)\n- `comfy/comfy_types/README.md` (type hinting documentation)\n\nWithout access to the actual source files for model loading and detection, I cannot provide accurate technical details, code citations, or architectural diagrams that would be factual and useful.\n\nTo generate this wiki page, I would need the repository to be re-analyzed with the specific files listed above included in the context.\n\n---\n\n<a id='page-diffusion-models'></a>\n\n## Diffusion Models\n\n### 相关页面\n\n相关主题：[Model Loading and Detection](#page-model-loading), [Text Processing and Encoders](#page-text-processing)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [comfy/ldm/modules/diffusionmodules/model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/modules/diffusionmodules/model.py)\n- [comfy/ldm/modules/diffusionmodules/openaimodel.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/modules/diffusionmodules/openaimodel.py)\n- [comfy/ldm/flux/model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/flux/model.py)\n- [comfy/ldm/wan/model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/wan/model.py)\n- [comfy/ldm/hunyuan_video/model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/hunyuan_video/model.py)\n- [comfy/ldm/cogvideo/model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/ldm/cogvideo/model.py)\n- [comfy/samplers.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/samplers.py)\n- [comfy/sample.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sample.py)\n</details>\n\n# Diffusion Models\n\n## Overview\n\nDiffusion models in ComfyUI are probabilistic generative models that learn to reverse a forward diffusion process. By gradually denoising random noise through a learned reverse process, these models generate high-quality images, videos, and audio from latent representations.\n\nComfyUI implements a modular architecture supporting multiple diffusion model families:\n\n| Model Family | Domain | Primary File |\n|--------------|--------|--------------|\n| Stable Diffusion | Image | `comfy/ldm/modules/diffusionmodules/model.py` |\n| Stable Diffusion XL | Image | `comfy/ldm/modules/diffusionmodules/openaimodel.py` |\n| Flux | Image | `comfy/ldm/flux/model.py` |\n| Wan | Video | `comfy/ldm/wan/model.py` |\n| Hunyuan Video | Video | `comfy/ldm/hunyuan_video/model.py` |\n| CogVideo | Video | `comfy/ldm/cogvideo/model.py` |\n\n## Architecture\n\n### Core Diffusion Module Structure\n\n```mermaid\ngraph TD\n    A[Latent Input] --> B[Diffusion Model]\n    B --> C[UNet Architecture]\n    C --> D[Time Embedding]\n    C --> E[Residual Blocks]\n    C --> F[Attention Layers]\n    D --> G[Denoised Output]\n    E --> G\n    F --> G\n    \n    H[Sampler] --> I[Noise Schedule]\n    I --> B\n    G --> J[VAE Decode]\n    J --> K[Final Output]\n```\n\n### Supported Model Types\n\nComfyUI natively supports state-of-the-art open-source diffusion models across multiple domains:\n\n#### Image Generation Models\n\n| Model Type | Description | Documentation Link |\n|------------|-------------|-------------------|\n| Stable Diffusion 1.5 | Latent diffusion model for image generation | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/) |\n| Stable Diffusion XL | Enhanced SD with improved quality | Included in core |\n| SDXL Turbo / LCM | Fast convergence models | [LCM Examples](https://comfyanonymous.github.io/ComfyUI_examples/lcm/) |\n| Stable Diffusion 3 / Flux | MM-DiT architecture for superior quality | [Flux Examples](https://comfyanonymous.github.io/ComfyUI_examples/flux/) |\n| Hunyuan DiT | Tencent's diffusion transformer | Included in core |\n| Ollin | Custom high-quality diffusion | Available via community |\n| Wan | Wan 2.1 and Wan 2.2 video models | [Wan Examples](https://comfyanonymous.github.io/ComfyUI_examples/wan/) |\n| HiDream | Advanced image generation | [HiDream Examples](https://comfyanonymous.github.io/ComfyUI_examples/hidream/) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n#### Video Generation Models\n\n| Model Type | Description | Documentation Link |\n|------------|-------------|-------------------|\n| Stable Video Diffusion | Frame interpolation and video generation | [Video Examples](https://comfyanonymous.github.io/ComfyUI_examples/video/) |\n| Mochi | High-quality video synthesis | [Mochi Examples](https://comfyanonymous.github.io/ComfyUI_examples/mochi/) |\n| LTX-Video | Lightweight video diffusion | [LTX Examples](https://comfyanonymous.github.io/ComfyUI_examples/ltxv/) |\n| Hunyuan Video | Tencent's video generation | [Hunyuan Examples](https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_video/) |\n| Wan 2.1/2.2 | Comprehensive video models | [Wan Examples](https://comfyanonymous.github.io/ComfyUI_examples/wan/) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n#### Audio Models\n\n| Model Type | Description |\n|------------|-------------|\n| Stable Audio | Audio generation and synthesis |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n#### Image Editing Models\n\n| Model Type | Description | Link |\n|------------|-------------|------|\n| Omnigen 2 | Unified image editing | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/omnigen/) |\n| Flux Kontext | In-context image editing | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/flux/#flux-kontext-image-editing-model) |\n| HiDream E1.1 | Advanced editing capabilities | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/hidream/#hidream-e11) |\n| Qwen Image Edit | Multi-modal editing | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/qwen_image/#edit-model) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Model Loading Architecture\n\n### Base Diffusion Model Files\n\n| File | Purpose |\n|------|---------|\n| `comfy/ldm/modules/diffusionmodules/model.py` | Core SD1.5/SD2.x diffusion model implementation |\n| `comfy/ldm/modules/diffusionmodules/openaimodel.py` | SDXL and newer architecture variants |\n| `comfy/ldm/flux/model.py` | Flux/MM-DiT architecture implementation |\n| `comfy/ldm/wan/model.py` | Wan video diffusion model |\n| `comfy/ldm/hunyuan_video/model.py` | Hunyuan video diffusion |\n| `comfy/ldm/cogvideo/model.py` | CogVideo model implementation |\n\n### Model Loading Workflow\n\n```mermaid\ngraph LR\n    A[Model Checkpoint] --> B[Model Loader Node]\n    B --> C[Load State Dict]\n    C --> D[Architecture Detection]\n    D --> E{Router}\n    E -->|SD 1.5/2.x| F[diffusionmodules/model.py]\n    E -->|SDXL| G[diffusionmodules/openaimodel.py]\n    E -->|Flux| H[flux/model.py]\n    E -->|Video| I[wan/hunyuan/cogvideo/model.py]\n```\n\n## Sampling System\n\n### Sampler Implementation\n\nThe sampling system is implemented in `comfy/samplers.py` and `comfy/sample.py`.\n\n| Component | File | Function |\n|-----------|------|----------|\n| SamplerFactory | `comfy/samplers.py` | Creates sampler instances |\n| KSampler | `comfy/samplers.py` | Main sampling loop implementation |\n| CFGGuider | `comfy/samplers.py` | Classifier-free guidance implementation |\n| Sampler | `comfy/sample.py` | Orchestrates the sampling process |\n\n### Sampling Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| steps | int | Number of denoising steps |\n| cfg | float | Classifier-free guidance scale |\n| sampler_name | str | Sampler algorithm (e.g., euler, dpmpp_2m) |\n| scheduler | str | Noise schedule type |\n| denoise | float | Denoising strength (0.0-1.0) |\n\n### Available Samplers\n\nComfyUI supports multiple sampling algorithms:\n\n| Sampler Category | Algorithms |\n|------------------|------------|\n| Euler Family | euler, euler_ancestral, euler_a |\n| DPM++ | dpmpp_2m, dpmpp_2m_karras, dpmpp_sde, dpmpp_sde_karras |\n| DDIM | ddim |\n| UniPC | unipc |\n| LCM | lcm (for LCM/SDXL-Turbo models) |\n\n### Noise Schedules\n\n| Scheduler | Description |\n|-----------|-------------|\n| normal | Standard noise schedule |\n| karras | Optimized schedule for better quality |\n| exponential | Exponential decay schedule |\n| simple | Simplified schedule |\n\n## Advanced Features\n\n### Textual Inversion\n\nComfyUI supports textual inversion embeddings for style and concept customization.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### LoRA Support\n\n| LoRA Type | Description |\n|-----------|-------------|\n| Regular LoRA | Standard low-rank adaptation |\n| LoCon | Location-aware conditioning |\n| LoHa | Low-rank Hadamard product adaptation |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Hypernetworks\n\nCustom hypernetworks can be loaded and applied to modify model behavior.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### ControlNet and T2I-Adapter\n\nStructural guidance for diffusion models through:\n\n| Type | Description |\n|------|-------------|\n| ControlNet | Conditioning via additional neural networks |\n| T2I-Adapter | Lightweight adapters for structure guidance |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Workflow Composition\n\n### Node Graph Architecture\n\n```mermaid\ngraph TD\n    A[Load Checkpoint] --> B[CLIP Text Encode]\n    B --> C[KSampler]\n    A --> D[VAE Encode]\n    D --> C\n    C --> E[VAE Decode]\n    E --> F[Save Image]\n    \n    G[Positive Prompt] --> B\n    H[Negative Prompt] --> B\n```\n\n### Example Workflows\n\n| Workflow | Purpose | Link |\n|----------|---------|------|\n| txt2img | Text-to-image generation | [Examples](https://comfyanonymous.github.io/ComfyUI_examples/) |\n| img2img | Image-to-image transformation | Included in core |\n| Hires Fix | Two-pass upscaling | [Hires Fix](https://comfyanonymous.github.io/ComfyUI_examples/2_pass_txt2img/) |\n| Inpainting | Selective regeneration | [Inpaint](https://comfyanonymous.github.io/ComfyUI_examples/inpaint/) |\n| Area Composition | Multi-region composition | [Area Composition](https://comfyanonymous.github.io/ComfyUI_examples/area_composition/) |\n| Upscale | Super-resolution | [Upscale Models](https://comfyanonymous.github.io/ComfyUI_examples/upscale_models/) |\n| Model Merging | Combine model weights | [Model Merging](https://comfyanonymous.github.io/ComfyUI_examples/model_merging/) |\n| GLIGEN | Grounded generation | [GLIGEN](https://comfyanonymous.github.io/ComfyUI_examples/gligen/) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Performance Optimization\n\n### Latent Preview with TAESD\n\nComfyUI provides real-time preview capabilities using TAESD (Tiny AutoEncoder for Stable Diffusion):\n\n| Feature | Description |\n|---------|-------------|\n| Low-res Preview | Default fast latent preview |\n| TAESD Preview | High-quality previews |\n| --preview-method | CLI flag to select preview method |\n\nTo enable TAESD previews:\n\n1. Download decoder files from [taesd repository](https://github.com/madebyollin/taesd/):\n   - `taesd_decoder.pth`\n   - `taesdxl_decoder.pth`\n   - `taesd3_decoder.pth`\n   - `taef1_decoder.pth`\n\n2. Place files in `models/vae_approx` directory\n\n3. Launch with `--preview-method taesd`\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### GPU Support\n\n| Platform | Installation Command |\n|----------|---------------------|\n| NVIDIA (CUDA 12.1) | `pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121` |\n| NVIDIA (CUDA 12.4) | `pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu124` |\n| NVIDIA (CUDA 12.6) | `pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu126` |\n| AMD (ROCm) | `pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.1` |\n| Intel (XPU) | `pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu` |\n| Apple Silicon | Install PyTorch nightly per [Apple Developer Guide](https://developer.apple.com/metal/pytorch/) |\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Memory Efficient Attention\n\nFor AMD GPUs with ROCm, experimental memory efficient attention can be enabled:\n\n```bash\nTORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 python main.py --use-pytorch-cross-attention\n```\n\nFor potential speed improvements:\n\n```bash\nPYTORCH_TUNABLEOP_ENABLED=1 python main.py\n```\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Execution Model\n\n### Partial Graph Execution\n\nComfyUI's execution engine optimizes diffusion model runs:\n\n> Only parts of the graph that have an output with all the correct inputs will be executed.\n> Only parts of the graph that change from each execution to the next will be executed. If you submit the same graph twice, only the first will be executed. If you change the last part of the graph, only the part you changed and the part that depends on it will be re-executed.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Execution Flow\n\n```mermaid\ngraph TD\n    A[Submit Workflow] --> B[Analyze Dependencies]\n    B --> C[Identify Executable Nodes]\n    C --> D[Execute Required Nodes]\n    D --> E[Cache Results]\n    E --> F[Return Outputs]\n    \n    G[Submit Same Workflow] --> H{Cached?}\n    H -->|Yes| I[Skip Execution]\n    H -->|No| J[Execute Changed Nodes]\n    I --> F\n    J --> K[Update Cache]\n    K --> F\n```\n\n## API Integration\n\n### API Nodes\n\nComfyUI includes optional API nodes for accessing paid models from external providers through the official [Comfy API](https://docs.comfy.org/tutorials/api-nodes/overview).\n\nTo disable API nodes:\n\n```bash\npython main.py --disable-api-nodes\n```\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Offline Operation\n\nComfyUI works fully offline for core functionality:\n\n> Works fully offline: core will never download anything unless you want it to.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Release and Versioning\n\nComfyUI follows a structured release cycle:\n\n| Release Type | Frequency | Description |\n|--------------|-----------|-------------|\n| Major Stable | ~Every 2 weeks | New stable versions (e.g., v0.7.0) |\n| Patch | As needed | Backported fixes for stable releases |\n| Nightly | Daily | Cutting-edge updates from master branch |\n\n> Commits outside of the stable release tags may be very unstable and break many custom nodes.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## See Also\n\n- [ComfyUI Examples Repository](https://comfyanonymous.github.io/ComfyUI_examples/)\n- [ComfyUI Documentation](https://docs.comfy.org/)\n- [ComfyUI API Documentation](https://docs.comfy.org/tutorials/api-nodes/overview)\n- [Comfy Cloud](https://www.comfy.org/cloud)\n\n---\n\n<a id='page-text-processing'></a>\n\n## Text Processing and Encoders\n\n### 相关页面\n\n相关主题：[Diffusion Models](#page-diffusion-models)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [comfy/clip_model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/clip_model.py)\n- [comfy/sd1_clip.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sd1_clip.py)\n- [comfy/sdxl_clip.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sdxl_clip.py)\n- [comfy/text_encoders/flux.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/flux.py)\n- [comfy/text_encoders/t5.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/t5.py)\n- [comfy/text_encoders/llama.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/llama.py)\n- [comfy/sd.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sd.py)\n</details>\n\n# Text Processing and Encoders\n\n## Overview\n\nText processing and encoding in ComfyUI provides the mechanism to convert human-readable text prompts into numerical representations (embeddings) that can be consumed by diffusion models. This system supports various model architectures including SD1.x, SDXL, Flux, and modern multimodal models.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[User Text Prompt] --> B[Text Encoding Nodes]\n    B --> C[CLIPTextEncode]\n    B --> D[CLIP Text Encode Hires]\n    B --> E[Model-Specific Encoders]\n    C --> F[CLIP Models]\n    E --> G[Flux Encoder]\n    E --> H[T5 Encoder]\n    E --> I[Llama Encoder]\n    F --> J[Embedding Tensors]\n    G --> J\n    H --> J\n    I --> J\n    J --> K[Diffusion Model]\n```\n\n## CLIP Models\n\nThe `comfy/clip_model.py` module provides the foundational CLIP model implementation used across different model variants.\n\n资料来源：[comfy/clip_model.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/clip_model.py)\n\n### SD1 CLIP\n\nThe SD1 CLIP implementation (`comfy/sd1_clip.py`) handles text encoding for Stable Diffusion 1.x models.\n\n资料来源：[comfy/sd1_clip.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sd1_clip.py)\n\n### SDXL CLIP\n\nThe SDXL CLIP implementation (`comfy/sdxl_clip.py`) extends text encoding capabilities for SDXL models with additional prompt handling.\n\n资料来源：[comfy/sdxl_clip.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sdxl_clip.py)\n\n## Text Encoders Module\n\nThe `comfy/text_encoders/` directory contains specialized encoders for modern model architectures.\n\n资料来源：[comfy/text_encoders/flux.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/flux.py), [comfy/text_encoders/t5.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/t5.py), [comfy/text_encoders/llama.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/text_encoders/llama.py)\n\n### Flux Encoder\n\nHandles text encoding for Flux models, typically combining CLIP and T5 encodings.\n\n### T5 Encoder\n\nImplements T5-based text encoding for models requiring transformer-based text processing.\n\n### Llama Encoder\n\nProvides Llama-based text encoding for advanced text understanding capabilities.\n\n## Embeddings System\n\nComfyUI supports custom embeddings stored in the `models/embeddings` directory.\n\n资料来源：[README.md](https://github.com/Comfy-Org/ComfyUI/blob/main/README.md)\n\n### Using Custom Embeddings\n\nEmbeddings can be referenced in the CLIPTextEncode node using the following syntax:\n\n```\nembedding:embedding_filename.pt\n```\n\nThe `.pt` extension can be omitted when specifying embeddings.\n\n## Model Integration\n\nText encoders are integrated into the broader model system through `comfy/sd.py`, which coordinates between different model components and their respective encoders.\n\n资料来源：[comfy/sd.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/sd.py)\n\n## Supported Models\n\n| Model Family | Text Encoder(s) | Notes |\n|--------------|-----------------|-------|\n| SD 1.x | CLIP | Standard text encoding |\n| SDXL | CLIP | Dual CLIP support |\n| Flux | CLIP + T5 | Combined encoding approach |\n| HunyuanDiT | Custom | Model-specific implementation |\n\n## Text Encoding Workflow\n\n```mermaid\ngraph LR\n    A1[Positive Prompt] --> B[CLIPTextEncode]\n    A2[Negative Prompt] --> C[CLIPTextEncode]\n    B --> D[Positive Embeddings]\n    C --> E[Negative Embeddings]\n    D --> F[KSampler]\n    E --> F\n    F --> G[Image Generation]\n```\n\n## Node Types\n\n### CLIPTextEncode\n\nThe primary node for encoding text prompts into embeddings.\n\n**Input Parameters:**\n- `text`: The text prompt to encode\n- `clip`: The CLIP model to use for encoding\n\n**Output:**\n- `CONDITIONING`: The encoded text representation\n\n### Specialized Encoding Nodes\n\n| Node | Purpose | Use Case |\n|------|---------|----------|\n| CLIP Text Encode Hires | High-resolution aware encoding | Multi-pass workflows |\n| Model-Specific Encode | Architecture-specific handling | Flux, SDXL, etc. |\n\n## Best Practices\n\n1. **Prompt Formatting**: Use proper syntax for weight adjustments (e.g., `(text:1.2)`)\n2. **Embedding Loading**: Place custom embeddings in `models/embeddings`\n3. **Model Matching**: Ensure text encoder matches the generation model\n4. **Batch Processing**: Consider CLIP sequence length limitations\n\n## Related Components\n\n- **Model Management**: `app/model_manager.py` handles loading and caching of text encoder models\n- **Type System**: `comfy/comfy_types/` provides type hints for node development including IO types for text processing\n\n---\n\n<a id='page-memory-management'></a>\n\n## Memory Management\n\n### 相关页面\n\n相关主题：[Model Loading and Detection](#page-model-loading), [Execution Engine](#page-execution-engine)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [comfy/memory_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/memory_management.py) *(未在当前上下文检索到)*\n- [comfy/model_management.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/model_management.py) *(未在当前上下文检索到)*\n- [comfy/pinned_memory.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/pinned_memory.py) *(未在当前上下文检索到)*\n- [comfy/pixel_space_convert.py](https://github.com/Comfy-Org/ComfyUI/blob/main/comfy/pixel_space_convert.py) *(未在当前上下文检索到)*\n\n**注意**: 当前检索上下文未包含上述内存管理核心源文件。以下内容主要基于 README.md 中公开文档信息及可用上下文推断。实际实现细节请参阅实际源码文件。\n</details>\n\n# Memory Management\n\nComfyUI implements a sophisticated **smart memory management system** that enables efficient execution of large AI models on hardware with limited VRAM. This system is fundamental to ComfyUI's ability to run complex workflows on consumer-grade GPUs.\n\n## Overview\n\nThe memory management subsystem in ComfyUI handles the lifecycle of model data in GPU and system memory. Its primary objectives include:\n\n- **Automatic model offloading**: Dynamically moving models between GPU VRAM and system RAM\n- **VRAM optimization**: Enabling execution on GPUs with as little as 1GB of VRAM\n- **Execution caching**: Storing partial execution results to avoid redundant computation\n- **Memory cleanup**: Properly releasing resources when models are no longer needed\n\n资料来源：[README.md]()\n\n## Architecture Overview\n\n```mermaid\ngraph TD\n    A[Workflow Execution] --> B[Memory Manager]\n    B --> C{VRAM Available?}\n    C -->|Yes| D[Load Model to GPU]\n    C -->|No| E[Smart Offloading]\n    E --> F[Partial GPU Loading]\n    F --> G[System RAM Swap]\n    D --> H[Execute Nodes]\n    G --> H\n    H --> I[Cache Results]\n    I --> J[Memory Cleanup]\n    J --> K[Free VRAM]\n```\n\n## Key Memory Management Features\n\n### Smart Offloading\n\nComfyUI can automatically run large models on GPUs with limited VRAM through intelligent offloading strategies. When a model exceeds available VRAM, the system selectively keeps portions of the model in GPU memory while swapping other components to system RAM.\n\n### Low VRAM Support\n\nComfyUI supports execution on GPUs with as low as **1GB VRAM**. This is achieved through:\n\n| VRAM Level | Strategy |\n|------------|----------|\n| 1GB+ | Full offloading with sequential layer execution |\n| 4GB+ | Partial offloading with larger batch sizes |\n| 8GB+ | Minimal offloading, models stay loaded |\n| 16GB+ | Multiple models can stay in memory simultaneously |\n\n### Execution Optimization\n\nThe system implements intelligent execution optimization where:\n\n1. **Only changed graph segments execute** - If you submit the same graph twice, only the first execution runs\n2. **Dependency tracking** - Only parts of the graph that depend on changed nodes are re-executed\n3. **Partial graph execution** - Only graph segments with all correct inputs are executed\n\n资料来源：[README.md]()\n\n## Model Loading Strategies\n\nComfyUI supports multiple model formats and loading strategies:\n\n### Supported Model Formats\n\n| Format | Description | Safety |\n|--------|-------------|--------|\n| `.safetensors` | Safe tensor format, recommended | ✅ Safe |\n| `.ckpt` | Checkpoint files | ⚠️ Standard |\n| `.pt` / `.pth` | PyTorch state dicts | ⚠️ Legacy |\n\n### Memory-Efficient Loading\n\nThe system implements safe loading for all model formats, preventing arbitrary code execution from malicious model files.\n\n## GPU Memory Options\n\n### Command Line Options\n\nComfyUI provides several command-line options for memory management:\n\n```bash\n# CPU-only execution (slowest, works without GPU)\npython main.py --cpu\n\n# Force specific GPU device\npython main.py --device cuda:0\n```\n\n### Preview Method Configuration\n\nFor latent preview generation, ComfyUI supports different preview methods that vary in memory usage:\n\n| Method | Quality | Memory Usage | Description |\n|--------|---------|--------------|-------------|\n| `auto` | Low | Minimal | Default fast latent preview |\n| `taesd` | High | Low | TAESD decoder for high-quality previews |\n\nTo enable high-quality previews:\n\n```bash\n# Download TAESD decoder files to models/vae_approx/\n# Then launch with:\npython main.py --preview-method taesd\n```\n\n资料来源：[README.md]()\n\n## Memory Management Classes\n\nBased on the module structure, the memory management system consists of several key components:\n\n```mermaid\nclassDiagram\n    class MemoryManager {\n        +manage_vram()\n        +offload_model()\n        +load_model()\n    }\n    class ModelManager {\n        +register_model()\n        +get_model()\n        +unload_model()\n    }\n    class PinnedMemory {\n        +allocate_pinned()\n        +transfer_to_device()\n        +free_pinned()\n    }\n    class PixelSpaceConverter {\n        +to_latent()\n        +to_pixel()\n        +convert_tensor()\n    }\n```\n\n### Module Responsibilities\n\n| Module | Purpose |\n|--------|---------|\n| `memory_management.py` | Core VRAM management and model placement logic |\n| `model_management.py` | Model lifecycle, registration, and caching |\n| `pinned_memory.py` | Pinned memory allocation for efficient CPU-GPU transfers |\n| `pixel_space_convert.py` | Conversion between pixel and latent image spaces |\n\n## Execution Flow with Memory Management\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Workflow\n    participant MemoryManager\n    participant ModelCache\n    participant GPU\n    participant SystemRAM\n\n    User->>Workflow: Submit Workflow\n    Workflow->>MemoryManager: Request Model\n    MemoryManager->>ModelCache: Check Cache\n    alt Model in Cache\n        ModelCache-->>MemoryManager: Return Model Ref\n    else Model Not Cached\n        MemoryManager->>GPU: Check VRAM\n        alt Sufficient VRAM\n            GPU-->>MemoryManager: OK\n            MemoryManager->>GPU: Load Model\n        else Insufficient VRAM\n            MemoryManager->>SystemRAM: Offload Parts\n            MemoryManager->>GPU: Load Partial Model\n        end\n    end\n    MemoryManager-->>Workflow: Model Ready\n    Workflow->>GPU: Execute Nodes\n    GPU-->>Workflow: Results\n```\n\n## Best Practices\n\n1. **Close unused workflows** - Free memory for new models\n2. **Use `.safetensors` format** - Safer and often faster loading\n3. **Batch similar operations** - Reduces model loading/unloading cycles\n4. **Monitor VRAM usage** - Use system tools to track memory consumption\n\n## Configuration Files\n\nComfyUI supports model path configuration through `extra_model_paths.yaml`:\n\n```yaml\n# Example extra_model_paths.yaml\nmodels_dir: /path/to/models\ncheckpoints:\n  - /custom/checkpoint/path\n```\n\nThis allows sharing model directories with other Stable Diffusion installations, reducing duplicate storage.\n\n## Related Documentation\n\n- [GPU Requirements](https://github.com/comfyanonymous/ComfyUI/wiki/Which-GPU-should-I-buy-for-ComfyUI) - Hardware recommendations\n- [Model Installation](README.md#dependencies) - Setting up models\n- [Performance Tuning](#) - Optimization tips\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：Comfy-Org/ComfyUI\n\n摘要：发现 7 个潜在踩坑项，其中 0 个为 high/blocking；最高优先级：身份坑 - 仓库名和安装名不一致。\n\n## 1. 身份坑 · 仓库名和安装名不一致\n\n- 严重度：medium\n- 证据强度：runtime_trace\n- 发现：仓库名 `comfyui` 与安装入口 `comfy-cli` 不完全一致。\n- 对用户的影响：用户照着仓库名搜索包或照着包名找仓库时容易走错入口。\n- 建议检查：在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。\n- 复现命令：`pip install comfy-cli`\n- 防护动作：页面必须同时展示 repo 名和真实安装入口，避免用户搜索错包。\n- 证据：identity.distribution | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | repo=comfyui; install=comfy-cli\n\n## 2. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | README/documentation is current enough for a first validation pass.\n\n## 3. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | last_activity_observed missing\n\n## 4. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | no_demo; severity=medium\n\n## 5. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | no_demo; severity=medium\n\n## 6. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | issue_or_pr_quality=unknown\n\n## 7. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | release_recency=unknown\n\n<!-- canonical_name: Comfy-Org/ComfyUI; human_manual_source: deepwiki_human_wiki -->\n",
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "Human Manual / 人类版说明书"
    },
    "pitfall_log": {
      "asset_id": "pitfall_log",
      "filename": "PITFALL_LOG.md",
      "markdown": "# Pitfall Log / 踩坑日志\n\n项目：Comfy-Org/ComfyUI\n\n摘要：发现 7 个潜在踩坑项，其中 0 个为 high/blocking；最高优先级：身份坑 - 仓库名和安装名不一致。\n\n## 1. 身份坑 · 仓库名和安装名不一致\n\n- 严重度：medium\n- 证据强度：runtime_trace\n- 发现：仓库名 `comfyui` 与安装入口 `comfy-cli` 不完全一致。\n- 对用户的影响：用户照着仓库名搜索包或照着包名找仓库时容易走错入口。\n- 建议检查：在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。\n- 复现命令：`pip install comfy-cli`\n- 防护动作：页面必须同时展示 repo 名和真实安装入口，避免用户搜索错包。\n- 证据：identity.distribution | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | repo=comfyui; install=comfy-cli\n\n## 2. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | README/documentation is current enough for a first validation pass.\n\n## 3. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | last_activity_observed missing\n\n## 4. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | no_demo; severity=medium\n\n## 5. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | no_demo; severity=medium\n\n## 6. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | issue_or_pr_quality=unknown\n\n## 7. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:589831718 | https://github.com/Comfy-Org/ComfyUI | release_recency=unknown\n",
      "summary": "用户实践前最可能遇到的身份、安装、配置、运行和安全坑。",
      "title": "Pitfall Log / 踩坑日志"
    },
    "prompt_preview": {
      "asset_id": "prompt_preview",
      "filename": "PROMPT_PREVIEW.md",
      "markdown": "# ComfyUI - Prompt Preview\n\n> Copy the prompt below into your AI host before installing anything.\n> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.\n\n## Copy this prompt\n\n```text\nYou are using an independent Doramagic capability pack for Comfy-Org/ComfyUI.\n\nProject:\n- Name: ComfyUI\n- Repository: https://github.com/Comfy-Org/ComfyUI\n- Summary: The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.\n- Host target: local_cli\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.\n\nBefore taking action:\n1. Restate my task, success standard, and boundary.\n2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.\n3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.\n4. If a real command, install step, API call, file write, or host integration is required, mark it as \"requires post-install verification\" and ask for approval first.\n5. If evidence is missing, say \"evidence is missing\" instead of filling the gap.\n\nPreviewable capabilities:\n- Capability 1: The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. page-introduction: Introduction to ComfyUI. Produce one small intermediate artifact and wait for confirmation.\n2. page-installation: Installation Guide. Produce one small intermediate artifact and wait for confirmation.\n3. page-architecture: System Architecture. Produce one small intermediate artifact and wait for confirmation.\n4. page-server-system: Server System. Produce one small intermediate artifact and wait for confirmation.\n5. page-execution-engine: Execution Engine. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/Comfy-Org/ComfyUI\n- https://github.com/Comfy-Org/ComfyUI#readme\n- README.md\n- main.py\n- requirements.txt\n- extra_model_paths.yaml.example\n- manager_requirements.txt\n- server.py\n- execution.py\n- comfy/options.py\n\nFirst response rules:\n1. Start Step 1 only.\n2. Explain the one service action you will perform first.\n3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.\n4. Stop and wait for my answers.\n\nStep 1 follow-up protocol:\n- After I answer the first three questions, stay in Step 1.\n- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.\n- End by asking whether I confirm the recommendation.\n- Do not move to Step 2 until I explicitly confirm.\n\nConversation rules:\n- Advance one step at a time and wait for confirmation after each small artifact.\n- Write outputs as recommendations or planned checks, not as completed execution.\n- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.\n- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.\n```\n",
      "summary": "不安装项目也能感受能力节奏的安全试用 Prompt。",
      "title": "Prompt Preview / 安装前试用 Prompt"
    },
    "quick_start": {
      "asset_id": "quick_start",
      "filename": "QUICK_START.md",
      "markdown": "# Quick Start / 官方入口\n\n项目：Comfy-Org/ComfyUI\n\n## 官方安装入口\n\n### Python / pip · 官方安装入口\n\n```bash\npip install comfy-cli\n```\n\n来源：https://github.com/Comfy-Org/ComfyUI#readme\n\n## 来源\n\n- repo: https://github.com/Comfy-Org/ComfyUI\n- docs: https://github.com/Comfy-Org/ComfyUI#readme\n",
      "summary": "从项目官方 README 或安装文档提取的开工入口。",
      "title": "Quick Start / 官方入口"
    }
  },
  "validation_id": "dval_00da00e89ada4d49b6f4c6a99d6e7b1b"
}
