Sign In

[BSS] - Foveated Latent Sampling

12

[BSS] - Foveated Latent Sampling

Hi everyone! I want to share a sneak peek into the major research I've been conducting lately, which has led to a completely new and unique approach to detailing images in ComfyUI.

🧐 The Problem: Sharpness Is Not Quality

We all know the standard problem: AI models often allocate processing power equally to blurry backgrounds and crucial focal points. When the geometry of an object (like an eye or a hand) is slightly off, simply making it sharper only produces a "sharpened bad image." The result is a smooth, plastic look that lacks texture and contrast where it matters most.

🧠 FLS: The Core Concept (A Two-Phase Solution)

My custom method, FLS (Foveated Latent Sampling), solves this by making the sampler dynamically focus its computational resources. It's like giving the AI a smart surgical microscope.

1. The Foveal Mask (Intelligent Focus)

FLS first monitors the image's development step-by-step to identify areas that are most active or complex (high entropy). This creates the Foveal Mask—a heatmap of the areas the AI is currently "thinking" about.

image.png

is nothing clear yet? Read on

  • Statistical Normalization: The mask uses a statistical method (based on mean and standard deviation) to ensure all complex areas—from fine hair details to strong armor edges—receive attention simultaneously, preventing a single bright spot from hijacking the focus.

  • Temporal Inertia: The mask has "memory." It uses Inertia (set to 0.85 in my best tests) to prevent flickering and maintain a stable focus on the object, even if random noise momentarily disrupts the image's stability.

2. The Intervention (Dual Injection)

Once the Foveal Mask is created, FLS applies a targeted correction only where the mask is active. This intervention consists of two distinct components, blending detail and contrast:

8743479e-b69e-4d5a-9f4c-0e76a61a7fb5.png

The Formula

The FLS Sampler effectively modifies the noisy latent x for the next step based on the mask M:

f8cd1cc1-8f9f-497d-905d-753ed0e9db88.png

This combination ensures we get the best of both worlds: the texture of a stochastic sampler and the definition of a contrast boost, applied only to the most critical areas.

Workflow:

57b389c3-dc4d-4e97-8656-82c3d32a71cb.png

🧪 Results: Proof of Concept

I've been using the following optimal settings in my testing:

  • Fovea Strength: 5.0 (Texture Injection)

  • Sharpness: 2.0 (Contrast Boost)

  • Mask Inertia: 0.85 (Mask Stability)

Mask.jpg

Mask:

Mask2.jpg

And more examples:

FLS1.jpgFLS2.jpgFLS3.jpgFLS4.jpg

5d6d642b-7b51-4b8d-a9ff-df2763fd6747.jpg

As you can see in the screenshots attached, the FLS method successfully enhances texture and definition in focus areas. I will be sharing the final code and more detailed breakdown soon, but for now, take a look at the level of detail we can now achieve during generation.

This is a revolutionary way to generate details, and I'm excited to refine this concept further! Stay tuned for more updates on FLS.

All the examples are created using my new Equinox V3 model

Reactions ❤️ and support on Boosty 💕 help me keep pushing forward

12