Nodes/ComfyUI-Image-Filters/Upscale Hunyuan3Dv2 Latent By
ComfyUI Node

Upscale Hunyuan3Dv2 Latent By

A hires-fix trick borrowed for 3D generation

By spacepxl·Created 3 years ago·Updated 8 months ago· 293
Upscale Hunyuan3Dv2 Latent By
  • samples
  • LATENT
scale_by2.00

This is a narrow, purpose-built utility node: nearest-neighbor upscaling of latents specifically shaped for Hunyuan3D v2 - the Tencent model that turns a reference image into a 3D mesh. It's the same idea as the standard "hires fix" trick from 2D image generation - generate small and cheap first, upscale the latent, then refine at the higher resolution - ported over to a latent format that ordinary image-latent upscale nodes aren't built to handle.

Why a Hunyuan3D-specific node exists at all

Regular ComfyUI latent upscale nodes assume a standard image-latent shape (the compressed 2D grid a VAE produces from a picture). Hunyuan3D v2's latents encode 3D shape information instead, which doesn't share that shape or those assumptions - feeding it through a generic upscaler either errors out or produces garbage. This node exists specifically because the pack's author needed a way to scale that particular latent format up, and picked nearest-neighbor because it's the simplest, cheapest resize that doesn't try to invent detail or interpolate values that don't make sense to blend for this kind of latent. The README is upfront that this is exploratory rather than a proven pipeline: "might be useful for hires fix" - it's offered as a building block, not a guaranteed-good workflow.

Inputs and outputs

  • samples (LATENT) - the Hunyuan3D v2 latent you want to scale up. Feed it something from a different architecture's latent space and you're on your own; this node doesn't validate the shape for you.
  • scale_by (0.01–8, default 2) - the multiplier applied to the latent's spatial dimensions. Default 2 doubles it, matching the classic 2x hires-fix convention from image workflows.

Output is a single LATENT - the upscaled version, ready to feed onward in whatever Hunyuan3D v2 pipeline you're running (typically back through more refinement/sampling steps before final mesh decode).

Installing it

ComfyUI Manager: search "ComfyUI-Image-Filters," install, restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-Image-Filters

pip install -r requirements.txt (or install.bat on Windows) covers this pack's requirements, then restart ComfyUI. This node itself needs no model weights - you'll separately need whatever Hunyuan3D v2 checkpoint and nodes your pipeline is built around; this pack only supplies the upscale step.

Watch for the pack-wide OpenCV gotcha on install: a conflicting opencv/cv2 version from another node pack can throw import errors for everything in this repo, not just this node. import_error_install.bat (included alongside the normal install.bat) uninstalls every opencv variant and reinstalls the single one this pack needs, opencv-contrib-python.

Common issues

The single most likely failure mode is feeding this node a latent that isn't actually from Hunyuan3D v2 - since it's shape-specific, expect an outright error or nonsense output rather than a graceful fallback. Beyond that, because this is nearest-neighbor rather than any learned or interpolated upscaling, don't expect it to add detail on its own - it's a resize, not a super-resolution step. If you're chasing better mesh fidelity, this node is meant to be the "make it bigger" half of a hires-fix pattern; the quality gain, if any, comes from whatever sampling/refinement you run on the upscaled latent afterward, not from the upscale operation itself. This is a genuinely niche node with no wider community discussion behind it that we could find - if you're using it, you're likely already deep in a specific Hunyuan3D v2 experimental pipeline rather than following a well-trodden path.

CategoryImage-Filters/latent

Inputs (2)

NameTypeDefaultDescription
samplesLATENT
scale_byFLOAT2.000.01–8

Outputs (1)

NameTypeDescription
LATENTLATENT