[Partner Nodes] feat(Tripo3d): add new "Import 3D" node#14466
Conversation
Signed-off-by: bigcat88 <bigcat88@icloud.com>
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
comfy_api_nodes/nodes_tripo.py (1)
598-598: 💤 Low valueAvoid calling
.strip()twice.The stripped value is computed twice. Consider caching it for efficiency.
♻️ Proposed refactor
+ stripped_prompt = texture_prompt.strip() response = await sync_op( cls, endpoint=ApiEndpoint(path="/proxy/tripo/v2/openapi/task", method="POST"), response_model=TripoTaskResponse, data=TripoTextureModelRequest( original_model_task_id=model_task_id, texture=texture, pbr=pbr, texture_seed=texture_seed, texture_quality=texture_quality, texture_alignment=texture_alignment, - texture_prompt=TripoTexturePrompt(text=texture_prompt.strip()) if texture_prompt.strip() else None, + texture_prompt=TripoTexturePrompt(text=stripped_prompt) if stripped_prompt else None, ), )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@comfy_api_nodes/nodes_tripo.py` at line 598, The texture_prompt.strip() method is being called twice on the same line - once in the conditional check and once when creating the TripoTexturePrompt object. Cache the stripped value in a temporary variable (such as stripped_texture_prompt) before the conditional statement, then use that cached variable both in the condition and as the argument to TripoTexturePrompt to avoid redundant string operations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@comfy_api_nodes/nodes_tripo.py`:
- Around line 995-1009: The poll_op call at line 995 is missing the
completed_statuses parameter, which causes polling to continue until
max_poll_attempts exhausts when tasks enter terminal failure states like
UNKNOWN, BANNED, or EXPIRED instead of failing immediately. Add the
completed_statuses=[TripoTaskStatus.SUCCESS] parameter to the poll_op function
call to explicitly define terminal success states and match the polling pattern
used elsewhere, ensuring deterministic behavior for all terminal states.
---
Nitpick comments:
In `@comfy_api_nodes/nodes_tripo.py`:
- Line 598: The texture_prompt.strip() method is being called twice on the same
line - once in the conditional check and once when creating the
TripoTexturePrompt object. Cache the stripped value in a temporary variable
(such as stripped_texture_prompt) before the conditional statement, then use
that cached variable both in the condition and as the argument to
TripoTexturePrompt to avoid redundant string operations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3609300c-8507-48e6-bc12-565f463b36e9
⛔ Files ignored due to path filters (1)
comfy_api_nodes/apis/tripo.pyis excluded by!comfy_api_nodes/apis/**
📒 Files selected for processing (1)
comfy_api_nodes/nodes_tripo.py
PR adds new node for these endpoints: https://platform.tripo3d.ai/docs/upload-sts and https://platform.tripo3d.ai/docs/import-model
New node is free, and allows to process existing 3D models with Tripo API (rig, re-target rigged, ..)
API Node PR Checklist
Scope
Pricing & Billing
If Need pricing update:
QA
Comms