ArchAi3D_Simple_Position_Prompt
Tell Qwen what goes in each red rectangle
- formatted_prompt
- system_prompt
Qwen-Edit and Qwen-Image don't do coordinates. Give them "put a bike at x=230, y=400" and they'll nod and ignore you. The trick the community converged on instead is the position guide: you draw numbered red rectangles on a copy of your image, show it to the model as a second input, and write your prompt as "rectangle 1 = ..." - the rectangles are the coordinates. This node writes that prompt for you, consistently, with the formatting Qwen actually expects.
It's from ComfyUI-ArchAi3d-Qwen, Amir Ferdos's pack. He's an architect turned ComfyUI developer, and this is his take on a workflow his Qwen encoder nodes are built around: prompt + numbered position guide image → precise object placement or removal without pixel coordinates.
How it works
You describe what goes in each rectangle, separated by slashes, and the node wraps each one in parentheses - the format Qwen was trained on. Slash order maps to rectangle number in order, so add a bicycle / add a man sitting on chair becomes:
(rectangle 1 = add a bicycle.)
(rectangle 2 = add a man sitting on chair.)
(Maintain all original elements in Image 1 unchanged.)
It works in two modes:
- add_objects - place new objects at the rectangle positions, keeping everything else.
- remove_objects - erase whatever's inside each rectangle and fill it with seamless background (extend the floor, wall, sky, whatever's there).
Each mode ships an optimized system prompt, because "remove the person and fill naturally" needs a very different instruction than "add a bicycle." The full system prompt for remove mode reads like a small spec sheet - it explicitly tells the model the red rectangles are invisible guides and not to draw them, which is exactly the failure mode people hit with this workflow.
Inputs
- operation_mode -
add_objectsorremove_objects. Start here; it changes the defaults everywhere. - object_descriptions - your objects,
/-separated, one per rectangle in order. This is the input that matters. - start_description / end_description - optional bookends. If you leave
end_descriptionempty it picks a smart default per mode (maintain-everything for add, seamless-fill for remove). - use_system_prompt -
yes/no;noreturns an empty system prompt if you'd rather supply your own.
Outputs: formatted_prompt (STRING) and system_prompt (STRING). Both feed your Qwen encoder's text inputs.
Installing
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen
pip install -r requirements.txt
Or ComfyUI Manager → "ArchAi3d Qwen". No model downloads for this node - it's pure text formatting. Pack is free for personal use; commercial work needs a license from the author.
Honest caveats
The node formats the prompt, but the placement quality is still up to the model - keep your subject centered and describe it concretely, and expect approximate positions rather than pixel-exact ones. Also, the rectangles come from a separate image you have to make (any editor with a rectangle tool works, or another node that draws boxes). This is a utility that saves you from hand-formatting a bracket-heavy prompt fifty times, not a magic bullet for perfect composition - but for interior-design "add this lamp over there, remove that chair" work, it's exactly the shape the community found works.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| operation_mode | COMBO | add_objects | Select the operation mode: - add_objects: Add new objects at rectangle positions - remove_objects: Remove objects at rectangle positions and fill with background |
| object_descriptions | STRING | Describe objects separated by / (slash). ADD mode: 'add a bicycle / add a man sitting on chair' REMOVE mode: 'remove the car / remove the person / remove the sign' Each description will be mapped to rectangle 1, 2, 3... in order. | |
| start_description | STRING | Optional description to add at the START (before rectangle mappings). Will be wrapped in parentheses. Leave empty if not needed. | |
| end_description | STRING | Description to add at the END (after rectangle mappings). Leave empty to use smart default based on operation mode: - ADD: 'Maintain all other elements and colors unchanged' - REMOVE: 'Fill removed areas naturally with seamless background' | |
| use_system_prompt | COMBO | yes | Include system prompt in output: - yes: Include optimized system prompt for selected mode - no: No system prompt (empty string) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| formatted_prompt | STRING | Formatted prompt with parentheses format |
| system_prompt | STRING | System prompt optimized for selected mode (empty if 'no' selected) |