Ir para o conteúdo
Node packVerificadoExterno
Fonte aberta

ComfyUI-42lux-Hildegard-Refiner

ComfyUI-42lux-Hildegard-Refiner Tile-based refinement nodes for ComfyUI, built around the Hildegard-Refiner reference-latent scheme. Designed for FLUX.2 Klein.

Mantenedor@42luxUnratednota

Perfil do pacote

Status
Verificado
Publicador
@42lux
Fonte
GitHub

README

ComfyUI-42lux-Hildegard-Refiner

Tile-based refinement nodes for ComfyUI, built around the Hildegard-Refiner reference-latent scheme. Designed for FLUX.2 Klein.

The pack is small and modular: three nodes that compose into a clean tile-refine pipeline. Tiling math is borrowed from ComfyUI_Steudio; the reference- latent construction (tile / position-map / global) is the actual Hildegard-Refiner contribution.

Requires the Hildegard LoRA — these nodes build the reference latents, but a base FLUX.2 Klein checkpoint doesn't know what to do with them. The matching LoRA teaches the model to consume the three reference slots. Download it from huggingface.co/42lux/hildegard and load it as a normal LoRA before sampling.


Examples

BeforeAfter
Example 1 — sourceExample 1 — refinedExample 1 — 100% crop
Example 2 — sourceExample 2 — refinedExample 2 — refined

What it does

A standard tiled upscale + refine workflow looks like:

Load Image → Hildegard Plan → Hildegard References Split → [your sampler] → Hildegard Combine → Save Image
  1. Plan decides the upscaled dimensions and tile grid that satisfy your tile size, minimum overlap, and minimum scale factor, then resamples the image to fit (lanczos by default).
  2. References Split slices the upscaled image into tiles and, for each tile, builds the three Hildegard reference latents:
    • tile_latent — VAE-encoded crop of the tile itself
    • position_latent — VAE-encoded 3×3 "position map" (current tile in the center cell, the 8 neighbors around it, with corner markers ringing the center)
    • global_latent — VAE-encoded thumbnail of the whole upscaled image (long edge capped at ctrl3_max_size, default 768px)
  3. Your sampler runs once per tile, with the three latents fed into the model as reference latents (typically via the Klein conditioning toolkit plus per-ref weight controls). All four outputs from References Split are index-aligned — element i corresponds to the same physical tile across TILE(S), tile_latent, and position_latent.
  4. Combine stitches the processed tiles back into a single image with a feathered alpha mask. Each tile's mask is solid in its interior and zero in an overlap/4-wide strip on every side that borders a neighbor; the mask is then Gaussian-blurred (or box-blurred at narrow overlaps). Result: smooth seams where tiles meet, hard edges at canvas borders.

Frequency separation on the tile reference

References Split can attenuate the tile reference's high-frequency band before it's VAE-encoded into tile_latent. This lets you trade fidelity for creative headroom without touching the other reference slots.

Two controls:

  • tile_high_freq_reduce (0.0 – 1.0, default 0.0) — how much of the high-frequency band to subtract from the tile reference.
    • 0.0 — full source detail preserved (tight fidelity, model has little room to add).
    • 0.5 — balanced: source's color and structure preserved, but the model is free to synthesize fresh micro-detail.
    • 1.0 — soft, low-contrast version with only broad shapes and color preserved.
  • low_freq_radius (1 – 256 px, default 256) — Gaussian-blur radius defining the cutoff between low and high frequencies. Larger = more of the source's detail is classified as "low frequency" and survives the reduce; smaller = only the very-broadest shapes survive and the model regenerates everything else.

Only tile_latent is affected. The TILE(S) image output, position_latent, and global_latent are untouched, so structure and global context stay locked while you open

Nós neste pacote

Nós 3
  • Hildegard Combine
  • Hildegard Plan
  • Hildegard References Split

Fontes

2 fontes

Trechos de fonte

1 trecho

Source context: Repo 42lux/ComfyUI-42lux-Hildegard-Refiner