Fix: Pixal3D Windows compatibility + configurable NAF target size#177
Open
acolasialiuliu wants to merge 1 commit into
Open
Fix: Pixal3D Windows compatibility + configurable NAF target size#177acolasialiuliu wants to merge 1 commit into
acolasialiuliu wants to merge 1 commit into
Conversation
…CUDA device mismatch when cond model loaded without low_vram; missing naf_download_if_missing attr; NAF graceful fallback when NATTEN unavailable. Feature: naf_target_size widget on ImageCondGenerator (default 256, range 128-1024). Resources: https://hf-mirror.com/lldacing/NATTEN-windows | https://space.bilibili.com/37411464
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces Windows compatibility fixes for Pixal3D (TencentARC/Pixal3D) rendering on ComfyUI, and adds a configurable NAF target size parameter.
Changes
1. CPU/CUDA Device Mismatch Fix
File:
trellis2/pipelines/trellis2_image_to_3d.pyget_proj_cond_ss()andget_proj_cond_shape()now check if the image_cond_model is on CPU before moving to CUDA, and only move it back to CPU in low_vram mode if it was originally on CPU. This preventsRuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the samewhen the model is loaded without low_vram mode.2. NAF Model Graceful Fallback
File:
trellis2/trainers/flow_matching/mixins/image_conditioned_proj.pyself.naf_download_if_missing = TruetoDinoV3ProjFeatureExtractor.__init__()self.naf_model = Falseinstead of crashing withAttributeErrorforward(),to(), andcuda()methods to handlenaf_modelbeingFalse(not justNone)This allows Pixal3D to run even when NATTEN is unavailable (NAF will be disabled automatically).
3. Configurable NAF Target Size
File:
nodes.py"naf_target_size"widget toTrellis2ImageCondGenerator.INPUT_TYPES()(INT, default 256, range 128-1024)__init__now hasself.naf_target_size_override = None_get_pixal3d_config()helper method that copies stage config with override applied4. NATTEN Windows Resources & Contact
nodes.py:Tested Environment