Skip to content
FramesField
FIX 43 · VISUAL & 3D CRAFT
raw .md ↗ Verified Dec 1, 2026

Fix 4x-UltraSharp Oversharpened Halos and Waxy Artifacts

Direct Fix: Eliminate 4x-UltraSharp edge ringing and waxy skin by swapping portrait jobs to 4x_NMKD-Siax_200k or 4x-ClearRealityV1, downsampling 4x outputs 0.5x with Lanczos blended 72/28 against a clean Lanczos reference, and applying a low-denoise (0.20) tiled diffusion pass for 4K print heroes.
Exact Error / Visual Signature
Visual QC rejection at 100% zoom: Bright/dark 2–4px ringing halos along hair and high-contrast edges | Plastic smoothed skin patches | Repetitive synthetic crosshatch pore artifacts
OBSERVED SYMPTOM

You upscale a clean 1024px FLUX, Midjourney, or Wan 2.2 frame using 4x-UltraSharp.pth in ComfyUI, and instead of crisp print detail the 4096px output shows crunchy white edge halos around silhouettes, artificially sharp background bokeh, waxy smeared skin cheeks, and repetitive synthetic micro-texture.

TECHNICAL ROOT CAUSE

4x-UltraSharp is a feed-forward ESRGAN super-resolution network trained on degraded bicubic/JPEG pairs with aggressive perceptual edge-sharpening losses—having zero optical understanding of depth of field or skin physics, it amplifies diffusion VAE micro-noise into hard ringing halos and flattens subtle tonal gradients into plastic patches.

Copy-Paste Verified Fix

Stock-Node ComfyUI Anti-Halo Oversample Blend Graph + Subtle Film Grain Pass fix-upscale-halos-comfyui.sh
#!/usr/bin/env bash
set -euo pipefail

# 1. Write 100% stock-node ComfyUI API JSON (zero custom node packs required!)
# Combines 4x GAN oversample -> 0.5x Lanczos downsample with 28% clean 2x Lanczos blend-back.
# Swap MODEL_NAME to "4x_NMKD-Siax_200k.pth" or "4x-ClearRealityV1.pth" for human skin/portraits.
INPUT_IMG="${1:-input_plate.png}"
MODEL_NAME="${2:-4x-UltraSharp.pth}"
BLEND_FACTOR="${3:-0.72}"
COMFY_URL="${COMFY_URL:-http://127.0.0.1:8188}"

cat << JSONEOF > anti-halo-2x-upscale.api.json
{
  "1": {
    "class_type": "LoadImage",
    "inputs": {
      "image": "${INPUT_IMG}"
    }
  },
  "2": {
    "class_type": "UpscaleModelLoader",
    "inputs": {
      "model_name": "${MODEL_NAME}"
    }
  },
  "3": {
    "class_type": "ImageUpscaleWithModel",
    "inputs": {
      "upscale_model": ["2", 0],
      "image": ["1", 0]
    }
  },
  "4": {
    "class_type": "ImageScaleBy",
    "inputs": {
      "image": ["3", 0],
      "upscale_method": "lanczos",
      "scale_by": 0.5
    }
  },
  "5": {
    "class_type": "ImageScaleBy",
    "inputs": {
      "image": ["1", 0],
      "upscale_method": "lanczos",
      "scale_by": 2.0
    }
  },
  "6": {
    "class_type": "ImageBlend",
    "inputs": {
      "image1": ["5", 0],
      "image2": ["4", 0],
      "blend_factor": ${BLEND_FACTOR},
      "blend_mode": "normal"
    }
  },
  "7": {
    "class_type": "SaveImage",
    "inputs": {
      "images": ["6", 0],
      "filename_prefix": "framesfield_antihalo_2x"
    }
  }
}
JSONEOF

echo "Generated anti-halo-2x-upscale.api.json (model=${MODEL_NAME}, blend=${BLEND_FACTOR})"

# 2. Validate JSON strictly and queue to local ComfyUI API (wrap in {"prompt": ...})
python3 -c '
import json, urllib.request, sys
g = json.load(open("anti-halo-2x-upscale.api.json"))
assert "7" in g and g["7"]["class_type"] == "SaveImage"
print("JSON_VALID: 7 stock nodes terminating in SaveImage")
if "--queue" in sys.argv:
    req = urllib.request.Request(
        "'"$COMFY_URL"'/prompt",
        data=json.dumps({"prompt": g}).encode(),
        headers={"Content-Type": "application/json"},
    )
    print(urllib.request.urlopen(req).read().decode())
