Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/composables/node/useNodePricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,25 @@ const byteDanceVideoPricingCalculator = (node: LGraphNode): string => {
'720p': [0.51, 0.56],
'1080p': [1.18, 1.22]
},
'seedance-1-0-pro-fast': {
'480p': [0.09, 0.1],
'720p': [0.21, 0.23],
'1080p': [0.47, 0.49]
},
Comment on lines +134 to +138
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, let's examine the useNodePricing.ts file to see the full context
wc -l src/composables/node/useNodePricing.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 113


🏁 Script executed:

#!/bin/bash
# Read the relevant sections of the file
sed -n '130,160p' src/composables/node/useNodePricing.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 820


🏁 Script executed:

#!/bin/bash
# Let's check if there are any comments or documentation about pricing in the file
head -50 src/composables/node/useNodePricing.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1561


🏁 Script executed:

#!/bin/bash
# Search for any references to ByteDance or seedance pricing documentation
rg -n "seedance|ByteDance|pricing" src/composables/node/useNodePricing.ts | head -20

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1095


🏁 Script executed:

#!/bin/bash
# Check if there are any test files or related documentation
fd -e test.ts -e spec.ts -e test.js useNodePricing

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 124


🏁 Script executed:

#!/bin/bash
# Let's check the git history or PR context if available
git log --oneline -n 20 src/composables/node/useNodePricing.ts 2>/dev/null | head -20

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 156


🏁 Script executed:

#!/bin/bash
# Let's examine the test file to see if pricing values are tested
cat -n tests-ui/tests/composables/node/useNodePricing.test.ts | head -100

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 3846


🏁 Script executed:

#!/bin/bash
# Search for seedance tests specifically
rg -n "seedance-1-0-pro-fast" tests-ui/tests/composables/node/useNodePricing.test.ts -A 3 -B 3

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 52


🏁 Script executed:

#!/bin/bash
# Let's get more details about the commit
git show cfa9369c --stat

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 50383


🏁 Script executed:

#!/bin/bash
# Search for seedance tests in the test file more thoroughly
rg -n "seedance" tests-ui/tests/composables/node/useNodePricing.test.ts -C 5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 3286


🏁 Script executed:

#!/bin/bash
# Check if there are any recent changes to ByteDance pricing documentation or links
rg -n "seedance|ByteDance" . --type ts -g "!node_modules" -g "!dist" | head -30

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 2841


🏁 Script executed:

#!/bin/bash
# Verify the complete pricing entry structure in context
sed -n '125,160p' src/composables/node/useNodePricing.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1102


🏁 Script executed:

#!/bin/bash
# Search for any tests that might cover seedance-1-0-pro-fast specifically
rg -n "seedance-1-0-pro-fast" tests-ui/ -C 3

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 52


🏁 Script executed:

#!/bin/bash
# Check the pricing calculation logic to understand how duration/resolution are applied
sed -n '156,200p' src/composables/node/useNodePricing.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1452


Add test coverage for seedance-1-0-pro-fast pricing; verify values against ByteDance documentation.

The pricing entry is well-structured and properly integrated. The seedance-1-0-pro-fast tier (480p: [$0.09, $0.10], 720p: [$0.21, $0.23], 1080p: [$0.47, $0.49]) is positioned reasonably between the standard pro (roughly 2.5× more expensive) and lite variants.

However, tests exist for seedance-1-0-pro and seedance-1-0-lite in the test file, but there are no tests for the new seedance-1-0-pro-fast variant. Add test cases to verify pricing calculations for this tier to match the coverage of other ByteDance models.

Additionally, verify these pricing values against official ByteDance documentation or the referenced external PR (comfyanonymous/ComfyUI#10947) to ensure accuracy.

🤖 Prompt for AI Agents
In src/composables/node/useNodePricing.ts around lines 134 to 138, add unit
tests for the new seedance-1-0-pro-fast pricing similar to the existing tests
for seedance-1-0-pro and seedance-1-0-lite: create test cases that assert the
stored price arrays for '480p', '720p', and '1080p' equal [0.09,0.10],
[0.21,0.23], and [0.47,0.49] respectively, and assert any derived calculation
helpers yield expected outputs; place these tests alongside the existing
ByteDance model tests in the same test file and run them, and before committing
confirm the numeric values match ByteDance official docs or the referenced PR
(https://github.com/comfyanonymous/ComfyUI/pull/10947) and update tests if the
authoritative source differs.

'seedance-1-0-lite': {
'480p': [0.17, 0.18],
'720p': [0.37, 0.41],
'1080p': [0.85, 0.88]
}
}

const modelKey = model.includes('seedance-1-0-pro')
? 'seedance-1-0-pro'
: model.includes('seedance-1-0-lite')
? 'seedance-1-0-lite'
: ''
const modelKey = model.includes('seedance-1-0-pro-fast')
? 'seedance-1-0-pro-fast'
: model.includes('seedance-1-0-pro')
? 'seedance-1-0-pro'
: model.includes('seedance-1-0-lite')
? 'seedance-1-0-lite'
: ''

const resKey = resolution.includes('1080')
? '1080p'
Expand Down
Loading