Nodes/ComfyUI_HiDiffusion_Pro/HiDiffusion Apply to MODEL (Native)
ComfyUI Node

HiDiffusion Apply to MODEL (Native)

Apply HiDiffusion (RAUNet + optional MSW-MSA) to a NATIVE ComfyUI MODEL. Insert between CheckpointLoaderSimple and KSampler; everything downstream stays native. No diffusers/transformers required. Notes: (1) HiDiffusion targets 2K/4K output - at 1024px the difference is small; (2) when using ControlNet together with RAUNet, the control residuals may not match the pooled feature size - disable RAUNet in that case; (3) turning both switches OFF yields a bit-identical stock MODEL, useful as a parity baseline.

By smthemex·Created 3 years ago·Updated 3 days ago· 51
HiDiffusion Apply to MODEL (Native)
  • model
  • model
◄model_archauto►
◄apply_raunettrue►
◄apply_window_attnfalse►
◄aggressive_raunettrue►
◄t1_ratio-1.00►
◄t2_ratio-1.00►
◄controlnet_t2ifalse►
◄window_shiftrandom►
◄window_shift_index0►
◄aggressive_start_ratio-1.00►
CategoryHidiffusion_Pro/Native

Inputs (11)

NameTypeDefaultDescription
modelMODEL—
model_archCOMBOautoauto detects a stock SDXL (9 input blocks) or SD1.5/SD2.x (12 input blocks) UNet at runtime.
apply_raunetBOOLEANtrueResolution-Aware UNet: early denoising steps run part of the UNet at half resolution to suppress object duplication at 2K/4K output.
apply_window_attnBOOLEANfalseMSW-MSA window self-attention on 10 (SDXL) / 5 (SD1.5) transformer blocks. Upstream draws a random shift every step; usually only useful at very high resolution, so it is OFF by default (matching the old plugin's default).
aggressive_raunetBOOLEANtrueUpstream 'aggressive RAUNet' (SDXL, latent<512): pool in [16%, T1) of steps and use stride-4 downsampling in the first 16%. Leaving this ON reproduces the original project's behaviour.
t1_ratioFLOAT-1.00-1–1-1 = upstream auto preset, chosen from the latent size. Override with 0..1.
t2_ratioFLOAT-1.00-1–1-1 = upstream auto preset.
controlnet_t2iBOOLEANfalseUse upstream's text-to-image+ControlNet preset (T1=0.5) instead of the plain SDXL one (T1=0.4).
window_shiftCOMBOrandomrandom reproduces upstream torch.rand(1); fixed pins one of the 4 shift candidates for reproducible output and numerical parity tests.
window_shift_indexINT00–30..3, only used when window_shift=fixed.
aggressive_start_ratiooptFLOAT-1.00-1–1-1 = upstream 8/50 = 0.16.

Outputs (1)

NameTypeDescription
modelMODEL—