Skip to content

[Partner Nodes] make "obj" output optional in Hunyuan3D Text and Image to 3D#13449

Merged
comfyui-wiki merged 3 commits intomasterfrom
fix/api-nodes/tencent3d-obj-outputs
Apr 17, 2026
Merged

[Partner Nodes] make "obj" output optional in Hunyuan3D Text and Image to 3D#13449
comfyui-wiki merged 3 commits intomasterfrom
fix/api-nodes/tencent3d-obj-outputs

Conversation

@bigcat88
Copy link
Copy Markdown
Contributor

@bigcat88 bigcat88 commented Apr 17, 2026

API Node PR Checklist

Scope

  • Is API Node Change

Pricing & Billing

  • Need pricing update
  • No pricing update

If Need pricing update:

  • Metronome rate cards updated
  • Auto‑billing tests updated and passing

QA

  • QA done
  • QA not required

Comms

  • Informed Kosinkadink

…e to 3D

Signed-off-by: bigcat88 <bigcat88@icloud.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

📝 Walkthrough

Walkthrough

The PR modifies two execute implementations to make OBJ file extraction optional instead of required. Previously, missing OBJ files would cause errors. Now, the code calls get_file_from_response with raise_if_not_found=False and conditionally downloads/extracts only when the OBJ is present. Output mappings now return None when OBJ is absent. When OBJ exists, PBR tensors are populated from extraction with fallbacks; when absent, all OBJ-related outputs are None.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: making the OBJ output optional in Hunyuan3D nodes.
Description check ✅ Passed The PR description is related to the changeset, providing a checklist that confirms QA was done and pricing updates are not needed, aligning with the code changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
comfy_api_nodes/nodes_hunyuan3d.py (1)

384-408: Minor: inconsistent fallback between OBJ-present vs OBJ-absent branches.

When the OBJ archive is present but a specific PBR map is missing, the code falls back to torch.zeros(1, 1, 1, 3) for metallic/normal/roughness (lines 394-396). When the OBJ archive is entirely absent, those same outputs become None (lines 405-407). Same goes for texture_image: obj_result.texture may be None even with OBJ present (line 393), but no zero-tensor fallback is applied there either.

This is functionally fine (downstream nodes can handle None), but the asymmetry is a tiny papercut for graph authors who may need to special-case both None and a 1×1×1×3 zero tensor. Consider unifying — either always emit None when missing, or always emit a zero-tensor placeholder. Not blocking.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@comfy_api_nodes/nodes_hunyuan3d.py` around lines 384 - 408, Unify the
missing-PBR/map fallback behavior so both branches emit the same types: update
the OBJ-present branch (where get_file_from_response,
download_and_extract_obj_zip, and obj_result are used) to return the same None
placeholders used in the OBJ-absent branch (or conversely change the OBJ-absent
branch to use torch.zeros(1,1,1,3) placeholders) for metallic/normal/roughness
and texture_image so IO.NodeOutput always has a consistent schema; adjust the
construction of the IO.NodeOutput return values to use the chosen common
fallback (reference obj_result, torch.zeros, download_url_to_file_3d and
IO.NodeOutput to locate the code).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@comfy_api_nodes/nodes_hunyuan3d.py`:
- Around line 384-408: Unify the missing-PBR/map fallback behavior so both
branches emit the same types: update the OBJ-present branch (where
get_file_from_response, download_and_extract_obj_zip, and obj_result are used)
to return the same None placeholders used in the OBJ-absent branch (or
conversely change the OBJ-absent branch to use torch.zeros(1,1,1,3)
placeholders) for metallic/normal/roughness and texture_image so IO.NodeOutput
always has a consistent schema; adjust the construction of the IO.NodeOutput
return values to use the chosen common fallback (reference obj_result,
torch.zeros, download_url_to_file_3d and IO.NodeOutput to locate the code).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5c4af8d2-0181-4c7a-a0c1-3d7b7e70266e

📥 Commits

Reviewing files that changed from the base of the PR and between c033bbf and f9f297d.

📒 Files selected for processing (1)
  • comfy_api_nodes/nodes_hunyuan3d.py

@comfyui-wiki comfyui-wiki merged commit 9635c2e into master Apr 17, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants