Nodes/Neo Nodes/Neo Image Gen & Edit
ComfyUI Node

Neo Image Gen & Edit

What Neo Image Gen & Edit Actually Runs

By neoneo-ai·Created 3 months ago·Updated about 11 hours ago· 4
Neo Image Gen & Edit
  • refs
  • model
  • images
◄skillKrea2文生图►
◄prompt►
◄seed0►
◄count1►
◄width-1►
◄height-1►
◄steps-1►
◄bundle—►

The first thing to understand about NeoImageGenEdit is that it isn't a KSampler with a nicer face. It's a template runner. You pick a skill, the node loads that skill's workflow.json, executes that whole graph inside its own execute call, and hands you back an IMAGE tensor. Nothing is written to your output folder, nothing is bookmarked, and you never see the sampler.

That's a strange design until you look at how people prompt in 2026: the working answer to "keep the same character" is to feed reference images to an instruction-edit model - Qwen Image Edit's line replaced masks, adapters and ControlNet for posing, and Krea 2's 12B DiT became the base people build on. A node whose whole interface is prompt plus reference images in, pictures out is the right size for that. Text-to-image with nothing wired to the refs; reference/edit mode the moment you hang one, where the first image is the edit target.

How it works

A skill in this pack is not a prompt preset. It's a folder with a model config, default parameters, and an API-format workflow.json template with placeholders like {{PROMPT}}, {{SEED}}, {{STEPS}}, {{REF_IMAGE_n}}.

The node renders that template into a prompt graph and then runs it with what the source calls a mini-executor: topological order (Kahn, cycles rejected), each node's forward called directly - including V3 io.ComfyNode classes - with SaveImage, PreviewImage and SaveVideo skipped so nothing touches disk. The terminal IMAGE output comes back as a tensor. Missing or asynchronous nodes raise a clear error instead of degrading silently, which matters when the thing you're debugging is somebody else's template.

The inputs that matter

  • skill_id - a dropdown of every skill carrying gen_image: true and a workflow.json. The default is Krea2文生图; the pack is Chinese-first, so expect Chinese names in the list.
  • refs - an autogrow stack (image_1 … image_10), min zero. Empty means text-to-image. How many are genuinely used depends on the template's {{REF_IMAGE_n}} slots: Krea2's single-slot template takes the first one only, and says so. Qwen Image 2.1 edit is the multi-image path, first image as the edit target.
  • prompt - a plain string, wireable from any text node.
  • seed, count (1–8), width/height (-1 = derive from the skill's ratio), steps (-1 = the skill config, default 20). All four auto-fill from the selected skill's presets when you switch skills.
  • bundle - optional string input, rendered as a wire-only slot. Feed it a Neo Prompt Agent BUNDLE and it supplies prompt and references; the skill always comes from the node, never the bundle.
  • model - optional MODEL. Hand it a quantized or distilled model and the node prunes the pure-model chain upstream of the sampler (UNETLoader, LoRAs - only along the model edge) and injects yours at the sampler's model source. Text encoder and VAE stay shared, so you can test a different checkpoint without editing the skill.

One output: images.

Install

ComfyUI Manager, search Neo Nodes (it's on the ComfyUI Registry), or:

cd ComfyUI/custom_nodes
git clone https://github.com/neoneo-ai/ComfyUI-Neo-Nodes.git

Restart. requirements.txt installs openai, Pillow, PyYAML and pypinyin - note that the README's dependency list is out of date and mentions requests, which the shipped file doesn't. llama_cpp_python is optional, for the local-GGUF prompt tools only.

Then the models. Skills resolve their diffusion model, text encoder and VAE automatically by name; if nothing matches your install, set them explicitly in the pack's generation settings. The node's status bar cross-checks the chosen skill's template against /object_info and /models and tells you which models or nodes are missing, with a button into the skill detail dialog. It needs a GPU and it blocks the main workflow while sampling - that's the cost of running a graph inside a node.

Where people get burned

Stale skill list. The dropdown is built at /object_info time, so a skill you just added or renamed won't appear until ComfyUI refreshes it. Restart, or refresh object_info.

Widget shift on old workflows. width and height were added to the node after it shipped, and seed is followed by ComfyUI's control_after_generate dropdown. Load an older workflow and a stray number can land in that dropdown slot; the frontend resets the mode, count and the dimensions from the skill preset on configure, so numbers that look wrong after loading a friend's file aren't a maths bug.

Losing a seed you liked. control_after_generate fires after the run, so the number in the box is the next seed, not the one that made the picture. Flip ComfyUI's global widget control mode to Before once and you'll never chase a good seed again.

One unrelated courtesy: if you already have comfyui-krea2edit installed, the pack detects it and skips registering its own vendored copy of those nodes rather than throwing duplicate-registration warnings at you. Small thing. Appreciated.

CategoryNeo-Nodes

Inputs (10)

NameTypeDefaultDescription
skillCOMBOKrea2文生图选哪个生图/编辑技能:决定内部 workflow.json 模板与默认模型链。
promptSTRING提示词;为空且接了 BUNDLE 时用 bundle 里的第一条。
refsCOMFY_AUTOGROW_V3参考图:不挂 = 文生图;挂上 = 参考/编辑模式(如 Qwen Image 2.1 编辑,第 1 张是编辑目标)。
seedINT00–9223372036854776000—
countINT11–8—
widthINT-1-1–16384-1 = 用 skill/preset 的比例算尺寸
heightINT-1-1–16384-1 = 用 skill/preset 的比例算尺寸
stepsINT-1-1–100-1 = 用 skill config.json 的 steps(缺省 20)
bundleoptSTRINGNeoPromptAgent / NeoRefGrid 的 BUNDLE 输出:提供时其参考图覆盖节点上挂的 refs。
modeloptMODEL外部加速模型;提供时覆盖内部主模型链(UNETLoader/LoRA 等)

Outputs (1)

NameTypeDescription
imagesIMAGE生成结果批次 [count,H,W,C],接 SaveImage / PreviewImage 或下游编辑节点。