ComfyUI-BISIDI-FinalPromptCleaner
Custom ComfyUI node for cleaning raw Qwen Thinking VLM output before it is sent into image-generation prompt conditioning.
ComfyUI BISIDI Final Prompt Cleaner
Custom ComfyUI node for cleaning raw Qwen Thinking VLM output before it is sent into image-generation prompt conditioning.
The node was built for BISIDI CAD/BIM screenshot-to-render workflows, but it is generic enough for any workflow where a thinking VLM may return reasoning text before the final edit prompt.
Node
AILab_BISIDI_FinalPromptCleaner
Inputs:
text: raw VLM text, usually Qwen Thinking output.fallback_prompt: safe fallback prompt used when the VLM output is empty, too short, or contains visible reasoning.
Output:
FINAL_PROMPT: cleaned prompt string.
What It Does
- Removes visible
<think>reasoning. - Extracts text inside
<FINAL_PROMPT>...</FINAL_PROMPT>. - Removes prompt tags before sending text downstream.
- Falls back to a production prompt if extraction is unsafe.
- Normalizes duplicated edit prefixes.
- Ensures the final prompt has architectural render intent.
- Trims very long prompts.
Install
Clone into ComfyUI custom nodes:
cd /home/ubuntu/ComfyUI/custom_nodes
git clone https://github.com/sibidicto/ComfyUI-BISIDI-FinalPromptCleaner.git
Restart ComfyUI.
The node should appear under:
AILab/QwenVL
Workflow Usage
Recommended chain:
Qwen Thinking VLM -> ShowText -> AILab_BISIDI_FinalPromptCleaner -> ShowText -> CLIPTextEncode
For BISIDI production workflows, Qwen is instructed to output:
<FINAL_PROMPT>Edit the provided CAD/BIM viewport screenshot into ...</FINAL_PROMPT>
This node makes the workflow robust when Qwen still emits reasoning text before that final block.
Notes
This repository contains only the custom node source. It does not include BISIDI LoRA .safetensors files or production workflow JSONs.