Nodes/bsz-cui-extras/BSZ Strange Resample
ComfyUI Node

BSZ Strange Resample

Resampling methods ComfyUI forgot, plus one that never existed

By Beinsezii·Created 3 years ago·Updated 2 years ago· 27
BSZ Strange Resample
  • latent
  • LATENT
method
width1024
height1024
bleed0.00

BSZ Strange Resample resizes a latent using either the full PIL resampling family - nearest, box, bilinear, hamming, bicubic, lanczos - or a custom method called "slurry2" that doesn't exist anywhere else. The name is the honest part: this is an experimental node for people who want to feel exactly how resampling method choice changes a latent, and for the author's own weird interpolator experiments.

Why you'd reach for it

The stock latent upscaler exposes a handful of methods. This node gives you the rest of them - PIL's full resampling set, applied per latent channel - plus the experimental slurry. If you're tuning a two-pass workflow and wondering whether hamming vs. lanczos actually matters on the intermediate latent, this is the node to answer it. It's a tinkerer's tool; the README treats bsz-experimental.py (which houses this) as optional.

Inputs

  • latent - the latent to resize.
  • method - slurry2, or one of PIL_Nearest, PIL_Box, PIL_Bilinear, PIL_Hamming, PIL_Bicubic, PIL_Lanczos.
  • width / height - target size (multiples of 8).
  • bleed - only used by slurry2: -1.0 to 1.0, how strongly neighboring latent channels bleed into each other during the weird interpolation.

Output: a LATENT at the target size.

How it works

The PIL methods are straightforward: each latent channel becomes a PIL grayscale float image and gets resized with the chosen resampling filter. Slurry2 is the strange one - it upscales by inserting interpolated pixels between existing ones, and when it inserts a pixel it blends the four channels of neighboring pixels according to bleed, meaning color information leaks between channels. That's the "slurry": a deliberate channel-mixing artifact the author built to see what happens. It's not trying to be a good upscaler; it's a weirdness generator with a bleed knob.

Install & honest expectations

cd ComfyUI/custom_nodes
git clone https://github.com/Beinsezii/bsz-cui-extras

restart, or install via ComfyUI Manager. Pure Python, no dependencies.

Set expectations: the PIL methods are genuinely useful as an A/B test bed, and slurry2 is a fun way to understand channel bleed - but none of this replaces a proper upscale-model pass (the pack's Principled Scale with a model method does that). For a normal hires-fix, the stock latent upscaler is fine; reach for this node when you're curious, not when you're in a hurry.

Categorybeinsezii/experimental

Inputs (5)

NameTypeDefaultDescription
latentLATENT
methodCOMBO7 options: slurry2, PIL_Nearest, PIL_Box, PIL_Bilinear, PIL_Hamming, PIL_Bicubic, +1
widthINT102464–16384
heightINT102464–16384
bleedFLOAT0.00-1–1

Outputs (1)

NameTypeDescription
LATENTLATENT