Files
EricRollei-Local_LLM_Prompt…/docs/UPDATE_NOTES.md
T

6.7 KiB

Version 1.1 Updates - Enhanced Prompt Expansion

Changes Made

1. Added Wan 2.2 Reference Document

File: WAN_GUIDE_REFERENCE.md

Complete distillation of the Wan 2.2 prompting guide including:

  • All aesthetic control elements (lighting, composition, camera, etc.)
  • Example transformations showing before/after
  • Best practices and common combinations
  • Available for your reference anytime

2. Dramatically Enhanced System Prompts

File: expansion_engine.py (completely rewritten)

Critical Output Rules Added:

1. Output ONLY the enhanced prompt - nothing else
2. Do NOT repeat or reference the user's input  
3. Do NOT include phrases like "Here is the expanded prompt:"
4. Do NOT use labels, explanations, or meta-commentary
5. Write as a single flowing paragraph

Multiple Examples Per Tier:

  • Basic Tier: 3 examples showing simple expansions
  • Enhanced Tier: 3 examples with details and aesthetics
  • Advanced Tier: 2 examples with full cinematography
  • Cinematic Tier: 2+ examples with complete director-level descriptions

Preset-Specific Examples:

  • Cinematic preset: Astronaut in space, boxer before fight
  • Noir preset: Detective in alley with full noir aesthetics
  • Action preset: Car chase with kinetic energy
  • Each example shows the full tier + preset combination

3. Improved Response Parsing

File: expansion_engine.py - parse_llm_response() method

Now aggressively removes:

  • Common LLM artifact phrases ("Here is...", "Expanded prompt:", etc.)
  • Echoed user input (detects and strips first line if it's the input)
  • Meta-commentary and labels
  • Multiple cleaning passes for stubborn LLMs

4. Cleaner User Prompts

File: expansion_engine.py - _build_user_prompt() method

Changed from:

"Expand this text-to-video prompt:\n\n[prompt]\n\nExpand to [tier] tier level..."

To:

"[prompt] | Required terms: [keywords if any]"

Simpler format = less chance LLM echoes it back.

Testing the Updates

Quick Test:

  1. Restart ComfyUI (to load the updated code)
  2. Try a simple prompt: "cat playing piano"
  3. Before: Might have included "Expand this text-to-video prompt: A cat playing piano..."
  4. After: Should start directly with "A fluffy orange tabby cat sits..."

What to Expect:

Input: "robot walking through city"

Old Style Output (what we're fixing):

Expand this text-to-video prompt: robot walking through city

Here is the enhanced prompt:

A sleek humanoid robot walks through a futuristic city at night...

New Style Output:

A sleek humanoid robot with polished chrome plating walks through a neon-lit futuristic city at night. The robot has glowing blue circuit patterns across its body and moves with precise mechanical grace. Towering skyscrapers with holographic advertisements surround it...

Clean, direct, ready to use!

Example Improvements by Tier

Basic Tier Example

Input: "woman in rain"

Output Now Includes:

  • Subject details: "young woman with long dark hair"
  • Scene: "wet city street during heavy rainstorm"
  • Action: "walks slowly... holding black umbrella"
  • Basic lighting: "soft glow from streetlights"
  • Shot info: "Medium shot, eye-level angle"

Enhanced Tier Example

Input: "chef cooking"

Output Now Includes:

  • Detailed subject: "professional chef in pristine white uniform"
  • Rich scene: "gleaming stainless steel counter in busy restaurant kitchen"
  • Motion quality: "expertly flips vegetables... flames leaping dramatically"
  • Aesthetics: "Medium close-up shot, practical lighting from overhead fixtures, warm colors"

Advanced Tier Example

Input: "samurai in bamboo forest"

Output Now Includes:

  • Full professional cinematography terms
  • Specific lighting: "side lighting creates edge lighting on silhouette"
  • Camera work: "camera slowly pushes in from medium shot to medium close-up"
  • Composition: "Centered composition with bamboo creating natural leading lines"
  • Color grading: "warm colors transitioning to cool shadows, desaturated tones"
  • Lens: "Medium lens"
  • Angle: "Low angle shot emphasizing imposing presence"

Cinematic Tier Example

Input: "astronaut floating in space"

Output Now Includes:

  • Complete subject description (suit details, wear, instruments)
  • Fully realized scene (Earth below, void of space, tether movement)
  • Choreographed motion (hand reaching, ice crystals, weightless drift)
  • Complete camera movement: "slow 180-degree arc shot, starting behind then rotating..."
  • Lighting setup: "Backlighting from sun creates rim light... Earth side lit by soft reflected light"
  • Technical reasoning for all choices
  • Emotional and atmospheric elements
  • Professional color grading specifics

What Each Preset Now Emphasizes

Cinematic

Examples focus on: Professional lighting setups, motivated camera movements, emotional beats

Noir

Examples focus on: High contrast, dramatic shadows, venetian blinds, practical lighting, desaturated colors

Action

Examples focus on: Kinetic energy, dynamic camera, motion blur, explosive moments

Surreal

Examples focus on: Dreamlike qualities, unusual elements, ethereal movement

Stylized

Examples focus on: Artistic interpretation, graphic elements, consistent visual identity

Random

Picks random elements from the guide for creative exploration

Files Modified

  1. ✅ expansion_engine.py - Complete rewrite with examples (23KB → was 14KB)
  2. ✅ WAN_GUIDE_REFERENCE.md - New comprehensive reference (4.3KB)

Files Unchanged

  • All other files remain the same
  • Node interface is identical
  • No breaking changes to workflows

How to Use

Just restart ComfyUI and use the node as before. The improvements are automatic:

  1. Better Instructions: LLM gets detailed examples for each tier
  2. Cleaner Output: Aggressive parsing removes echoed content
  3. Reference Available: Check WAN_GUIDE_REFERENCE.md anytime

Verification

To verify it's working:

  1. Look at the positive_prompt_1 output
  2. It should NOT contain "Expand this..." or "Here is..."
  3. It should start directly with the enhanced description
  4. Compare to your original input - should be dramatically expanded

Next Potential Improvements

Future enhancements could include:

  • Even more examples (currently 10+ examples across tiers)
  • Style-specific vocabulary emphasis
  • Better handling of technical keywords
  • Prompt analysis and suggestions
  • A/B comparison tools

Questions?

If outputs still include echoed content:

  1. Check which LLM model you're using (some follow instructions better)
  2. Try temperature 0.3-0.6 for more instruction-following
  3. Check the status output for any errors
  4. Look at WAN_GUIDE_REFERENCE.md to see what's being taught

Version 1.1 - Enhanced system prompts with examples and improved parsing