' "${4:-}"

# 3. Optional subtle optical micro-grain pass (removes synthetic GAN waxiness on 2K/4K portraits)
# ffmpeg -y -i ComfyUI/output/framesfield_antihalo_2x_00001_.png -vf "noise=alls=3:allf=u" final_natural_grain.png

Before vs. After (Broken Pattern vs. Verified Fix)

Broken · Broken Raw 4x GAN Pass (Direct 4096px 4x-UltraSharp on Portraits)
# Single-pass raw GAN output straight to final asset:
LoadImage (1024px portrait)
  -> UpscaleModelLoader ("4x-UltraSharp.pth")
  -> ImageUpscaleWithModel (4096px)
  -> SaveImage  # Result: 3px ringing halos on hair, waxy cheeks, crunchy bokeh
Verified · Verified Anti-Halo Oversample + 72/28 Lanczos Blend Graph (Stock Nodes)
# Oversample 4x -> Lanczos 0.5x (2048px) -> Blend 72% GAN + 28% Clean Lanczos:
LoadImage (1024px)
  |--[Branch A]--> UpscaleModelLoader ("4x_NMKD-Siax_200k.pth" or "4x-UltraSharp.pth")
  |                  -> ImageUpscaleWithModel (4096px) -> ImageScaleBy (lanczos, 0.5)
  |--[Branch B]--> ImageScaleBy (lanczos, 2.0)  # Zero halos, true bokeh falloff
  +--> ImageBlend (image1=BranchB, image2=BranchA, blend_factor=0.72, blend_mode="normal")
  +--> SaveImage  # Crisp 2x detail with zero ringing & intact natural bokeh

Why this works: Collapsing 4x GAN output down to 2x via Lanczos halves overshoot ringing frequency, and blending 28% of a pure halo-free Lanczos upscale restores smooth skin gradients and authentic lens bokeh.

Under the Hood

Why This Failure Happens in Real Pipelines

Pure pixel-space GAN upscalers like 4x-UltraSharp (RRDBNet architecture) evaluate small local pixel neighborhoods and ask a single question: how do I turn soft gradients into crisp high-frequency edges? That behavior is useful for architectural linework, flat graphic typography, or crisp matte packaging edges—especially when immediately downsampled back by 0.5x via Lanczos. On human portraits, shallow-DOF 85mm cinema stills, wool fabrics, or natural foliage, however, 4x-UltraSharp misclassifies smooth out-of-focus bokeh and subtle skin tonal transitions as compression blur, carving hard black-and-white ringing halos along hair strands and turning natural skin into shiny porcelain wax.

Running 4x-UltraSharp straight to 4096px and shipping the raw 4x raster without downsampling or semantic refinement is the most common cause of the telltale "AI upscaled" look in print posters and hero banners. Even switching directly to an alternative GAN weight only solves half the issue if the final pixel grid is left at raw 4x GAN output without optical antialiasing.

Production studios eliminate halos and plastic skin reliably using a three-part protocol: first, choose a photorealistic GAN weight (4x_NMKD-Siax_200k.pth or 4x-ClearRealityV1.pth) for portraits and organics while reserving 4x-UltraSharp for architecture and typography; second, oversample at 4x then downsample 0.5x with Lanczos and blend 25–30% of a clean Lanczos 2x reference back via ComfyUI ImageBlend to collapse harsh edge ringing; third, for 4K hero prints where real fabric weave and skin micro-pores matter, follow the clean 2x upscale with a low-denoise (0.18–0.26) tiled FLUX or SDXL diffusion refinement pass plus subtle 1.5% monochromatic film grain.

