@@ -179,6 +179,14 @@ const apiNodeCosts: Record<string, { displayPrice: string | PricingFunction }> =
179
179
const numImagesWidget = node . widgets ?. find (
180
180
( w ) => w . name === 'num_images'
181
181
) as IComboWidget
182
+ const characterInput = node . inputs ?. find (
183
+ ( i ) => i . name === 'character_image'
184
+ ) as any
185
+ const hasCharacter =
186
+ ( typeof characterInput ?. link !== 'undefined' &&
187
+ characterInput . link != null ) ||
188
+ ( Array . isArray ( characterInput ?. links ) &&
189
+ characterInput . links . length > 0 )
182
190
183
191
if ( ! renderingSpeedWidget )
184
192
return '$0.03-0.08 x num_images/Run (varies with rendering speed & num_images)'
@@ -188,11 +196,23 @@ const apiNodeCosts: Record<string, { displayPrice: string | PricingFunction }> =
188
196
189
197
const renderingSpeed = String ( renderingSpeedWidget . value )
190
198
if ( renderingSpeed . toLowerCase ( ) . includes ( 'quality' ) ) {
191
- basePrice = 0.09
199
+ if ( hasCharacter ) {
200
+ basePrice = 0.2
201
+ } else {
202
+ basePrice = 0.09
203
+ }
192
204
} else if ( renderingSpeed . toLowerCase ( ) . includes ( 'balanced' ) ) {
193
- basePrice = 0.06
205
+ if ( hasCharacter ) {
206
+ basePrice = 0.15
207
+ } else {
208
+ basePrice = 0.06
209
+ }
194
210
} else if ( renderingSpeed . toLowerCase ( ) . includes ( 'turbo' ) ) {
195
- basePrice = 0.03
211
+ if ( hasCharacter ) {
212
+ basePrice = 0.1
213
+ } else {
214
+ basePrice = 0.03
215
+ }
196
216
}
197
217
198
218
const totalCost = ( basePrice * numImages ) . toFixed ( 2 )
@@ -1427,7 +1447,7 @@ export const useNodePricing = () => {
1427
1447
OpenAIGPTImage1 : [ 'quality' , 'n' ] ,
1428
1448
IdeogramV1 : [ 'num_images' , 'turbo' ] ,
1429
1449
IdeogramV2 : [ 'num_images' , 'turbo' ] ,
1430
- IdeogramV3 : [ 'rendering_speed' , 'num_images' ] ,
1450
+ IdeogramV3 : [ 'rendering_speed' , 'num_images' , 'character_image' ] ,
1431
1451
FluxProKontextProNode : [ ] ,
1432
1452
FluxProKontextMaxNode : [ ] ,
1433
1453
VeoVideoGenerationNode : [ 'duration_seconds' ] ,
0 commit comments