Boost Texture and Skin Realism with ComfyUI's Cutting-Edge Workflow

CN
ComfyUI.org
2025-03-22 05:29:32

βœ… Workflow Overview

m8jrqeshjvjle9x7w6ec5b8976d658e1c3f8a7edec596006120b379097ce53a0a1d1d0447710acf6488.png

This workflow, titled "ComfyUI_Flux Model Texture Enhancement and Skin Realism", aims to enhance the texture and skin realism of model portraits using the Flux model and LoRA detail enhancement models.

Its main functionalities include:

  • βœ… Image loading and preprocessing

  • 🎯 Generating high-quality model images

  • πŸ› οΈ One-click background removal and mask processing

  • πŸ”₯ Comparing the original and enhanced images

  • πŸ’Ž Texture and detail enhancement

This workflow is particularly suited for tasks such as model photography, portrait enhancement, and scenarios requiring improved skin realism and overall texture quality.


πŸ”₯ Core Models

  1. Flux Base Model

    • Name: F.1εŸΊη‘€ζ¨‘εž‹_fp16

    • Function: This is the base model used for generating high-quality images with refined textures and realistic lighting.

    • Loading Method: Loaded via the UNETLoader node.

  2. LoRA Model

    • Name: AWPortrait CN_1.0

    • Function: A LoRA model designed for portrait enhancement and detail optimization.

    • Weight: 0.35

    • Loading Method: Loaded using the LoraLoader node.

  3. LoRA Texture Enhancement Model

    • Name: F.1ε’žεΌΊθ΄¨ζ„Ÿ_η»†θŠ‚δΌ˜εŒ–θ°ƒζ•΄_1.0

    • Function: Enhances the fine details and improves the skin texture and overall image sharpness.

    • Weight: 0.7

    • Loading Method: Loaded via LoraLoader.

  4. Inspyrenet Rembg Model

    • Function: Used for automatic background removal and mask generation.

    • Loading Method: Loaded using the InspyrenetRembg node.

    • Plugin Source: Requires the ComfyUI-Inspyrenet-Rembg plugin.


πŸ”§ Node Explanation

Here is a detailed explanation of the key nodes used in this workflow:

🌟 Base Model Loading

  • UNETLoader

    • Function: Loads the Flux base model.

    • Parameters:

      • Model name: F.1εŸΊη‘€ζ¨‘εž‹_fp16

    • Output: Model data, used for image generation.

  • VAELoader

    • Function: Loads the VAE (Variational Autoencoder) model for image decoding.

    • Parameters:

      • Model name: ae.sft

    • Output: VAE data, used in the decoding process.

🎯 Detail Enhancement Models

  • LoraLoader

    • Function: Loads LoRA models for portrait enhancement and texture refinement.

    • Parameters:

      • Model names:

        • AWPortrait CN_1.0 (weight: 0.35)

        • F.1ε’žεΌΊθ΄¨ζ„Ÿ_η»†θŠ‚δΌ˜εŒ–θ°ƒζ•΄_1.0 (weight: 0.7)

    • Output: Enhanced model data, used by the sampler.

πŸ”₯ Sampling and Generation

  • RandomNoise

    • Function: Generates random noise to initiate image generation.

    • Parameters:

      • Random seed: 790939886104846

  • BasicScheduler

    • Function: Controls the sampling process.

    • Parameters:

      • Scheduler type: normal

      • Steps: 30

      • Strength: 0.4

  • KSamplerSelect

    • Function: Selects the sampling algorithm.

    • Parameters:

      • Sampler type: euler

  • SamplerCustomAdvanced

    • Function: Performs custom advanced sampling to generate the latent image.

    • Inputs:

      • Noise, guider, sampler, sigmas

    • Output:

      • Latent image

      • Denoised latent image

πŸ› οΈ Image Processing

  • InspyrenetRembg

    • Function: Performs background removal and mask generation.

    • Output:

      • Foreground image

      • Mask data

  • InvertMask

    • Function: Inverts the mask.

    • Output:

      • Inverted mask

  • MaskToImage

    • Function: Converts the mask into an image.

  • Image Comparer

    • Function: Compares the original image with the enhanced version.

    • Mode: Side-by-side comparison with a slider.

πŸ–ΌοΈ Preview and Output

  • PreviewImage

    • Function: Displays the generated images, including:

      • The enhanced image

      • The background-removed image

      • The mask image


πŸ” Workflow Structure

The workflow is divided into several Groups, each serving a specific function:

  1. βœ… Flux Base Model

    • Location: Top left

    • Function: Loads the base model (UNET, VAE).

    • Input: Model paths

    • Output: Model data for generation.

  2. 🎯 Image Loading

    • Location: Bottom left

    • Function: Loads the original image.

    • Input: Image file

    • Output: Image data for processing.

  3. πŸ”₯ Batch Processing

    • Location: Middle section

    • Function: Processes the latent images in batches.

    • Input: Latent image

    • Output: Batch-processed latent images.

  4. πŸ› οΈ Keyword Input

  • Location: Middle left

  • Function: Encodes the text prompts using CLIP.

  • Input:

  • Positive prompt:

    miluo_zg, A beautiful Asian woman, fair-skinned, wearing a white t-shirt, and jeans

  • Negative prompt:

  • miluo_zg, Glamour Shot, hyperrealism, cinematic, High Resolution, Ultra HD Picture, Delicate, Clear

  • Output: Conditioning encoding for image generation.

  1. πŸ–ΌοΈ One-Click Background Removal

    • Location: Top right

    • Function: Performs background removal.

    • Input: Image data

    • Output: Foreground image and mask data.


πŸ”‘ Inputs & Outputs

Input Parameters:

  • Image file (e.g., model photo)

  • Text prompts (positive and negative)

  • Flux model and LoRA models

  • Random seed: 790939886104846

Output:

  • Enhanced image

  • Background-removed image

  • Mask image

  • Comparison image (original vs enhanced)


⚠️ Tips & Considerations

  • βœ… Model Dependencies:

    • This workflow relies on the ComfyUI-Inspyrenet-Rembg plugin and multiple LoRA models. Ensure they are installed.

  • ⚑ Performance Requirements:

    • A NVIDIA GPU with at least 12GB VRAM is recommended for smooth performance.

    • Large images consume more VRAM.

  • ⚠️ Output Variations:

    • Different random seeds produce different image results.

    • Adjusting the LoRA weights fine-tunes the detail enhancement effects.

  • πŸ”₯ Optimization Tip:

    • If you encounter memory issues, reduce the image size or batch size to prevent OOM errors.

Share to