Step-by-Step Resolution & Verification

  1. 01

    Match the upscale model to subject texture instead of defaulting to 4x-UltraSharp

    Use 4x_NMKD-Siax_200k.pth or 4x-ClearRealityV1.pth for skin, portraits, fabrics, and food photography; reserve 4x-UltraSharp.pth strictly for architecture, hard-surface industrial products, and vector-like graphics.

  2. 02

    Oversample 4x -> Lanczos 0.5x and blend 25–30% clean Lanczos back

    Queue anti-halo-2x-upscale.api.json with blend_factor between 0.65 (soft portraits) and 0.80 (crisp packshots) so hard GAN edge ringing dissolves cleanly while retaining genuine micro-acutance.

  3. 03

    Use low-denoise tiled diffusion (0.18–0.26) and subtle uniform grain for 4K print masters

    When scaling a portrait all the way to 4096px for 300 DPI print, run a tiled FLUX or SDXL refinement pass at denoise 0.20 with VAEEncodeTiled/VAEDecodeTiled, then apply subtle monochromatic grain (noise=alls=3:allf=u) to unify skin and background.

Verification Check · Validate Graph JSON Integrity & Measure Output Resolution / Edge Overshoot
python3 -c 'import json; g=json.load(open("anti-halo-2x-upscale.api.json")); print("nodes:", len(g), "output:", g["7"]["class_type"], "blend:", g["6"]["inputs"]["blend_factor"])'
Expected healthy output:
nodes: 7 output: SaveImage blend: 0.72   # Inspect saved PNG at 200% zoom: zero white hair halos, natural soft bokeh

How to Prevent This Error From Recurring

GUARDRAIL 01

Generate native high-resolution plates first whenever budget allows

Black Forest Labs FLUX 3 Image ($0.048/1K, $0.10/2K, native up to 4K) and Ideogram 4.6 (native 4K, $0.008–$0.20/img) output crisp native high-resolution plates—and ByteDance Seedream 5.5 outputs native 2K ($0.020–$0.035 BytePlus / $0.03–$0.0405 fal.ai)—with true optical focus falloff, eliminating aggressive 4x GAN hallucination.

GUARDRAIL 02

Never stack two GAN upscalers back to back (4x followed by 2x)

Chaining multiple ESRGAN passes compounds ringing halos exponentially and permanently destroys smooth shadow gradients.

GUARDRAIL 03

Keep diffusion refinement denoise strictly <= 0.28 on branded SKUs and faces

Pushing tiled Img2Img denoise past 0.35 lets the sampler alter product typography, eye geometry, and stitch counts across tile boundaries.

Troubleshooting FAQs

Why does 4x-UltraSharp look crisp on buildings and logos but terrible on close-up portraits?
4x-UltraSharp’s adversarial loss strongly rewards razor-sharp local contrast transitions. Architectural concrete, glass reflections, and bold typography benefit from hard edge contrast, whereas human skin relies on smooth sub-surface tonal transitions that aggressive GAN edge sharpening turns into waxy patches and white hair halos.
What blend_factor value in ComfyUI ImageBlend works best for skin versus product packshots?
With image1 set to the clean 2x Lanczos upscale and image2 set to the 0.5x-downsampled GAN output, blend_factor 0.60–0.68 preserves natural portrait skin and soft bokeh, while 0.75–0.85 delivers crisp micro-contrast on product packshots and architectural stills.
Why does adding subtle film grain (noise=alls=3:allf=u) make upscaled AI images look more photographic?
GAN upscalers tend to over-smooth low-contrast surfaces like painted walls, sky gradients, and cheeks while over-sharpening high-contrast edges. Adding 1–2% uniform monochromatic grain restores consistent sensor texture across both sharp and out-of-focus areas.
Can I fix oversharpened halos on AI video frames without causing temporal flicker?
Avoid running per-frame static ESRGAN models like 4x-UltraSharp on video—independent frame-by-frame edge hallucination creates violent high-frequency shimmer. For video upscaling, prefer native 1080p generation, Lanczos + light unsharp masking in FFmpeg, or temporally aware video upscalers.
When should I use low-denoise tiled FLUX refinement instead of a pure GAN blend?
Use the fast 2-second GAN + Lanczos blend for web heroes and e-commerce thumbnails up to 2048px. Add a tiled diffusion refinement pass (denoise 0.18–0.26) specifically for 4096px 300 DPI print posters, billboards, or macro beauty shots where real fabric weave and organic skin texture will be inspected up close.
Use this page in AI tools or notes
raw .md