diff --git a/src/composables/node/useNodePricing.ts b/src/composables/node/useNodePricing.ts index c1eedd3fe2..7c52385db3 100644 --- a/src/composables/node/useNodePricing.ts +++ b/src/composables/node/useNodePricing.ts @@ -966,20 +966,20 @@ const apiNodeCosts: Record = displayPrice: pixversePricingCalculator }, RecraftCreativeUpscaleNode: { - displayPrice: '$0.25/Run' + displayPrice: '$0.36/Run' }, RecraftCrispUpscaleNode: { - displayPrice: '$0.004/Run' + displayPrice: '$0.006/Run' }, RecraftGenerateColorFromImageNode: { displayPrice: (node: LGraphNode): string => { const nWidget = node.widgets?.find( (w) => w.name === 'n' ) as IComboWidget - if (!nWidget) return '$0.04 x n/Run' + if (!nWidget) return '$0.057 x n/Run' const n = Number(nWidget.value) || 1 - const cost = (0.04 * n).toFixed(2) + const cost = (0.057 * n).toFixed(2) return `$${cost}/Run` } }, @@ -988,10 +988,10 @@ const apiNodeCosts: Record = const nWidget = node.widgets?.find( (w) => w.name === 'n' ) as IComboWidget - if (!nWidget) return '$0.04 x n/Run' + if (!nWidget) return '$0.057 x n/Run' const n = Number(nWidget.value) || 1 - const cost = (0.04 * n).toFixed(2) + const cost = (0.057 * n).toFixed(2) return `$${cost}/Run` } }, @@ -1000,10 +1000,10 @@ const apiNodeCosts: Record = const nWidget = node.widgets?.find( (w) => w.name === 'n' ) as IComboWidget - if (!nWidget) return '$0.08 x n/Run' + if (!nWidget) return '$0.11 x n/Run' const n = Number(nWidget.value) || 1 - const cost = (0.08 * n).toFixed(2) + const cost = (0.11 * n).toFixed(2) return `$${cost}/Run` } }, @@ -1012,10 +1012,10 @@ const apiNodeCosts: Record = const nWidget = node.widgets?.find( (w) => w.name === 'n' ) as IComboWidget - if (!nWidget) return '$0.04 x n/Run' + if (!nWidget) return '$0.057 x n/Run' const n = Number(nWidget.value) || 1 - const cost = (0.04 * n).toFixed(2) + const cost = (0.057 * n).toFixed(2) return `$${cost}/Run` } }, @@ -1024,28 +1024,28 @@ const apiNodeCosts: Record = const nWidget = node.widgets?.find( (w) => w.name === 'n' ) as IComboWidget - if (!nWidget) return '$0.04 x n/Run' + if (!nWidget) return '$0.057 x n/Run' const n = Number(nWidget.value) || 1 - const cost = (0.04 * n).toFixed(2) + const cost = (0.057 * n).toFixed(2) return `$${cost}/Run` } }, RecraftRemoveBackgroundNode: { - displayPrice: '$0.01/Run' + displayPrice: '$0.014/Run' }, RecraftReplaceBackgroundNode: { - displayPrice: '$0.04/Run' + displayPrice: '$0.057/Run' }, RecraftTextToImageNode: { displayPrice: (node: LGraphNode): string => { const nWidget = node.widgets?.find( (w) => w.name === 'n' ) as IComboWidget - if (!nWidget) return '$0.04 x n/Run' + if (!nWidget) return '$0.057 x n/Run' const n = Number(nWidget.value) || 1 - const cost = (0.04 * n).toFixed(2) + const cost = (0.057 * n).toFixed(2) return `$${cost}/Run` } }, @@ -1054,10 +1054,10 @@ const apiNodeCosts: Record = const nWidget = node.widgets?.find( (w) => w.name === 'n' ) as IComboWidget - if (!nWidget) return '$0.08 x n/Run' + if (!nWidget) return '$0.11 x n/Run' const n = Number(nWidget.value) || 1 - const cost = (0.08 * n).toFixed(2) + const cost = (0.11 * n).toFixed(2) return `$${cost}/Run` } }, @@ -1066,10 +1066,10 @@ const apiNodeCosts: Record = const nWidget = node.widgets?.find( (w) => w.name === 'n' ) as IComboWidget - if (!nWidget) return '$0.01 x n/Run' + if (!nWidget) return '$0.014 x n/Run' const n = Number(nWidget.value) || 1 - const cost = (0.01 * n).toFixed(2) + const cost = (0.014 * n).toFixed(3) return `$${cost}/Run` } }, @@ -1209,16 +1209,16 @@ const apiNodeCosts: Record = ) as IComboWidget // If no length widget exists, default to 5s pricing - if (!lengthWidget) return '$1.50/Run' + if (!lengthWidget) return '$2.15/Run' const length = String(lengthWidget.value) if (length === '5s') { - return '$1.50/Run' + return '$2.15/Run' } else if (length === '10s') { - return '$3.00/Run' + return '$4.29/Run' } - return '$1.50/Run' + return '$2.15/Run' } }, MoonvalleyImg2VideoNode: { @@ -1228,16 +1228,16 @@ const apiNodeCosts: Record = ) as IComboWidget // If no length widget exists, default to 5s pricing - if (!lengthWidget) return '$1.50/Run' + if (!lengthWidget) return '$2.15/Run' const length = String(lengthWidget.value) if (length === '5s') { - return '$1.50/Run' + return '$2.15/Run' } else if (length === '10s') { - return '$3.00/Run' + return '$4.29/Run' } - return '$1.50/Run' + return '$2.15/Run' } }, MoonvalleyVideo2VideoNode: { @@ -1247,16 +1247,16 @@ const apiNodeCosts: Record = ) as IComboWidget // If no length widget exists, default to 5s pricing - if (!lengthWidget) return '$2.25/Run' + if (!lengthWidget) return '$3.22/Run' const length = String(lengthWidget.value) if (length === '5s') { - return '$2.25/Run' + return '$3.22/Run' } else if (length === '10s') { - return '$4.00/Run' + return '$5.72/Run' } - return '$2.25/Run' + return '$3.22/Run' } }, // Runway nodes - using actual node names from ComfyUI diff --git a/tests-ui/tests/composables/node/useNodePricing.test.ts b/tests-ui/tests/composables/node/useNodePricing.test.ts index 36697cbc8b..20290850c6 100644 --- a/tests-ui/tests/composables/node/useNodePricing.test.ts +++ b/tests-ui/tests/composables/node/useNodePricing.test.ts @@ -1204,7 +1204,7 @@ describe('useNodePricing', () => { ]) const price = getNodeDisplayPrice(node) - expect(price).toBe('$0.12/Run') // 0.04 * 3 + expect(price).toBe('$0.17/Run') // 0.057 * 3 }) it('should calculate dynamic pricing for RecraftTextToVectorNode based on n value', () => { @@ -1214,7 +1214,7 @@ describe('useNodePricing', () => { ]) const price = getNodeDisplayPrice(node) - expect(price).toBe('$0.16/Run') // 0.08 * 2 + expect(price).toBe('$0.22/Run') // 0.11 * 2 }) it('should fall back to static display when n widget is missing', () => { @@ -1222,7 +1222,7 @@ describe('useNodePricing', () => { const node = createMockNode('RecraftTextToImageNode', []) const price = getNodeDisplayPrice(node) - expect(price).toBe('$0.04 x n/Run') + expect(price).toBe('$0.057 x n/Run') }) it('should handle edge case when n value is 1', () => { @@ -1232,7 +1232,7 @@ describe('useNodePricing', () => { ]) const price = getNodeDisplayPrice(node) - expect(price).toBe('$0.04/Run') // 0.04 * 1 + expect(price).toBe('$0.06/Run') // 0.057 * 1 }) }) }) @@ -1312,7 +1312,7 @@ describe('useNodePricing', () => { ]) const price = getNodeDisplayPrice(node) - expect(price).toBe('$0.12/Run') // 0.04 * 3 + expect(price).toBe('$0.17/Run') // 0.057 * 3 }) it('should calculate dynamic pricing for RecraftVectorizeImageNode', () => { @@ -1322,7 +1322,7 @@ describe('useNodePricing', () => { ]) const price = getNodeDisplayPrice(node) - expect(price).toBe('$0.05/Run') // 0.01 * 5 + expect(price).toBe('$0.070/Run') // 0.014 * 5 }) it('should calculate dynamic pricing for RecraftGenerateVectorImageNode', () => { @@ -1332,7 +1332,7 @@ describe('useNodePricing', () => { ]) const price = getNodeDisplayPrice(node) - expect(price).toBe('$0.16/Run') // 0.08 * 2 + expect(price).toBe('$0.22/Run') // 0.11 * 2 }) })