gitwtfhub

wtf is comfyui-krea2-ostris-edit?

ostris/comfyui-krea2-ostris-edit — explained in plain English

Analysis updated 2026-05-18

199PythonAudience · developerComplexity · 3/5Setup · moderate

TL;DR

Custom ComfyUI nodes for running Krea 2 image editing LoRAs, letting the model use reference images as visual context during generation.

Mindmap

mindmap
  root((Krea2 Ostris Edit))
    What it does
      Adds ComfyUI nodes
      Runs Krea 2 edit LoRAs
      Uses reference images
    Tech stack
      Python
      ComfyUI
      Krea 2
      Qwen3-VL
    Use cases
      Edit images with prompts
      Encode reference images
      Cache reference tokens
    Audience
      ComfyUI users
      LoRA trainers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Run Krea 2 edit LoRAs inside ComfyUI to edit images using a text prompt plus reference images.

REASON 2

Encode multiple reference images alongside a text prompt using the Krea 2 Qwen3-VL text encoder.

REASON 3

Speed up repeated sampling by caching reference image tokens for kv_cache-trained LoRAs.

What's in the stack?

PythonComfyUIKrea 2Qwen3-VL

How it stacks up

ostris/comfyui-krea2-ostris-edithanyi0000/chatgpt-plus-automation-toolkitcvlab-kaist/gld
Stars199197196
LanguagePythonPythonPython
Setup difficultymoderatehardhard
Complexity3/54/55/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires an existing ComfyUI install plus a Krea 2 checkpoint with Qwen3-VL vision weights and a compatible edit LoRA.

Wtf does this do

This project adds a small set of custom nodes to ComfyUI, the visual pipeline tool many people use for running AI image generation and editing models. Specifically, it lets ComfyUI work with a family of image editing LoRAs built on the Krea 2 model, ones that were trained using the ai toolkit's edit mode. There are two nodes included. The first is a text encoder node that takes a text prompt along with up to three reference images, and turns them into the conditioning signal the model needs. It uses Krea 2's own text encoder, called Qwen3-VL, and lays out the prompt and images the same way they were arranged during training, with each image marked as Picture 1, Picture 2, and so on. If a VAE is connected, each reference image is also encoded into latent space so the model can use it as a visual reference rather than only reading it through text. Images are resized to match how the model was trained, shrunk to fit within roughly 384 by 384 pixels for the text encoder and up to about one megapixel for the reference latents, though they are never enlarged. The second node patches the Krea 2 model itself so that it actually pays attention to those reference latents, something the standard Krea 2 setup in ComfyUI does not do on its own. It adds the reference images into the model's token sequence and treats them as fixed context rather than something being denoised. An optional caching mode can speed things up by computing the reference tokens once and reusing them at every sampling step, but this only works correctly if the LoRA being used was itself trained with that same caching option turned on. Installation is a simple git clone into ComfyUI's custom_nodes folder, with no additional dependencies to install. The project is aimed at people already using ComfyUI for image generation who want to run Krea 2 edit LoRAs specifically, and it is used by wiring the new nodes into a graph alongside the standard model loader, LoRA loader, and sampler nodes.

Yoink these prompts

Prompt 1
Install ComfyUI-Krea2-Ostris-Edit and wire it into a ComfyUI graph with Load LoRA and KSampler nodes.
Prompt 2
Explain what the Krea 2 Ostris Edit Model Patch node does and why it's required.
Prompt 3
Help me set up the Text Encode Krea 2 Ostris Edit node with three reference images and a VAE.
Prompt 4
Show me how kv_cache works for Krea 2 edit LoRAs trained with ai-toolkit.

Frequently asked questions

wtf is comfyui-krea2-ostris-edit?

Custom ComfyUI nodes for running Krea 2 image editing LoRAs, letting the model use reference images as visual context during generation.

What language is comfyui-krea2-ostris-edit written in?

Mainly Python. The stack also includes Python, ComfyUI, Krea 2.

How hard is comfyui-krea2-ostris-edit to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is comfyui-krea2-ostris-edit for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.