From c9da19b5b59d33216fb8a66c58955f675a6fe3d0 Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Tue, 25 Nov 2025 21:56:39 +0200 Subject: [PATCH] feat(api-nodes-pricing): add prices for Veo3FirstLastFrameNode (#6920) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Price badges for this PR: https://github.com/comfyanonymous/ComfyUI/pull/10878 If we can include this in an upcoming release, that would be absolutely great. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6920-feat-api-nodes-pricing-add-prices-for-Veo3FirstLastFrameNode-2b66d73d365081bdb49be98d953a7a0b) by [Unito](https://www.unito.io) --- src/composables/node/useNodePricing.ts | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/composables/node/useNodePricing.ts b/src/composables/node/useNodePricing.ts index a2cd014d86..8e9811e37c 100644 --- a/src/composables/node/useNodePricing.ts +++ b/src/composables/node/useNodePricing.ts @@ -1237,6 +1237,40 @@ const apiNodeCosts: Record = return '$0.80-3.20/Run' } }, + Veo3FirstLastFrameNode: { + displayPrice: (node: LGraphNode): string => { + const modelWidget = node.widgets?.find( + (w) => w.name === 'model' + ) as IComboWidget + const generateAudioWidget = node.widgets?.find( + (w) => w.name === 'generate_audio' + ) as IComboWidget + const durationWidget = node.widgets?.find( + (w) => w.name === 'duration' + ) as IComboWidget + + if (!modelWidget || !generateAudioWidget || !durationWidget) { + return '$0.40-3.20/Run (varies with model & audio generation)' + } + + const model = String(modelWidget.value) + const generateAudio = + String(generateAudioWidget.value).toLowerCase() === 'true' + const seconds = parseFloat(String(durationWidget.value)) + + let pricePerSecond: number | null = null + if (model.includes('veo-3.1-fast-generate')) { + pricePerSecond = generateAudio ? 0.15 : 0.1 + } else if (model.includes('veo-3.1-generate')) { + pricePerSecond = generateAudio ? 0.4 : 0.2 + } + if (pricePerSecond === null) { + return '$0.40-3.20/Run' + } + const cost = pricePerSecond * seconds + return `$${cost.toFixed(2)}/Run` + } + }, LumaImageNode: { displayPrice: (node: LGraphNode): string => { const modelWidget = node.widgets?.find( @@ -1852,6 +1886,7 @@ export const useNodePricing = () => { Flux2ProImageNode: ['width', 'height', 'images'], VeoVideoGenerationNode: ['duration_seconds'], Veo3VideoGenerationNode: ['model', 'generate_audio'], + Veo3FirstLastFrameNode: ['model', 'generate_audio', 'duration'], LumaVideoNode: ['model', 'resolution', 'duration'], LumaImageToVideoNode: ['model', 'resolution', 'duration'], LumaImageNode: ['model', 'aspect_ratio'],