ComfyUI Node

Hi_Sampler

Sampling at 2048x2048

By smthemex·Created 2 years ago·Updated 2 years ago· 51
Hi_Sampler
  • pipe
  • image
  • control_image
  • ip_image
  • image
prompta girl,8k,smile,best quality
negative_prompttext, watermark, lowres, low quality, worst quality, deformed, glitch, low contrast, noisy, saturation, blurry
controlnet_scale0.5
clip_skip1
pre_input512
seed0
steps30
cfg7.5
width2048
height2048
adapter_scale1.0

This is the node that makes the pack's name honest. HI_Diffusers_Model_Loader builds the patched diffusers pipeline; Hi_Sampler is where you actually ask it for a 2048x2048 image and don't get a field of duplicated faces back. It's the only node that accepts the loader's pipe output, so think of the pair as one big opaque sampler that happens to be split into two boxes.

The default width and height are 2048, which tells you everything about the intent. Where a normal KSampler needs the two-pass hi-res fix to survive that size, HiDiffusion's RAU-Net keeps the deep U-Net blocks working at their training-resolution receptive field, so the composition holds. It's not upscaling - it's native generation at a resolution the base model technically never saw.

Inputs that matter

Most of these read like any sampler, with a few twists:

  • pipe (required) - from HI_Diffusers_Model_Loader. Nothing else plugs in here.
  • prompt / negative_prompt - plain text. If the loader fused a LoRA, its trigger_words get appended to your prompt automatically.
  • width / height - default 2048, up to 8192. The star of the show. This is where "high resolution" lives.
  • seed, steps, cfg - the usual. Steps default to 30, cfg 7.5.
  • pre_input - default 512 (range 256–1024). Any input image gets rescaled to this base before generation, then upsampled to your target size internally. For SD 1.5 keep it near 512; for SDXL you may want it higher.
  • clip_skip, controlnet_scale, adapter_scale - sampler-level knobs for CLIP skipping, ControlNet conditioning strength, and the IP-Adapter style strength.

Then the optional image inputs, which switch behavior based on the loader's function_choice:

  • image - the img2img source.
  • control_image - ControlNet input for txt2img or img2img; with an SDXL inpainting model it's used as the inpainting mask.
  • ip_image - reference image for the style/IP-Adapter branch (only active if the loader had ip_ckpt + clip_vision set).

The tile ControlNet path is worth a special mention: the node runs its own built-in preprocessing that randomly applies gaussian blur and a guided-filter pass and jitters scale. It's meant to give tile/upscale-style conditioning a fighting chance, but the randomness means identical inputs can give you different control strength run to run.

Output

One output, image (standard IMAGE tensor), so it plugs straight into a Save Image, Preview Image, or anything downstream. That's the whole loop: Loader → Sampler → Save.

Install

Same pack, same install - you already did it for the loader:

cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_HiDiffusion_Pro.git

Or install ComfyUI_HiDiffusion_Pro via ComfyUI Manager and restart. The heavy requirements are diffusers >= 0.28.0 and omegaconf; the README lists diffusers + yaml, and the code needs cv2 (usually already in ComfyUI's venv).

Common issues

  • VRAM pressure at 2048. The loader enables VAE tiling and CPU offload automatically, and the sampler calls torch.cuda.empty_cache() after each run, but 2048x2048 SDXL is still a hungry ask. On smaller cards, drop to 1536, lower pre_input, or use an SD 1.5 checkpoint.
  • Fast UNets want more steps than you think. The README warns that the Lightning/Hyper/LCM/DMD2 accelerators need their step counts raised appropriately - 30 steps is often more than they want, but the tiny 1–4 step settings produce obvious artifacts. Find the sweet spot per model.
  • Window attention and quality. If you enabled apply_window_attn on the loader, feature maps that don't partition cleanly into windows get force-interpolated and image quality drops. If output looks mushy, flip that toggle off and re-run.
  • Trigger words appearing in your output. Because the loader's trigger_words get glued onto the prompt when a LoRA is loaded, a stale phrase can show up as stray tokens. Keep it set to the LoRA's real trigger, or leave the LoRA input at none.

Honestly, if your goal is just "generate big without the glitch," this pack is one of the cleaner routes - it's self-contained and doesn't fight ComfyUI's internals. The tradeoff is that you're inside diffusers-land, so you give up the fine-grained control of native ComfyUI sampling for the convenience of one hook.

CategoryHidiffusion_Pro

Inputs (15)

NameTypeDefaultDescription
pipeHIDIF_MODEL
promptSTRINGa girl,8k,smile,best quality
negative_promptSTRINGtext, watermark, lowres, low quality, worst quality, deformed, glitch, low contrast, noisy, saturation, blurry
controlnet_scaleFLOAT0.50.1–1
clip_skipINT1-5–100
pre_inputINT512256–1024
seedINT00–18446744073709550000
stepsINT301–10000
cfgFLOAT7.50–100
widthINT204864–8192
heightINT204864–8192
adapter_scaleFLOAT1.00–1
imageoptIMAGE
control_imageoptIMAGE
ip_imageoptIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE