1
1
import { FloatFieldInput } from 'features/nodes/components/flow/nodes/Invocation/fields/FloatField/FloatFieldInput' ;
2
2
import { FloatFieldInputAndSlider } from 'features/nodes/components/flow/nodes/Invocation/fields/FloatField/FloatFieldInputAndSlider' ;
3
3
import { FloatFieldSlider } from 'features/nodes/components/flow/nodes/Invocation/fields/FloatField/FloatFieldSlider' ;
4
- import ChatGPT4oModelFieldInputComponent from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/ChatGPT4oModelFieldInputComponent' ;
5
4
import { FloatFieldCollectionInputComponent } from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/FloatFieldCollectionInputComponent' ;
6
5
import { FloatGeneratorFieldInputComponent } from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/FloatGeneratorFieldComponent' ;
7
- import FluxKontextModelFieldInputComponent from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/FluxKontextModelFieldInputComponent' ;
8
6
import { ImageFieldCollectionInputComponent } from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/ImageFieldCollectionInputComponent' ;
9
7
import { ImageGeneratorFieldInputComponent } from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/ImageGeneratorFieldComponent' ;
10
- import Imagen3ModelFieldInputComponent from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/Imagen3ModelFieldInputComponent' ;
11
- import Imagen4ModelFieldInputComponent from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/Imagen4ModelFieldInputComponent' ;
12
8
import { IntegerFieldCollectionInputComponent } from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/IntegerFieldCollectionInputComponent' ;
13
9
import { IntegerGeneratorFieldInputComponent } from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/IntegerGeneratorFieldComponent' ;
14
10
import ModelIdentifierFieldInputComponent from 'features/nodes/components/flow/nodes/Invocation/fields/inputs/ModelIdentifierFieldInputComponent' ;
@@ -27,22 +23,8 @@ import {
27
23
isBoardFieldInputTemplate ,
28
24
isBooleanFieldInputInstance ,
29
25
isBooleanFieldInputTemplate ,
30
- isChatGPT4oModelFieldInputInstance ,
31
- isChatGPT4oModelFieldInputTemplate ,
32
- isCLIPEmbedModelFieldInputInstance ,
33
- isCLIPEmbedModelFieldInputTemplate ,
34
- isCLIPGEmbedModelFieldInputInstance ,
35
- isCLIPGEmbedModelFieldInputTemplate ,
36
- isCLIPLEmbedModelFieldInputInstance ,
37
- isCLIPLEmbedModelFieldInputTemplate ,
38
- isCogView4MainModelFieldInputInstance ,
39
- isCogView4MainModelFieldInputTemplate ,
40
26
isColorFieldInputInstance ,
41
27
isColorFieldInputTemplate ,
42
- isControlLoRAModelFieldInputInstance ,
43
- isControlLoRAModelFieldInputTemplate ,
44
- isControlNetModelFieldInputInstance ,
45
- isControlNetModelFieldInputTemplate ,
46
28
isEnumFieldInputInstance ,
47
29
isEnumFieldInputTemplate ,
48
30
isFloatFieldCollectionInputInstance ,
@@ -51,68 +33,28 @@ import {
51
33
isFloatFieldInputTemplate ,
52
34
isFloatGeneratorFieldInputInstance ,
53
35
isFloatGeneratorFieldInputTemplate ,
54
- isFluxKontextModelFieldInputInstance ,
55
- isFluxKontextModelFieldInputTemplate ,
56
- isFluxMainModelFieldInputInstance ,
57
- isFluxMainModelFieldInputTemplate ,
58
- isFluxReduxModelFieldInputInstance ,
59
- isFluxReduxModelFieldInputTemplate ,
60
- isFluxVAEModelFieldInputInstance ,
61
- isFluxVAEModelFieldInputTemplate ,
62
36
isImageFieldCollectionInputInstance ,
63
37
isImageFieldCollectionInputTemplate ,
64
38
isImageFieldInputInstance ,
65
39
isImageFieldInputTemplate ,
66
40
isImageGeneratorFieldInputInstance ,
67
41
isImageGeneratorFieldInputTemplate ,
68
- isImagen3ModelFieldInputInstance ,
69
- isImagen3ModelFieldInputTemplate ,
70
- isImagen4ModelFieldInputInstance ,
71
- isImagen4ModelFieldInputTemplate ,
72
42
isIntegerFieldCollectionInputInstance ,
73
43
isIntegerFieldCollectionInputTemplate ,
74
44
isIntegerFieldInputInstance ,
75
45
isIntegerFieldInputTemplate ,
76
46
isIntegerGeneratorFieldInputInstance ,
77
47
isIntegerGeneratorFieldInputTemplate ,
78
- isIPAdapterModelFieldInputInstance ,
79
- isIPAdapterModelFieldInputTemplate ,
80
- isLLaVAModelFieldInputInstance ,
81
- isLLaVAModelFieldInputTemplate ,
82
- isLoRAModelFieldInputInstance ,
83
- isLoRAModelFieldInputTemplate ,
84
- isMainModelFieldInputInstance ,
85
- isMainModelFieldInputTemplate ,
86
48
isModelIdentifierFieldInputInstance ,
87
49
isModelIdentifierFieldInputTemplate ,
88
- isRunwayModelFieldInputInstance ,
89
- isRunwayModelFieldInputTemplate ,
90
50
isSchedulerFieldInputInstance ,
91
51
isSchedulerFieldInputTemplate ,
92
- isSD3MainModelFieldInputInstance ,
93
- isSD3MainModelFieldInputTemplate ,
94
- isSDXLMainModelFieldInputInstance ,
95
- isSDXLMainModelFieldInputTemplate ,
96
- isSDXLRefinerModelFieldInputInstance ,
97
- isSDXLRefinerModelFieldInputTemplate ,
98
- isSigLipModelFieldInputInstance ,
99
- isSigLipModelFieldInputTemplate ,
100
- isSpandrelImageToImageModelFieldInputInstance ,
101
- isSpandrelImageToImageModelFieldInputTemplate ,
102
52
isStringFieldCollectionInputInstance ,
103
53
isStringFieldCollectionInputTemplate ,
104
54
isStringFieldInputInstance ,
105
55
isStringFieldInputTemplate ,
106
56
isStringGeneratorFieldInputInstance ,
107
57
isStringGeneratorFieldInputTemplate ,
108
- isT2IAdapterModelFieldInputInstance ,
109
- isT2IAdapterModelFieldInputTemplate ,
110
- isT5EncoderModelFieldInputInstance ,
111
- isT5EncoderModelFieldInputTemplate ,
112
- isVAEModelFieldInputInstance ,
113
- isVAEModelFieldInputTemplate ,
114
- isVeo3ModelFieldInputInstance ,
115
- isVeo3ModelFieldInputTemplate ,
116
58
} from 'features/nodes/types/field' ;
117
59
import type { NodeFieldElement } from 'features/nodes/types/workflow' ;
118
60
import { memo } from 'react' ;
@@ -121,33 +63,10 @@ import { assert } from 'tsafe';
121
63
122
64
import BoardFieldInputComponent from './inputs/BoardFieldInputComponent' ;
123
65
import BooleanFieldInputComponent from './inputs/BooleanFieldInputComponent' ;
124
- import CLIPEmbedModelFieldInputComponent from './inputs/CLIPEmbedModelFieldInputComponent' ;
125
- import CLIPGEmbedModelFieldInputComponent from './inputs/CLIPGEmbedModelFieldInputComponent' ;
126
- import CLIPLEmbedModelFieldInputComponent from './inputs/CLIPLEmbedModelFieldInputComponent' ;
127
- import CogView4MainModelFieldInputComponent from './inputs/CogView4MainModelFieldInputComponent' ;
128
66
import ColorFieldInputComponent from './inputs/ColorFieldInputComponent' ;
129
- import ControlLoRAModelFieldInputComponent from './inputs/ControlLoraModelFieldInputComponent' ;
130
- import ControlNetModelFieldInputComponent from './inputs/ControlNetModelFieldInputComponent' ;
131
67
import EnumFieldInputComponent from './inputs/EnumFieldInputComponent' ;
132
- import FluxMainModelFieldInputComponent from './inputs/FluxMainModelFieldInputComponent' ;
133
- import FluxReduxModelFieldInputComponent from './inputs/FluxReduxModelFieldInputComponent' ;
134
- import FluxVAEModelFieldInputComponent from './inputs/FluxVAEModelFieldInputComponent' ;
135
68
import ImageFieldInputComponent from './inputs/ImageFieldInputComponent' ;
136
- import IPAdapterModelFieldInputComponent from './inputs/IPAdapterModelFieldInputComponent' ;
137
- import LLaVAModelFieldInputComponent from './inputs/LLaVAModelFieldInputComponent' ;
138
- import LoRAModelFieldInputComponent from './inputs/LoRAModelFieldInputComponent' ;
139
- import MainModelFieldInputComponent from './inputs/MainModelFieldInputComponent' ;
140
- import RefinerModelFieldInputComponent from './inputs/RefinerModelFieldInputComponent' ;
141
- import RunwayModelFieldInputComponent from './inputs/RunwayModelFieldInputComponent' ;
142
69
import SchedulerFieldInputComponent from './inputs/SchedulerFieldInputComponent' ;
143
- import SD3MainModelFieldInputComponent from './inputs/SD3MainModelFieldInputComponent' ;
144
- import SDXLMainModelFieldInputComponent from './inputs/SDXLMainModelFieldInputComponent' ;
145
- import SigLipModelFieldInputComponent from './inputs/SigLipModelFieldInputComponent' ;
146
- import SpandrelImageToImageModelFieldInputComponent from './inputs/SpandrelImageToImageModelFieldInputComponent' ;
147
- import T2IAdapterModelFieldInputComponent from './inputs/T2IAdapterModelFieldInputComponent' ;
148
- import T5EncoderModelFieldInputComponent from './inputs/T5EncoderModelFieldInputComponent' ;
149
- import VAEModelFieldInputComponent from './inputs/VAEModelFieldInputComponent' ;
150
- import Veo3ModelFieldInputComponent from './inputs/Veo3ModelFieldInputComponent' ;
151
70
152
71
type Props = {
153
72
nodeId : string ;
@@ -287,208 +206,20 @@ export const InputFieldRenderer = memo(({ nodeId, fieldName, settings }: Props)
287
206
return < BoardFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
288
207
}
289
208
290
- if ( isMainModelFieldInputTemplate ( template ) ) {
291
- if ( ! isMainModelFieldInputInstance ( field ) ) {
292
- return null ;
293
- }
294
- return < MainModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
295
- }
296
-
297
209
if ( isModelIdentifierFieldInputTemplate ( template ) ) {
298
210
if ( ! isModelIdentifierFieldInputInstance ( field ) ) {
299
211
return null ;
300
212
}
301
213
return < ModelIdentifierFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
302
214
}
303
215
304
- if ( isSDXLRefinerModelFieldInputTemplate ( template ) ) {
305
- if ( ! isSDXLRefinerModelFieldInputInstance ( field ) ) {
306
- return null ;
307
- }
308
- return < RefinerModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
309
- }
310
-
311
- if ( isVAEModelFieldInputTemplate ( template ) ) {
312
- if ( ! isVAEModelFieldInputInstance ( field ) ) {
313
- return null ;
314
- }
315
- return < VAEModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
316
- }
317
-
318
- if ( isT5EncoderModelFieldInputTemplate ( template ) ) {
319
- if ( ! isT5EncoderModelFieldInputInstance ( field ) ) {
320
- return null ;
321
- }
322
- return < T5EncoderModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
323
- }
324
- if ( isCLIPEmbedModelFieldInputTemplate ( template ) ) {
325
- if ( ! isCLIPEmbedModelFieldInputInstance ( field ) ) {
326
- return null ;
327
- }
328
- return < CLIPEmbedModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
329
- }
330
-
331
- if ( isCLIPLEmbedModelFieldInputTemplate ( template ) ) {
332
- if ( ! isCLIPLEmbedModelFieldInputInstance ( field ) ) {
333
- return null ;
334
- }
335
- return < CLIPLEmbedModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
336
- }
337
-
338
- if ( isCLIPGEmbedModelFieldInputTemplate ( template ) ) {
339
- if ( ! isCLIPGEmbedModelFieldInputInstance ( field ) ) {
340
- return null ;
341
- }
342
- return < CLIPGEmbedModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
343
- }
344
-
345
- if ( isControlLoRAModelFieldInputTemplate ( template ) ) {
346
- if ( ! isControlLoRAModelFieldInputInstance ( field ) ) {
347
- return null ;
348
- }
349
- return < ControlLoRAModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
350
- }
351
-
352
- if ( isLLaVAModelFieldInputTemplate ( template ) ) {
353
- if ( ! isLLaVAModelFieldInputInstance ( field ) ) {
354
- return null ;
355
- }
356
- return < LLaVAModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
357
- }
358
-
359
- if ( isFluxVAEModelFieldInputTemplate ( template ) ) {
360
- if ( ! isFluxVAEModelFieldInputInstance ( field ) ) {
361
- return null ;
362
- }
363
- return < FluxVAEModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
364
- }
365
-
366
- if ( isLoRAModelFieldInputTemplate ( template ) ) {
367
- if ( ! isLoRAModelFieldInputInstance ( field ) ) {
368
- return null ;
369
- }
370
- return < LoRAModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
371
- }
372
-
373
- if ( isControlNetModelFieldInputTemplate ( template ) ) {
374
- if ( ! isControlNetModelFieldInputInstance ( field ) ) {
375
- return null ;
376
- }
377
- return < ControlNetModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
378
- }
379
-
380
- if ( isIPAdapterModelFieldInputTemplate ( template ) ) {
381
- if ( ! isIPAdapterModelFieldInputInstance ( field ) ) {
382
- return null ;
383
- }
384
- return < IPAdapterModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
385
- }
386
-
387
- if ( isT2IAdapterModelFieldInputTemplate ( template ) ) {
388
- if ( ! isT2IAdapterModelFieldInputInstance ( field ) ) {
389
- return null ;
390
- }
391
- return < T2IAdapterModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
392
- }
393
-
394
- if ( isSpandrelImageToImageModelFieldInputTemplate ( template ) ) {
395
- if ( ! isSpandrelImageToImageModelFieldInputInstance ( field ) ) {
396
- return null ;
397
- }
398
- return < SpandrelImageToImageModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
399
- }
400
-
401
- if ( isSigLipModelFieldInputTemplate ( template ) ) {
402
- if ( ! isSigLipModelFieldInputInstance ( field ) ) {
403
- return null ;
404
- }
405
- return < SigLipModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
406
- }
407
-
408
- if ( isFluxReduxModelFieldInputTemplate ( template ) ) {
409
- if ( ! isFluxReduxModelFieldInputInstance ( field ) ) {
410
- return null ;
411
- }
412
- return < FluxReduxModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
413
- }
414
-
415
- if ( isImagen3ModelFieldInputTemplate ( template ) ) {
416
- if ( ! isImagen3ModelFieldInputInstance ( field ) ) {
417
- return null ;
418
- }
419
- return < Imagen3ModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
420
- }
421
-
422
- if ( isImagen4ModelFieldInputTemplate ( template ) ) {
423
- if ( ! isImagen4ModelFieldInputInstance ( field ) ) {
424
- return null ;
425
- }
426
- return < Imagen4ModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
427
- }
428
-
429
- if ( isFluxKontextModelFieldInputTemplate ( template ) ) {
430
- if ( ! isFluxKontextModelFieldInputInstance ( field ) ) {
431
- return null ;
432
- }
433
- return < FluxKontextModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
434
- }
435
-
436
- if ( isChatGPT4oModelFieldInputTemplate ( template ) ) {
437
- if ( ! isChatGPT4oModelFieldInputInstance ( field ) ) {
438
- return null ;
439
- }
440
- return < ChatGPT4oModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
441
- }
442
-
443
- if ( isVeo3ModelFieldInputTemplate ( template ) ) {
444
- if ( ! isVeo3ModelFieldInputInstance ( field ) ) {
445
- return null ;
446
- }
447
- return < Veo3ModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
448
- }
449
-
450
- if ( isRunwayModelFieldInputTemplate ( template ) ) {
451
- if ( ! isRunwayModelFieldInputInstance ( field ) ) {
452
- return null ;
453
- }
454
- return < RunwayModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
455
- }
456
-
457
216
if ( isColorFieldInputTemplate ( template ) ) {
458
217
if ( ! isColorFieldInputInstance ( field ) ) {
459
218
return null ;
460
219
}
461
220
return < ColorFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
462
221
}
463
222
464
- if ( isFluxMainModelFieldInputTemplate ( template ) ) {
465
- if ( ! isFluxMainModelFieldInputInstance ( field ) ) {
466
- return null ;
467
- }
468
- return < FluxMainModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
469
- }
470
-
471
- if ( isSD3MainModelFieldInputTemplate ( template ) ) {
472
- if ( ! isSD3MainModelFieldInputInstance ( field ) ) {
473
- return null ;
474
- }
475
- return < SD3MainModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
476
- }
477
-
478
- if ( isCogView4MainModelFieldInputTemplate ( template ) ) {
479
- if ( ! isCogView4MainModelFieldInputInstance ( field ) ) {
480
- return null ;
481
- }
482
- return < CogView4MainModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
483
- }
484
-
485
- if ( isSDXLMainModelFieldInputTemplate ( template ) ) {
486
- if ( ! isSDXLMainModelFieldInputInstance ( field ) ) {
487
- return null ;
488
- }
489
- return < SDXLMainModelFieldInputComponent nodeId = { nodeId } field = { field } fieldTemplate = { template } /> ;
490
- }
491
-
492
223
if ( isSchedulerFieldInputTemplate ( template ) ) {
493
224
if ( ! isSchedulerFieldInputInstance ( field ) ) {
494
225
return null ;
0 commit comments