Update nodes.py

This commit is contained in:
kijai 2025-02-02 12:49:12 +02:00
parent 9c69b6f4fd
commit 4000191965

View File

@ -1408,6 +1408,8 @@ class Hy3DNvdiffrastRenderer:
# Get texture from material
if hasattr(mesh_copy.visual.material, 'baseColorTexture'):
pil_texture = getattr(mesh_copy.visual.material, "baseColorTexture")
elif hasattr(mesh_copy.visual.material, 'image'):
pil_texture = getattr(mesh_copy.visual.material, "image")
pil_texture = pil_texture.transpose(Image.FLIP_TOP_BOTTOM)
# Convert PIL to tensor [B,C,H,W]