应用指南

ComfyUI 和基于节点的图像工作流程

ComfyUI 是一个免费的开源应用程序,用于在您自己的计算机上运行图像、视频和音频生成模型。

听听这个指南AI叙述 · ~3 min

在本页4 分钟阅读
  1. 概述
  2. 深入探讨
  3. 现实世界的实施
  4. The Future of ComfyUI and Node-Based Image Workflows
  5. 付诸实践
  6. 不断探索
  7. 常见问题

概述

Each step of the pipeline, such as loading a model, encoding a prompt, sampling and decoding, is a node you connect in a visual graph. It matters because it shows exactly how diffusion works, makes complex workflows reproducible and shareable, and lets people run open models on their own hardware without a cloud service.

深入探讨

ComfyUI appeared in early 2023, created by a developer known as comfyanonymous. It has become one of the most widely used interfaces for open generative models, supporting Stable Diffusion variants, Flux and many video and audio models. Instead of a form with sliders, you see the pipeline itself. A minimal text-to-image graph shows each part of a latent diffusion model. Load Checkpoint outputs three things: the denoising model, the CLIP text encoder and the VAE. Two CLIP Text Encode nodes turn the positive and negative prompts into conditioning. Empty Latent Image creates the starting noise canvas at a chosen size. KSampler runs the denoising loop using the seed, step count, guidance (CFG) scale, sampler and scheduler. VAE Decode converts the final latent into pixels, and Save Image writes the file. Seeing these steps separately makes other ideas clear. Image-to-image, for example, is just starting from an encoded image and denoising it only partway. Graphs are saved as JSON and embedded in the images they produce, so results can be reproduced. ComfyUI also caches results and re-runs only the nodes whose inputs changed, so editing a prompt does not reload the model. Hardware is the main constraint. NVIDIA GPUs have the best support. Around 8 GB of VRAM is a commonly cited comfortable minimum for SDXL-class work, and larger image or video models benefit from 12 to 24 GB or more, although quantized models and memory offloading help. AMD, Intel and Apple Silicon can work with extra setup and lower speed, and CPU-only use is very slow. Custom nodes extend ComfyUI enormously, but each one is Python code that runs with your user account's permissions. There have been reported cases of malicious node packages stealing data. Install only well-known, actively maintained nodes, prefer .safetensors model files over pickle-based .ckpt files, and consider running ComfyUI in a separate environment or container.

现实世界的实施

A designer drags a PNG made by a colleague into ComfyUI, and the full workflow that created it loads automatically from the file's embedded metadata.

An illustrator builds a graph that generates a base image with SDXL, upscales it and runs a second low-denoise pass to add detail. The whole chain is saved as a reusable workflow.

A photographer adds a ControlNet node that follows the pose in a reference photo, keeping the composition fixed while changing the style.

A developer runs ComfyUI in API mode on a server and sends workflow JSON from a web app to generate product mockups on demand.

The Future of ComfyUI and Node-Based Image Workflows

ComfyUI has moved from a hobbyist tool toward a general runtime for open generative models, with a desktop app and growing support for video and 3D. Security around custom nodes is likely to remain a concern, and more signing, review or sandboxing of extensions would help. Node graphs can intimidate beginners, so work on simplified front ends and templates that hide the graph until it is needed will likely continue. Hardware requirements will keep following model sizes, while quantization and memory techniques keep expanding what runs on consumer GPUs.

付诸实践

为什么这很重要

  • 构建选择. 应用级设计决定了人工智能是否能改善实际结果。
  • 团队与工作流程. 良好的工作流程集成可以创造用户值得信赖的生产力收益。
  • 风险与安全. 范围明确的用例可以减少变更疲劳和实施风险。

留意

  • 将损坏的流程自动化可能会加剧现有问题。
  • 团队可能会过度自动化并消除所需的人工判断。
  • 如果不持续评估输出,质量可能会出现偏差。

后续步骤

  1. 绘制当前工作流程并确定摩擦最大的步骤。
  2. 在完全自动化之前定义人工检查点。
  3. 对用户进行提示、升级路径和质量标准方面的培训。
  4. 跟踪任务级结果以确认持续价值。

不断探索

免费通讯

获取每日AI简报

每个工作日早晨提供三条经过验证的AI故事,使用简明英文撰写。永久免费,无广告。

每个工作日发送一封邮件。一键退订。我们永不出售或分享您的地址。

测试一下自己

Take the ComfyUI and Node-Based Image Workflows quiz

每个答案即时反馈,课程通过后可获得可验证ID的可分享证书。

开始测验

支持免费AI教育。AI Understanding是一家501(c)(3)非营利组织——无广告,无付费墙,永不收费。 捐款

常见问题

What is ComfyUI and Node-Based Image Workflows?

ComfyUI is a free, open-source application for running image, video and audio generation models on your own computer. Each step of the pipeline, such as loading a model, encoding a prompt, sampling and decoding, is a node you connect in a visual graph. It matters because it shows exactly how diffusion works, makes complex workflows reproducible and shareable, and lets people run open models on their own hardware without a cloud service.

哪个节点在基本 ComfyUI 图中运行去噪循环?

KSampler runs the iterative denoising using the seed, steps, CFG scale, sampler and scheduler.

Load Checkpoint 输出哪三个组成部分?

A checkpoint bundles the denoising model, the text encoder that turns prompts into conditioning, and the VAE that converts between latents and pixels.

如何恢复制作 ComfyUI 图像的工作流程?

ComfyUI saves the workflow JSON inside the images it produces, so loading the image rebuilds the graph.

为什么仅更改提示而不重新加载模型?

The executor checks a cache keyed on each node's inputs. Load Checkpoint's inputs have not changed, so it is skipped.

自定义节点的主要安全风险是什么?

A custom node can do anything your account can do, which is why there have been reported cases of malicious packages stealing data.