ComfyUI Node

SB Prompt Filter

Strip the keywords that fight your LoRA style or ControlNet — via Claude

By creativeself-kim·Created 10 months ago·Updated 6 months ago· 1
SB Prompt Filter
    • filtered_prompt
    prompt
    filter_mode
    style_type
    controlnet_type
    api_key

    Here's a class of bug that eats hours: you build a storyboard prompt, add a "photorealistic, 8k uhd" LoRA trigger, and the result looks nothing like the style LoRA you loaded - because the photorealism keywords are overriding it. SBPromptFilter exists to remove that conflict before it reaches the sampler. It takes a list of prompts and uses the Claude API to surgically strip the keywords that fight either a chosen LoRA style or a ControlNet type, then hands back a cleaned, coherent list.

    How it works

    Two filter modes, both driven by Claude (model claude-haiku-4-5). In style mode it removes photorealistic vocabulary - "photorealistic, DSLR, RAW photo, 8k uhd" and the like - and transforms color/lighting language into the target style's idiom (ink sketch strips colors to high-contrast linework; ink-wash keeps muted tones, converts "golden hour" to "low angle dramatic lighting"). It also prepends the style's defining keywords to each prompt. In controlnet mode it does the opposite direction: it removes the spatial/composition keywords that ControlNet will handle anyway - camera angles, shot framing, "rule of thirds," pose descriptions - so the prompt stops fighting the controlnet and focuses on subject detail. The rule sets are hardcoded per preset; the API does the actual rewriting and re-emits prompts separated by a marker, which the node parses back into a list.

    The graceful-degradation behavior matters: no API key, a missing anthropic package, or an API error all return your original prompts unchanged rather than crashing. The node's opinion is "better unfiltered than broken."

    The inputs

    • prompt (STRING, list) - the prompts to filter.
    • filter_mode - style or controlnet.
    • style_type - inksketch / ink-wash / pen-ink-illustration / ink-watercolor / watercolor-illustration.
    • controlnet_type - pose / depth / canny.
    • api_key (STRING) - your Anthropic key.
    • filtered_prompt (STRING list) - the output.

    What to watch

    You need pip install anthropic and a real API key, or it's a no-op. That makes it the one node in this pack with a paid dependency - budget for it if you use it in volume. And because an LLM is doing the rewriting, prompts aren't modified in a deterministic way: same input, slightly different output across runs. For storyboard batch work that's usually fine (the goal is style consistency, not byte-identical output), but don't use it where you need reproducibility. If the output count ever mismatches the input count, it silently returns the originals - which is safer than dropping a scene, but means you should glance at the results.

    Install

    Part of the IXIWORKS pack - ComfyUI Manager → search ComfyUI-VideoDescription, restart, or clone into custom_nodes/. Then pip install anthropic for the API calls.

    CategoryIXIWORKS/StoryBoard

    Inputs (5)

    NameTypeDefaultDescription
    promptSTRING
    filter_modeCOMBO2 options: style, controlnet
    style_typeCOMBO5 options: inksketch, ink-wash, pen-ink-illustration, ink-watercolor, watercolor-illustration
    controlnet_typeCOMBO3 options: pose, depth, canny
    api_keySTRING

    Outputs (1)

    NameTypeDescription
    filtered_promptSTRING