I do not know how to code. I created this project with the help of AI, then tested and refined it through many real ComfyUI generations. Bugs may still exist, so detailed feedback is welcome.
YAML Prompt Studio for ComfyUI:
YAML Prompt Studio is a custom ComfyUI node that builds a complete prompt from separate YAML libraries. It is designed for users who generate many character variations and want to manage their prompts without rewriting everything manually.
What it controls:
The main node can select and combine:
- checkpoint and model-specific text encoder.
- positive and negative global prompts.
- character and main outfit.
- pose and background.
- outfit or cosplay.
- style and expression.
- transformation or alternate physique.
- partner when the selected pose contains the exact `1boy` tag.
- tattoo.
- LoRAs written directly inside any positive prompt source.
Each component can be enabled or disabled independently. Entries may be selected manually, randomly, from one category only, or through compatibility rules based on YAML tags.
Main functions:
- Color-coded control interface.
- Random, weighted, compatible-random and category-random selection.
- Compatibility rules between characters, poses, backgrounds and outfits.
- Prompt conflict removal through `Overrides.yaml`.
- Checkpoint-specific CLIP and prompts through `ModelSettings.yaml`.
- Adjustable probabilities for main outfits, styles, transformations, tattoos and nudity.
- Favorites, reusable profiles and anti-repetition history.
- `Re-use` buttons in the generation diagnostic.
- Final positive and negative prompts separated by source.
- Automatic refresh of YAML files, checkpoints, LoRAs and text encoders.
- Integrated YAML editor with validation and automatic backups.
- Complete library verification and pre-generation diagnostic.
- Restoration of node settings from PNG metadata.
- Generation history containing the last 200 configurations.
- Face Count Guard and Image Health Guard for long unattended batches.
The Image Health Guard can stop a workflow before saving when an image is black, blank, non-finite or otherwise invalid. The Face Count Guard can report when the detected number of faces does not match the number expected from the selected pose and partner settings.
Requirements:
For YAML Prompt Studio itself:
- ComfyUI.
- Python dependency listed in "requirements.txt".
For the included example workflow:
- ComfyUI Impact Pack.
- a WAI-ANIMA checkpoint.
- the matching text encoder and VAE.
- "RealESRGAN_x4plus_anime_6B.pth" or another compatible upscale model.
- face and hand detector models used by Impact Pack.
The example workflow currently references:
- waiANIMA_v10Base10.safetensors
- qwen_3_06b_base.safetensors
- qwen_image_vae.safetensors
- RealESRGAN_x4plus_anime_6B.pth
- bbox/face_yolov8m.pt
- bbox/hand_yolov8s.pt
Change these filenames in the workflow or "ModelSettings.yaml" if your installed files use different names.
Compatible extensions:
YAML Prompt Studio has been specifically adapted and tested with:
- ComfyUI-EX-TagComplete. (jupo-ai/comfy-ex-tagcomplete)
tag autocomplete works inside the positive and negative prompt fields embedded in the YAML Prompt Studio interface.- ComfyUI-Lora-Manager. (willmiao/ComfyUI-Lora-Manager)
the "LoRA Manager → positive prompt" button can add a selected LoRA on a new line. Trigger words are added at the same time when LoRA Manager provides them.- ComfyUI Impact Pack. (ltdrdata/ComfyUI-Impact-Pack)
used by the included example workflow for FaceDetailer, face and hand detectors, and face-count analysis.
ComfyUI-EX-TagComplete and ComfyUI-Lora-Manager are optional. ComfyUI Impact Pack is only required when using the included example workflow or its detector/detailer section.
Installation:
1. Close ComfyUI.
2. Extract "ComfyUI-YAML-Prompt-Studio" into "ComfyUI/custom_nodes/".
3. Install the dependency:
```bash
pip install -r ComfyUI/custom_nodes/ComfyUI-YAML-Prompt-Studio/requirements.txt
```4. Restart ComfyUI.
5. Hard-refresh the browser with `Ctrl+F5`.
6. Load `YAML-Prompt-Studio-Example-Workflow.json` or add `YAML Prompt Studio` from the node menu.

