@@ -80,7 +80,8 @@ class Arch(Enum):
8080 sd3 = "SD 3"
8181 flux = "Flux"
8282 flux_k = "Flux Kontext"
83- flux2 = "Flux 2 Klein 4B"
83+ flux2_4b = "Flux 2 Klein 4B"
84+ flux2_9b = "Flux 2 Klein 9B"
8485 illu = "Illustrious"
8586 illu_v = "Illustrious v-prediction"
8687 chroma = "Chroma"
@@ -109,7 +110,9 @@ def from_string(string: str, model_type: str = "eps", filename: str | None = Non
109110 if string == "flux" or string == "flux-schnell" :
110111 return Arch .flux
111112 if string == "flux2" and model_type == "klein-4b" :
112- return Arch .flux2
113+ return Arch .flux2_4b
114+ if string == "flux2" and model_type == "klein-9b" :
115+ return Arch .flux2_9b
113116 if string == "illu" :
114117 return Arch .illu
115118 if string == "illu_v" :
@@ -190,7 +193,7 @@ def is_edit(self): # edit models make changes to input images
190193
191194 @property
192195 def supports_edit (self ): # includes text-to-image models that can also edit
193- return self .is_edit or self is Arch . flux2
196+ return self .is_edit or self . is_flux2
194197
195198 @property
196199 def is_sdxl_like (self ):
@@ -201,6 +204,10 @@ def is_sdxl_like(self):
201204 def is_flux_like (self ):
202205 return self in [Arch .flux , Arch .flux_k ]
203206
207+ @property
208+ def is_flux2 (self ):
209+ return self in [Arch .flux2_4b , Arch .flux2_9b ]
210+
204211 @property
205212 def is_qwen_like (self ):
206213 return self in [Arch .qwen , Arch .qwen_e , Arch .qwen_e_p , Arch .qwen_l ]
@@ -216,12 +223,16 @@ def text_encoders(self):
216223 return ["clip_l" , "clip_g" ]
217224 case Arch .flux | Arch .flux_k :
218225 return ["clip_l" , "t5" ]
226+ case Arch .flux2_4b :
227+ return ["qwen_3_4b" ]
228+ case Arch .flux2_9b :
229+ return ["qwen_3_8b" ]
219230 case Arch .chroma :
220231 return ["t5" ]
221232 case Arch .qwen | Arch .qwen_e | Arch .qwen_e_p | Arch .qwen_l :
222233 return ["qwen" ]
223- case Arch .zimage | Arch . flux2 :
224- return ["qwen_3 " ]
234+ case Arch .zimage :
235+ return ["qwen_3_4b " ]
225236 raise ValueError (f"Unsupported architecture: { self } " )
226237
227238 @staticmethod
@@ -232,7 +243,8 @@ def list():
232243 Arch .sd3 ,
233244 Arch .flux ,
234245 Arch .flux_k ,
235- Arch .flux2 ,
246+ Arch .flux2_4b ,
247+ Arch .flux2_9b ,
236248 Arch .illu ,
237249 Arch .illu_v ,
238250 Arch .chroma ,
@@ -753,15 +765,17 @@ def is_required(kind: ResourceKind, arch: Arch, identifier: ControlMode | Upscal
753765 resource_id (ResourceKind .text_encoder , Arch .all , "clip_g" ): ["clip_g" ],
754766 resource_id (ResourceKind .text_encoder , Arch .all , "t5" ): ["t5xxl_fp16" , "t5xxl_fp8_e4m3fn" , "t5xxl_fp8_e4m3fn_scaled" , "t5-v1_1-xxl" , "t5" ],
755767 resource_id (ResourceKind .text_encoder , Arch .all , "qwen" ): ["qwen_2.5_vl_7b" , "qwen_2" , "qwen-2" , "qwen" ],
756- resource_id (ResourceKind .text_encoder , Arch .all , "qwen_3" ): ["qwen_3_4b" , "qwen3-4b" , "qwen_3" , "qwen-3" ],
768+ resource_id (ResourceKind .text_encoder , Arch .all , "qwen_3_4b" ): ["qwen_3_4b" , "qwen3-4b" , "qwen_3" , "qwen-3" ],
769+ resource_id (ResourceKind .text_encoder , Arch .all , "qwen_3_8b" ): ["qwen_3_8b" , "qwen3-8b" ],
757770 resource_id (ResourceKind .vae , Arch .sd15 , "default" ): ["vae-ft-mse-840000-ema" ],
758771 resource_id (ResourceKind .vae , Arch .sdxl , "default" ): ["sdxl_vae" ],
759772 resource_id (ResourceKind .vae , Arch .illu , "default" ): ["sdxl_vae" ],
760773 resource_id (ResourceKind .vae , Arch .illu_v , "default" ): ["sdxl_vae" ],
761774 resource_id (ResourceKind .vae , Arch .sd3 , "default" ): ["sd3" ],
762775 resource_id (ResourceKind .vae , Arch .flux , "default" ): ["flux-" , "flux_" , "flux/" , "flux1" , "ae.s" ],
763776 resource_id (ResourceKind .vae , Arch .flux_k , "default" ): ["flux-" , "flux_" , "flux/" , "flux1" , "ae.s" ],
764- resource_id (ResourceKind .vae , Arch .flux2 , "default" ): ["flux2" ],
777+ resource_id (ResourceKind .vae , Arch .flux2_4b , "default" ): ["flux2" ],
778+ resource_id (ResourceKind .vae , Arch .flux2_9b , "default" ): ["flux2" ],
765779 resource_id (ResourceKind .vae , Arch .chroma , "default" ): ["flux-" , "flux_" , "flux/" , "flux1" , "ae.s" ],
766780 resource_id (ResourceKind .vae , Arch .qwen , "default" ): ["qwen" ],
767781 resource_id (ResourceKind .vae , Arch .qwen_e , "default" ): ["qwen" ],
0 commit comments