[Partner Nodes] Tripo3D 3.1 model#13788
Conversation
Signed-off-by: bigcat88 <bigcat88@icloud.com>
Signed-off-by: bigcat88 <bigcat88@icloud.com>
📝 WalkthroughWalkthroughThis pull request updates the Tripo node implementation to enhance pricing transparency and refine polling behavior. The 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 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: 2
🤖 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`:
- Line 63: The price_extractor lambda currently uses a falsy check which treats
0 as absent; update the condition to check presence explicitly using "is not
None" on x.data.consumed_credit so a zero consumption yields 0.0 rather than
None—locate the price_extractor assignment (price_extractor=lambda x: ...) and
replace the falsy check with an explicit "is not None" check against
x.data.consumed_credit while keeping the multiplication by 0.01 when present.
- Around line 778-779: The USD badge calculation compares $texFmt to the
lowercase string "jpeg" while the texture_format widget emits uppercase values
(e.g. "JPEG"), so ($texFmt != "jpeg") is always true and forces $advanced
truthy; update the comparison to match the widget casing (compare $texFmt to
"JPEG" or normalize $texFmt via .toLowerCase() before comparing) in the
expression that produces {"type":"usd","usd": ($advanced ? 0.1 : 0.05),
"format": {"approximate": true}} so the badge correctly shows $0.05 for
non-advanced selections.
🪄 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: 054469c8-a88d-46ad-8903-6c88910cf17a
⛔ 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
…node Signed-off-by: bigcat88 <bigcat88@icloud.com>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
comfy_api_nodes/nodes_tripo.py (1)
63-63:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse
is not Noneinstead of a falsy check onconsumed_credit.
if x.data.consumed_credittreats0as absent, so a task that legitimately consumed zero credits will reportNoneto the price badge instead of0.0. Presence/absence and "zero cost" are semantically different signals here.🛠️ Proposed fix
- price_extractor=lambda x: x.data.consumed_credit * 0.01 if x.data.consumed_credit else None, + price_extractor=lambda x: x.data.consumed_credit * 0.01 if x.data.consumed_credit is not None 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 63, The lambda assigned to price_extractor incorrectly treats a zero consumed_credit as absent by using a falsy check; update the conditional to explicitly check for presence with "is not None" on x.data.consumed_credit so that 0 is preserved (e.g., use x.data.consumed_credit is not None) and return x.data.consumed_credit * 0.01 when present, otherwise None; locate the price_extractor lambda to apply this change.
🤖 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.
Duplicate comments:
In `@comfy_api_nodes/nodes_tripo.py`:
- Line 63: The lambda assigned to price_extractor incorrectly treats a zero
consumed_credit as absent by using a falsy check; update the conditional to
explicitly check for presence with "is not None" on x.data.consumed_credit so
that 0 is preserved (e.g., use x.data.consumed_credit is not None) and return
x.data.consumed_credit * 0.01 when present, otherwise None; locate the
price_extractor lambda to apply this change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 045a88ea-0862-4065-bc14-0e0a2f517ae3
📒 Files selected for processing (1)
comfy_api_nodes/nodes_tripo.py
API Node PR Checklist
Scope
Pricing & Billing
If Need pricing update:
QA
Comms