Image Reconstruction Evolved: Harnessing the Power of FLUX and Inverse Sampling

CN
ComfyUI.org
2025-06-09 09:49:31

1. Workflow Overview

mbows0apyutujybkl5图片压缩effaea3406cc632335cbdf1bf537c3623573b29fdb321f59ad6776595ab2392b.jpg

This workflow leverages FLUX architecture and inverse sampling for high-precision image reconstruction, with features:

  • Inverse Sampling: Mathematically optimizes latent space to edit details while preserving structure.

  • FLUX Model Control: Dynamic noise scheduling and conditioning for controllable outputs.

  • Style Transfer & LoRA: Supports custom LoRAs (e.g., anthropomorphic cats) and CLIP text guidance.

  • Three-Stage Process: Initial Sampling → Inverse Sampling → Regeneration for complex edits.

2. Core Models

Model/Component

Function

Source

ZOZ_FantasyGlass

Base UNET model for artistic styles.

Download to models/unet.

CJ_CatMan LoRA

Adds anthropomorphic cat features.

Place in models/loras.

ae.sft VAE

Optimizes latent space decoding.

Download to models/vae.

T5-XXL + CLIP-L

Dual text encoders for better prompt understanding.

Load via DualCLIPLoader.

3. Key Nodes

Node Name

Function

Installation

FluxReverseODESampler

Core inverse sampling algorithm.

Install FLUX Suite.

InFluxModelSamplingPred

FLUX noise scheduler.

Same as above.

ImageResize+

Smart image resizing with aspect ratio.

Via ComfyUI Manager.

LibLibTranslate

Auto-translates prompts (CN↔EN).

Install LibLibAI Plugin.

4. Workflow Structure

  1. Initial Sampling

    • Input: Original image → ImageResize+ to 1024x1024.

    • VAEEncode converts image to latent space.

    • BasicScheduler sets initial noise (28 steps, simple mode).

  2. Inverse Sampling

    • FluxReverseODESampler reconstructs latents (eta=0.84, higher = more original).

    • FluxDeGuidance adjusts style strength (default 3.5).

  3. Regeneration

    • FluxForwardODESampler generates new image.

    • LoRA Loader injects custom features (e.g., cat anthropomorphism).

    • VAEDecode saves final output.

5. Input & Output

  • Input Parameters:

    • Image: Upload any image (e.g., animal photo), auto-resized to 1024x1024.

    • Prompts: Use LibLibTranslate (e.g., "老虎" → "tiger").

    • Inverse Sampling: eta (0~1, similarity to original), steps (default 28).

  • Output: One 1024x1024 edited image (PNG).

6. Notes

  • Hardware: Minimum 16GB VRAM (inverse sampling is VRAM-intensive).

  • Tuning Tips:

    • eta: Near 1 preserves original, near 0 enables creativity.

    • FluxDeGuidance: >3 for strong style transfer, <2 for prompt-driven results.

  • Troubleshooting:

    • VRAM errors: Reduce steps or switch to fp16 precision.

    • Sampling fails: Ensure input resolution is divisible by 2 (e.g., 512x512).