Nodes/ComfyUI_RP_Cast/RP Converter
ComfyUI Node

RP Converter

From a plain sentence to a regional prompt, courtesy of Ollama

By AISeDam·Created 4 months ago·Updated 4 months ago· 4
RP Converter
    • RP_prompt
    prompt
    style_prompt
    lora_directorymodels\loras
    lora_auto_applyfalse
    ollama_hosthttp://127.0.0.1:11434
    ollama_model(none - WD14 only)
    debugfalse

    What it is

    RP Converter is the pack's "give me a scene, I'll structure it" node. You type a natural-language description - "a cosplayer with silver hair at a convention, her friend beside her" - and it returns a full RP-structured prompt with ADDCOMM/ADDBASE/ADDCOL markers, ready to paste into RPPromptParser. It's the newest node in the pack (v0.6.00) and aimed squarely at people who find the marker syntax fiddly.

    How it works

    It calls a local Ollama LLM - gemma3:12b recommended, with llama3.2:3b or qwen3 also supported (qwen3 gets a /no_think directive). Before the model even sees your text, the node pre-splits the input at the COSPLAY/person keyword boundary in Python, which is why it biases toward person-centric scenes. The model gets a strict PART A / PART B system prompt, and the output is validated: a missing or duplicate ADDCOMM/ADDBASE triggers one retry. If Ollama output is still garbage, a WD14 tag-matching fallback rebuilds the structure locally. The LLM is unloaded from VRAM after the conversion (keep_alive=0), so it doesn't squat on your GPU - and honestly, it doesn't matter much which model you pick, since this is structured extraction rather than creativity. The 12B model is overkill but reliable.

    Inputs

    • prompt: your scene description.
    • style_prompt: keywords appended between ADDCOMM and ADDBASE after conversion.
    • lora_auto_apply: when ON, scans lora_directory and matches LoRA files whose filename keywords appear in the scene, appending <lora:name:1.0> tags plus trigger words to each COL section. Off by default.
    • lora_directory: LoRA folder path; empty = ComfyUI's default loras folder.
    • ollama_host: http://127.0.0.1:11434 by default - change it if Ollama runs elsewhere.
    • ollama_model: a dropdown populated at ComfyUI startup from your Ollama server. (none - WD14 only) is keyword-only mode with no LLM call.
    • debug: prints the conversion.

    Output

    RP_prompt (STRING) → straight into RPPromptParser's prompt widget.

    Install and gotchas

    Beyond the pack itself, two things are required: Ollama installed and running, and the model pulled:

    ollama pull gemma3:12b
    

    The model dropdown loads at ComfyUI startup - if it's empty, start Ollama (ollama serve) and restart ComfyUI; the node also retries at execute time. The WD14 fallback auto-downloads a small tag CSV into the pack's data folder on first use. No GPU needed for this node at all, which makes it a nice low-stakes introduction to the pack: install it, convert a sentence, and watch a valid regional prompt come out.

    CategoryRegional Prompter

    Inputs (7)

    NameTypeDefaultDescription
    promptSTRING
    style_promptSTRINGStyle keywords appended between ADDCOMM and ADDBASE. Applied after Ollama conversion.
    lora_directorySTRINGmodels\lorasLoRA folder path (relative to ComfyUI root or absolute). Leave empty to use ComfyUI default loras folder. Used when lora_auto_apply is ON.
    lora_auto_applyBOOLEANfalseON: Scan lora_directory and match LoRA files whose name keywords appear in the scene. Appends matched <lora:name:1.0> tags and trigger words to the converted RP prompt.
    ollama_hostSTRINGhttp://127.0.0.1:11434Ollama server URL. Default: http://127.0.0.1:11434. Change if Ollama runs on a different host or port.
    ollama_modelCOMBO(none - WD14 only)Select Ollama model. If list is empty: set correct ollama_host and run once to refresh. Select '(none - WD14 only)' for keyword-only mode.
    debugBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    RP_promptSTRING