Unlock the Power of One-Click Multi-Style Image Generation

CN
ComfyUI.org
2025-05-26 15:06:49

1. Workflow Overview

mb57zg6d26m61xfjpose5886bbf406c340c8034bab70adfa33a1b5065a3775b4510d6343920663431db.png

This workflow enables one-click multi-style image generation with:

  • 80s book illustration

  • Pixel art

  • B&W line drawing

  • Master photography

Key Features:

  • Batch prompt management via CR Prompt List

  • Auto-generation of 4 styles using forLoop

  • Dual-model system (AWPainting + Flux)

2. Components Breakdown

Core Nodes:

  1. Style Switcher

    • easy anythingIndexSwitch: Style prompt selector

    • Text String: Preset style descriptions

  2. Dual-Model Architecture

    • AWPainting_v1.3: Main artistic model

    • Flux.1: Detail enhancement

  3. Advanced Sampling

    • SamplerCustomAdvanced: Custom noise/guidance

    • BasicScheduler: Optimized 20-step sampling

Dependencies:

  • Required plugins:

    git clone https://github.com/rgthree/rgthree-comfy
    git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack

3. Workflow Structure

Processing Paths:

  1. Basic Path (Quick):
    AWPaintingKSampler → Direct output

  2. Advanced Path (Precise):
    FluxFluxGuidanceConditioningConcat → Multi-style output

Loop Logic:(Python)

for i in range(4):  # Iterate 4 styles
    style = switch_style(i)
    generate_image(style)

4. Inputs & Outputs

Input Parameters:

  • Required: Base prompt (e.g. "beautiful scenery")

  • Optional:

    • Resolution (default 1024x1024)

    • Style weight (via FluxGuidance)

Outputs:

  • 4 styled images (PNG)

  • Auto-saved to ComfyUI/output

  • Metadata records style parameters

5. Notes

  • Hardware:

    • VRAM: ≥8GB (for 1024x1024)

    • Recommended: Run with --highvram

  • Troubleshooting:(Python)

    # Error: CLIP text encode failed
    Fix: Check for special chars (like <>) in prompts
    
    # Error: VRAM overload
    Fix: Reduce resolution or use `--medvram`
  • Extensions:

    1. Add LoraLoader for style LoRAs

    2. Use ImageUpscaleWithModel for higher resolution

Pro Tip: For anime styles, replace AWPainting with RevAnimated and set CFG=7.0.