Nodes/HunyuanImage3 Low-Memory BF16/Hunyuan Instruct Tiled Refine
ComfyUI Node

Hunyuan Instruct Tiled Refine

Blow Up a Hunyuan Image to 4K Without Blowing Up Your VRAM

By foxidermist·Created 2 months ago·Updated about a month ago· 0
Hunyuan Instruct Tiled Refine
  • model
  • image
  • image
  • status
instructionPreserve the image exactly and add only subtle local texture and fine detail. Do not change composition, geometry, object count, colors, lighting, text, or identities.
scale_multiplier×4
tile_steps4
seed-1
guidance_scale-1.0
flow_shift2.80
feather128
refine_strength0.25
max_tiles0
tiled_previewtrue
tiled_preview_every1
tiled_preview_max_size1024

HunyuanImage 3.0 is the 80B image MoE that the community measured at roughly 320GB of VRAM and mostly shrugged at. This whole pack exists to run the full BF16 Instruct checkpoint on a 12GB card anyway, by streaming weights through CPU and SSD. And once you've spent that long waiting for one image, you want it bigger. That's the job of Hunyuan Instruct Tiled Refine: take the output, multiply the canvas up to 8× on each side, and feed the result back through the model tile by tile to keep it sharp.

Before you read the settings, understand what this node is not. It isn't a Lanczos upscale - it's generative, in the same family as a detailer or SUPIR. It invents fine detail, which means it can also change things. The tooltip's default instruction spells that out: "Preserve the image exactly and add only subtle local texture and fine detail. Do not change composition, geometry, object count, colors, lighting, text, or identities." Keep that default until you know why you're changing it.

How it works

The mechanism is refreshingly simple and it's all grounded in the source. Your image gets Lanczos-upscaled to the target size (width and height both ×scale_multiplier), then split into a grid - ×4 means a 4×4 grid of 16 tiles, ×8 means 64. Each tile is resized to a native Hunyuan bucket, run through the same image-edit pass the pack's Edit node uses, then resized back and blended into the canvas. Cosine feathering handles the seams, and refine_strength decides how much of the generated crop survives over the enlarged base. Every tile gets a derived seed from the base seed, so you can reproduce a run.

It is not native single-pass high-res diffusion. It's a sequence of native-resolution image-edit passes stitched together - and on the low-memory path, that's the sentence that should scare you. The source itself logs a warning that a full grid "can take several hours with BF16 SSD offload." Each tile is a full diffusion run through a model that's being streamed from disk.

The inputs that matter

  • model - the HUNYUAN_INSTRUCT_MODEL output of this pack's Hunyuan Instruct Loader. Tiled refine isn't standalone; it needs the loader upstream.
  • image - what you're enlarging.
  • instruction - applied identically to every tile. Strong creative instructions cause mismatched seams or repeated objects, because each tile sees the whole prompt.
  • scale_multiplier - ×4 default. Aspect ratio is preserved; the multiplier just scales both axes.
  • tile_steps - 4 default. Runtime scales with steps × tile count, so this is your main time dial.
  • refine_strength - 0.25 default. Lower keeps more of the original (fewer seams, better identity); higher adds more generated detail.
  • feather - 128 default; the context/blend width on the longer tile side, scaled proportionally for non-square tiles.
  • max_tiles - 0 processes everything. Set it to 1 first as a smoke test before committing to 16 or 64 tiles.

Outputs are image (the enlarged, refined canvas) and status, a string that tells you how many tiles ran, the final dimensions, and how many minutes it took. Wire image to a Save Image and you're done.

Installing it

This is a fork of EricRollei's Comfy_HunyuanImage3 aimed specifically at low-VRAM BF16, so it's a full checkout with real dependencies - pinned versions of transformers==4.57.6, accelerate==1.14.0, plus bitsandbytes, torch>=2.8.0, and friends. Manager search "hunyuanimage3-low-memory" works, or:

cd ComfyUI/custom_nodes
git clone https://github.com/foxidermist/hunyuanimage3-low-memory.git

Then install the requirements into ComfyUI's Python and restart:

C:\ComfyUI\python_embeded\python.exe -m pip install -r C:\ComfyUI\ComfyUI\custom_nodes\hunyuanimage3-low-memory\requirements.txt

You also need the full HunyuanImage-3.0-Instruct checkpoint in ComfyUI/models/HunyuanImage-3.0-Instruct (or registered via extra_model_paths.yaml) - this fork deliberately runs the BF16 checkpoint, not a distilled variant.

Gotchas

  • It's slow, and slow compounds. Each tile is a full diffusion pass on a disk-offloaded model. ×4 on a 12GB card is an afternoon, not a coffee break. Test with max_tiles=1, keep tile_steps low, and skip tiled_preview overhead if you're impatient - though the preview itself is cheap, since it just composites finished tiles.
  • The preserve mask doesn't travel. If you used the pack's latent preserve or final pixel preserve on the I2I pass, tiled refinement doesn't receive or reapply it. For exact protected pixels, keep the native output.
  • Model consistency is on you. Every tile is edited independently, so identity and colors drift. That's what refine_strength at 0.25 and the conservative default instruction are fighting.

The honest verdict: as an upscaler it's a niche tool for a niche pack - the people who already accepted "very slow but it runs" and want bigger outputs without a second GPU. If you want this class of refinement on a more sensible footprint, the same tiled trick works with lighter models elsewhere; but if you're committed to full-BF16 HunyuanImage on consumer hardware, this is the way to get a 4096px image out of it.

CategoryHunyuan/Instruct

Inputs (14)

NameTypeDefaultDescription
modelHUNYUAN_INSTRUCT_MODELModel loaded by Hunyuan Instruct Loader.
imageIMAGEInput image to enlarge and refine tile by tile.
instructionSTRINGPreserve the image exactly and add only subtle local texture and fine detail. Do not change composition, geometry, object count, colors, lighting, text, or identities.Applied independently to every tile. Strong creative instructions can cause mismatched seams or repeated objects.
scale_multiplierCOMBO×4Final width and height are multiplied by this value while preserving the incoming aspect ratio. Examples: 1024x1024 ×4 = 4096x4096; 2048x512 ×4 = 8192x2048.
tile_stepsINT41–20Diffusion steps per tile. Runtime scales with tile_steps multiplied by the automatically generated tile count.
seedINT-1-1–2147483647-1 chooses a random base seed; every tile gets a derived seed.
guidance_scaleFLOAT-1.0-1–20-1 uses the model recommendation.
flow_shiftFLOAT2.800–10Flow-matching scheduler shift for each tile. 2.8 matches the node default.
featherINT12816–512Context and blend width on the longer tile side. The shorter side is scaled proportionally, preserving non-square tile aspect ratios.
refine_strengthFLOAT0.250–1Blend between the enlarged base crop and generated crop. Lower values preserve identity and reduce seams.
max_tilesINT00–640 processes every tile. Use 1 for a quick smoke test. ×4 creates 4x4 = 16 tiles; ×8 creates 8x8 = 64 tiles.
tiled_previewBOOLEANtrueDisplay the enlarged canvas after completed tiles are blended. This preview is inexpensive because it does not perform extra VAE decodes.
tiled_preview_everyINT11–64Update the canvas preview every N completed tiles.
tiled_preview_max_sizeINT1024256–2048Maximum width or height of the tiled canvas preview.

Outputs (2)

NameTypeDescription
imageIMAGE
statusSTRING