@@ -46,38 +46,6 @@ class UIType(str, Enum, metaclass=MetaEnum):
46
46
used, and the type will be ignored. They are included here for backwards compatibility.
47
47
"""
48
48
49
- # region Quasi-deprecated Model Field Types - use ui_model_[base|type|variant] instead
50
- MainModel = "MainModelField"
51
- CogView4MainModel = "CogView4MainModelField"
52
- FluxMainModel = "FluxMainModelField"
53
- SD3MainModel = "SD3MainModelField"
54
- SDXLMainModel = "SDXLMainModelField"
55
- SDXLRefinerModel = "SDXLRefinerModelField"
56
- ONNXModel = "ONNXModelField"
57
- VAEModel = "VAEModelField"
58
- FluxVAEModel = "FluxVAEModelField"
59
- LoRAModel = "LoRAModelField"
60
- ControlNetModel = "ControlNetModelField"
61
- IPAdapterModel = "IPAdapterModelField"
62
- T2IAdapterModel = "T2IAdapterModelField"
63
- T5EncoderModel = "T5EncoderModelField"
64
- CLIPEmbedModel = "CLIPEmbedModelField"
65
- CLIPLEmbedModel = "CLIPLEmbedModelField"
66
- CLIPGEmbedModel = "CLIPGEmbedModelField"
67
- SpandrelImageToImageModel = "SpandrelImageToImageModelField"
68
- ControlLoRAModel = "ControlLoRAModelField"
69
- SigLipModel = "SigLipModelField"
70
- FluxReduxModel = "FluxReduxModelField"
71
- LlavaOnevisionModel = "LLaVAModelField"
72
- Imagen3Model = "Imagen3ModelField"
73
- Imagen4Model = "Imagen4ModelField"
74
- ChatGPT4oModel = "ChatGPT4oModelField"
75
- Gemini2_5Model = "Gemini2_5ModelField"
76
- FluxKontextModel = "FluxKontextModelField"
77
- Veo3Model = "Veo3ModelField"
78
- RunwayModel = "RunwayModelField"
79
- # endregion
80
-
81
49
# region Misc Field Types
82
50
Scheduler = "SchedulerField"
83
51
Any = "AnyField"
@@ -130,6 +98,38 @@ class UIType(str, Enum, metaclass=MetaEnum):
130
98
MetadataItemPolymorphic = "DEPRECATED_MetadataItemPolymorphic"
131
99
MetadataDict = "DEPRECATED_MetadataDict"
132
100
101
+ # Deprecated Model Field Types - use ui_model_[base|type|variant|format] instead
102
+ MainModel = "DEPRECATED_MainModelField"
103
+ CogView4MainModel = "DEPRECATED_CogView4MainModelField"
104
+ FluxMainModel = "DEPRECATED_FluxMainModelField"
105
+ SD3MainModel = "DEPRECATED_SD3MainModelField"
106
+ SDXLMainModel = "DEPRECATED_SDXLMainModelField"
107
+ SDXLRefinerModel = "DEPRECATED_SDXLRefinerModelField"
108
+ ONNXModel = "DEPRECATED_ONNXModelField"
109
+ VAEModel = "DEPRECATED_VAEModelField"
110
+ FluxVAEModel = "DEPRECATED_FluxVAEModelField"
111
+ LoRAModel = "DEPRECATED_LoRAModelField"
112
+ ControlNetModel = "DEPRECATED_ControlNetModelField"
113
+ IPAdapterModel = "DEPRECATED_IPAdapterModelField"
114
+ T2IAdapterModel = "DEPRECATED_T2IAdapterModelField"
115
+ T5EncoderModel = "DEPRECATED_T5EncoderModelField"
116
+ CLIPEmbedModel = "DEPRECATED_CLIPEmbedModelField"
117
+ CLIPLEmbedModel = "DEPRECATED_CLIPLEmbedModelField"
118
+ CLIPGEmbedModel = "DEPRECATED_CLIPGEmbedModelField"
119
+ SpandrelImageToImageModel = "DEPRECATED_SpandrelImageToImageModelField"
120
+ ControlLoRAModel = "DEPRECATED_ControlLoRAModelField"
121
+ SigLipModel = "DEPRECATED_SigLipModelField"
122
+ FluxReduxModel = "DEPRECATED_FluxReduxModelField"
123
+ LlavaOnevisionModel = "DEPRECATED_LLaVAModelField"
124
+ Imagen3Model = "DEPRECATED_Imagen3ModelField"
125
+ Imagen4Model = "DEPRECATED_Imagen4ModelField"
126
+ ChatGPT4oModel = "DEPRECATED_ChatGPT4oModelField"
127
+ Gemini2_5Model = "DEPRECATED_Gemini2_5ModelField"
128
+ FluxKontextModel = "DEPRECATED_FluxKontextModelField"
129
+ Veo3Model = "DEPRECATED_Veo3ModelField"
130
+ RunwayModel = "DEPRECATED_RunwayModelField"
131
+ # endregion
132
+
133
133
134
134
class UIComponent (str , Enum , metaclass = MetaEnum ):
135
135
"""
@@ -581,8 +581,8 @@ def InputField(
581
581
or ui_model_variant is not None
582
582
or ui_model_format is not None
583
583
):
584
- logger .warning ("InputField: Use either ui_type or ui_model_[base|type|variant]. Ignoring ui_type." )
585
- # Map old-style UIType to new-style ui_model_[base|type|variant]
584
+ logger .warning ("InputField: Use either ui_type or ui_model_[base|type|variant|format ]. Ignoring ui_type." )
585
+ # Map old-style UIType to new-style ui_model_[base|type|variant|format ]
586
586
elif ui_type is UIType .MainModel :
587
587
json_schema_extra_ .ui_model_type = [ModelType .Main ]
588
588
elif ui_type is UIType .CogView4MainModel :
@@ -790,25 +790,20 @@ def OutputField(
790
790
"""
791
791
Creates an output field for an invocation output.
792
792
793
- This is a wrapper for Pydantic's [Field](https://docs.pydantic.dev/1.10/usage/schema/#field-customization) \
793
+ This is a wrapper for Pydantic's [Field](https://docs.pydantic.dev/1.10/usage/schema/#field-customization)
794
794
that adds a few extra parameters to support graph execution and the node editor UI.
795
795
796
- :param UIType ui_type: [None] DEPRECATED Optionally provides an extra type hint for the UI. \
797
- In some situations, the field's type is not enough to infer the correct UI type. \
798
- For example, model selection fields should render a dropdown UI component to select a model. \
799
- Internally, there is no difference between SD-1, SD-2 and SDXL model fields, they all use \
800
- `MainModelField`. So to ensure the base-model-specific UI is rendered, you can use \
801
- `UIType.SDXLMainModelField` to indicate that the field is an SDXL main model field.
796
+ Args:
797
+ ui_type: **DEPRECATED** Optionally provides an extra type hint for the UI. This parameter is no longer used.
802
798
803
- :param bool ui_hidden: [False] Specifies whether or not this field should be hidden in the UI. \
799
+ ui_hidden: Specifies whether or not this field should be hidden in the UI.
804
800
805
- :param int ui_order: [None] Specifies the order in which this field should be rendered in the UI. \
801
+ ui_order: Specifies the order in which this field should be rendered in the UI. If omitted, the field will be
802
+ rendered after all fields with an explicit order, in the order they are defined in the Invocation class.
806
803
"""
807
804
808
805
if ui_type is not None :
809
- logger .warning (
810
- "OutputField: 'ui_type' is deprecated. Use 'ui_model_[base|type|variant]' in InputField instead."
811
- )
806
+ logger .warning ("OutputField: 'ui_type' is deprecated." )
812
807
813
808
return Field (
814
809
default = default ,
0 commit comments