Skip to content

feat: Add Ideogram 4 Prompt Builder KJ V2 (Freehand drawing & Canvas tools) - #668

Open
Pluventi wants to merge 12 commits into
kijai:mainfrom
Pluventi:main
Open

feat: Add Ideogram 4 Prompt Builder KJ V2 (Freehand drawing & Canvas tools)#668
Pluventi wants to merge 12 commits into
kijai:mainfrom
Pluventi:main

Conversation

@Pluventi

Copy link
Copy Markdown

Hey everyone,

I wanted to share a tool I've been working on for the past few days. I use the Ideogram 4 Prompt Builder node (part of the KJNodes pack) a lot, but I found it quite limiting to only be able to draw rectangles to define regions.

Since I don't know how to code, I put Claude Fable 5 on the job. To be completely honest, the AI wrote 100% of the code. On my end, I just took on the role of the tester—giving constant feedback, hunting down bugs, and asking it to add features along the way.

The result is called Ideogram 4 Prompt Builder KJ V2. Just to be clear, this is an unofficial custom version made by myself, not an official release from the author. It works as a "drop-in replacement", meaning it keeps the exact same inputs and outputs as the original node so it won't break your existing workflows, but the interface is completely different.

Here is what Claude managed to code:

Freehand drawing: You can now use a brush, lines, ellipses, or polylines (click to close the shape like in Paint). Each drawn shape automatically generates its own bounding box.

Bucket fill: Easily fill open or closed shapes, with one color per region (the background cannot be filled).

Layer management: Each drawn region becomes an independent layer. They don't merge with each other, even if you draw on top of another one.

Editing tools: An edit mode to redraw on an existing area, complete with an eraser, eyedropper, and undo/redo support.

Depth management (Z-order): You can reorder the layers (bring a region to the front) with automatic transparency so you can see what's hidden behind.

Side control panel: A complete list of regions to manage colors, write the dedicated prompt, temporarily hide a zone (excluding it from the final prompt), or delete it.

Background image: You can import a background image with an opacity slider to use as a tracing guide.

The node is fully functional and honestly really nice to use on a daily basis. That said, I want to be transparent: not everything is perfect. The GUI code could definitely use a good cleanup and quite a few optimizations by a real developer. I've actually opened a Pull Request on the KJNodes repository, hoping the author will review the code, polish it, and officially integrate it.

In the meantime, if you want to test it, I've put the node in a rar file. You just need to have KJNodes installed on your ComfyUI, drop this file where you usually put your node folders, typically ...ComfyUI\custom_nodes, and restart ComfyUI.

You can grab the file here: https://drive.google.com/file/d/1fhBbv36ZXpHDC2X2EN5kBjTFcYgKfR5h/view?usp=drive_link

Curious to get your feedback if you try it out, or if any of you want to take a look at the code to improve it!

@Pluventi

Copy link
Copy Markdown
Author

Sorry, I had to make a few adjustments, it's my first fork!

@Pluventi

Copy link
Copy Markdown
Author

Just to clarify, even though freehand drawing is supported, Ideogram v4 only processes rectangles. The freehand tool and all other features are purely meant to help you better visualize the scene.

@Pluventi

Copy link
Copy Markdown
Author

Update: I made some mistakes during the initial setup (my fork accidentally
reverted recent upstream changes in __init__.py and
web/js/ideogram4_prompt_builder.js). This is now fixed — the PR only adds
the two new V2 files, plus 2 registration lines in __init__.py. The original
node is untouched.

This is my first fork/PR, thanks for your patience! Built with Claude (Fable 5).

isam2024 pushed a commit to isam2024/ComfyUI-KJNodes that referenced this pull request Jun 12, 2026
… & canvas tools)

Restored PatchTritonVAE registration that the PR branch accidentally reverted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant