facok GitHub avatar

comfyui-krea2-controlnet

facok

ComfyUI Krea2 Control 是一个插件,为 Krea2 Control LoRA 推理添加原生风格节点,通过 VAE 编码的控制潜变量实现条件控制,同时保留原始 Krea2 扩散路径。

Stars

146

7 天增长

暂无数据

Fork 数

9

开放 Issue

6

开源协议

暂无数据

最近更新

2026-07-04

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

该插件在不破坏现有功能的前提下将控制 LoRA 支持集成到 ComfyUI 的原生 Krea2 工作流中,使用实时模块权重形状兼容量化模型,并提供灵活的图像预处理选项。

适合谁使用

  • 想要控制 Krea2 生成的 ComfyUI 用户
  • 尝试深度/姿态/边缘控制的 AI 艺术家和研究者
  • 构建自定义 Krea2 控制 LoRA 工作流的开发者
  • 使用量化/GGUF 模型并需要 LoRA 兼容性的用户

典型使用场景

  • 从 Depth Anything 输出向 Krea2 生成施加深度控制
  • 为 Krea2 图像添加姿态、边缘或线稿条件
  • 批量处理控制图像以用于视频帧或独立样本
  • 在不离开 ComfyUI 标准节点图的情况下集成控制

项目优势

  • 保留 ComfyUI 内置的 Krea2 推理和常规 LoRA 补丁
  • 通过 ModelPatcher 应用块 LoRA 权重,支持卸载和低 VRAM
  • 实时模块权重形状读取提高了与量化加载器的兼容性
  • 轻量级图像选项(灰度、归一化、反转、批处理模式),无需繁重预处理器

使用前须知

  • 控制类型仅由 LoRA 检查点决定,无法自动检测
  • 需要显式附加控制潜变量;省略会导致采样失败
  • 不包含预处理器;控制图像需外部准备

README 快速开始

ComfyUI Krea2 Control

Chinese documentation: README_zh.md

Native-style ComfyUI nodes for Krea2 Control LoRA inference. The plugin keeps ComfyUI's built-in Krea2 inference path intact, uses the expanded input projection from the LoRA checkpoint during sampling, and injects a VAE-encoded control latent.

Nodes

  • Krea2 Control LoRA Loader: loads a Krea2 Control LoRA from models/loras, applies compatible block LoRA weights to the Krea2 model, prepares the expanded input projection, and registers the sampling wrapper.
  • Krea2 Control Image Encode: encodes any control IMAGE with the supplied Krea2/Qwen VAE. It can consume outputs from comfyui_controlnet_aux preprocessors such as Depth Anything, Canny, OpenPose, lineart, and normal maps, but it does not import or call comfyui_controlnet_aux.
  • Krea2 Control Apply: converts the encoded control latent into the Krea2 latent space and attaches it to the model after the Control LoRA has been loaded.

Basic Workflow

  1. Prepare a control image with normal ComfyUI nodes, or connect a comfyui_controlnet_aux preprocessor output.
  2. Encode that control image with Krea2 Control Image Encode using the Krea2/Qwen image VAE. Keep the default match_latent_size and connect the sampler latent to this node's latent input.
  3. Load the Krea2 Control LoRA with Krea2 Control LoRA Loader.
  4. Attach the encoded latent with Krea2 Control Apply.
  5. Send the resulting model to your sampler.

Krea2 Control Apply is required after the loader. If the Control LoRA is loaded without an attached control latent, sampling fails instead of silently running a partially patched model.

Block LoRA weights are applied through ComfyUI's ModelPatcher so normal model loading, offload, and low-VRAM behavior still apply. During the Krea2 diffusion forward call, image tokens still pass through the native first projection so regular LoRA patches on the base model remain active; the Control LoRA contributes only the control-token half of the expanded projection. The temporary projection state is restored immediately afterwards, so removing the node does not leave the base Krea2 path patched.

LoRA block matching reads the live module weight shapes instead of relying only on state_dict() s

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

lopopolo
精选
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI 与机器学习AI 智能体
2,390
slvDev
精选
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI 与机器学习大语言模型
1,960
littledivy
精选
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI 与机器学习
1,482