Nodes/ComfyUI-MIDI3D/(Down)Load MIDI-3D Texture Models
ComfyUI Node

(Down)Load MIDI-3D Texture Models

MV-Adapter plus a whole lot of VRAM

By PozzettiAndrea-archive·Created 9 months ago·Updated 7 months ago· 3
(Down)Load MIDI-3D Texture Models
    • texture_models
    dtypefloat16

    Raw MIDI-3D output is white or grey geometry - an SDF extracted into a mesh, with all the texture appeal of a foam model. (Down)Load MIDI-3D Texture Models is the first half of fixing that. It loads the two-model texturing stack the pack uses: MV-Adapter (huanngzh's multi-view image generator, the same author family behind the MIDI-3D project) and a TexturePipeline that projects generated views onto the mesh. Then MIDI-3D Texture does the actual work. This node is just the heavy lifting - and it is heavy.

    What it loads

    The dtype input (default float16, with bfloat16 as the alternative) is the only knob. Trust the default; texturing is a 768×768 SDXL-class generation, and float16 is the memory-practical choice here. Output is a single MIDI3D_TEXTURE_MODELS bundle that feeds MIDI-3D Texture.

    Under the hood, loading means:

    • MV-Adapter image-to-multiview: SDXL base (stabilityai/stable-diffusion-xl-base-1.0) with a fp16 VAE fix, the MV-Adapter adapter weights from huanngzh/mv-adapter, and a shifted-SNR scheduler. The node loads it with device_map="cuda" to keep CPU RAM manageable.
    • Texture pipeline: LaMa (inpainting) and RealESRGAN x2 (upscaling) checkpoints, downloaded on first load into the pack's own midi/checkpoints/ folder via wget. If wget isn't on your system, that download silently fails and texturing errors later.

    The source code is blunt about the cost: ~14GB VRAM for MV-Adapter alone, plus more for the texture pipeline. This is not a 8GB-card node. If the main MIDI-3D generation was already tight on your GPU, texturing will be the wall.

    Installing the extras

    This node is the reason the pack's install.py exists. Texturing needs mvadapter (from GitHub, not PyPI), nvdiffrast (a CUDA rasterizer with no official wheels), and torch-cluster. requirements.txt won't install any of them:

    cd ComfyUI/custom_nodes/ComfyUI-MIDI3D
    python install.py
    

    install.py detects your torch/CUDA versions and pulls the right torch-cluster wheel from PyG's index and an nvdiffrast wheel from the author's own wheels repo, falling back to building from source if needed. It also installs mvadapter from git+https://github.com/huanngzh/MV-Adapter.git. If you skipped this and only ran pip install -r requirements.txt, expect an import error the moment this node loads.

    Where it goes wrong

    • "mvadapter not found" / import errors - you skipped install.py, or it failed partway. Run it again and watch for the WARNING: Failed to install ... (texturing will not work) lines. The script is polite about degrading; the pack is not.
    • LaMa / RealESRGAN download fails - the node shells out to wget. On Windows without wget, or behind a proxy, those checkpoints never land and you'll get obscure errors in MIDI-3D Texture. Fix by installing wget or manually placing big-lama.pt and RealESRGAN_x2plus.pth in the pack's midi/checkpoints/ folder.
    • OOM at load - 14GB of models plus the diffusion pipeline plus your scene is a lot of GPU. There's no clever trick; close other heavy nodes or accept that texturing is a "free the GPU" operation.

    Two honest takes: first, this is a lot of machinery for textures that a real 3D tool would produce in seconds - but if you want multi-view-consistent color on AI geometry without leaving ComfyUI, this is how. Second, the author ships a native nvdiffrast wheel, which is genuinely thoughtful for a package like this - it's normally the worst install in the 3D-ComfyUI space.

    CategoryMIDI3D

    Inputs (1)

    NameTypeDefaultDescription
    dtypeoptCOMBOfloat16Model precision (float16 recommended for texturing)

    Outputs (1)

    NameTypeDescription
    texture_modelsMIDI3D_TEXTURE_MODELSLoaded texture models for MIDI3DTexture node