Unlock the Light Stroke Effect Workflow

CN
ComfyUI.org
2025-06-10 10:27:41

1. Workflow Overview

mbqdb5p0309obkj53rv图片压缩32596978-762427a6a57c1827719d91b29e9f3a386439eedd01981b3ebffa41f2b509d302.png

This workflow, named "万物光绘-光线-描边特效", is designed to add light painting and edge glow effects to input images, creating enhanced visuals with sci-fi aesthetics. Key features include:

  • Depth map generation via Depth Anything V2

  • Light painting effects powered by custom LoRAs

  • Tiled processing for high-resolution output

  • Final upscaling to HD quality

Core Models:

  • Stable Diffusion: Base image generation

  • Depth Anything V2: Depth estimation

  • 4x_NMKD-Siax_200k: Upscaling model

  • Custom LoRAs:

    • 阿容容_F.1 光绘描边 (weight=0.8)

    • 指鹿AI_蛇年_强质感 (weight=0.2)


2. Node Details

Key Nodes:

  1. DepthAnything_V2: Generates depth maps from input images

    • Install: Via ComfyUI Manager (search "Depth Anything")

    • Model: depth_anything_v2_vitl_fp32.safetensors (auto-downloaded)

  2. InstructPixToPixConditioning: Merges depth maps with text prompts

    • Input: Depth map + positive/negative prompts

    • Output: Conditioned latent data

  3. LoraLoaderModelOnly: Loads light-painting LoRAs

    • Path: models/loras/

    • Manual setup required for LoRA files

  4. TTP_Image_Tile_Batch & TTP_Image_Assy: Tile-based processing

    • Splits large images into patches for VRAM efficiency

    • Install: Requires Tiled Diffusion plugin (GitHub)

  5. FluxGuidance: Dynamic guidance scaling (guidance_scale=30)


3. Workflow Structure

Group 1: Input Control

  • Input: Source image (e.g., 北京央视大楼.jpg)

  • Process:

    • Depth map generation

    • Resize to 1024x1024

  • Output: Depth map + normalized image

Group 2: Text Prompts

  • Input:

    • Positive prompt (e.g., "Blue-gold light trails, sci-fi lines, 8K")

    • Negative prompt (e.g., "blurry, low quality")

  • Process: CLIP text encoding

Group 3: Sampling

  • Model: Base F.1_Depth-fp16 + LoRAs

  • Sampler: Euler, 30 steps, CFG=7.0

  • Output: Latent image with light effects

Group 4: Upscale & Refine

  • Input: Initial output

  • Process:

    • 4x upscaling (4x_NMKD-Siax)

    • Tiled processing for stability

  • Output: HD image (e.g., 1920x1920)


4. Inputs & Outputs

  • Inputs:

    • Image: Any size (recommended ≥512x512)

    • Prompts: Describe light effects (e.g., "glow, dynamic lines")

    • Seed: Optional fixed value (e.g., 316430325547060)

  • Output:

    • Path: ComfyUI/output/

    • Format: PNG (HD with light effects)


5. Notes

  1. VRAM: ≥12GB GPU (tiling reduces usage)

  2. Dependencies:

    • Verify LoRA and Depth Anything models are installed

  3. Troubleshooting:

    • Missing models: Check models/loras/ and models/depth_anything/

    • OOM errors: Reduce tile size (e.g., ≤1024x1024)

  4. Optimization:

    • Enable xformers

    • Lower FluxGuidance value if slow