|
6 | 6 | invocation,
|
7 | 7 | invocation_output,
|
8 | 8 | )
|
9 |
| -from invokeai.app.invocations.fields import FieldDescriptions, Input, InputField, OutputField, UIType |
| 9 | +from invokeai.app.invocations.fields import FieldDescriptions, Input, InputField, OutputField |
10 | 10 | from invokeai.app.invocations.model import CLIPField, ModelIdentifierField, T5EncoderField, TransformerField, VAEField
|
11 | 11 | from invokeai.app.services.shared.invocation_context import InvocationContext
|
12 | 12 | from invokeai.app.util.t5_model_identifier import (
|
|
17 | 17 | from invokeai.backend.model_manager.config import (
|
18 | 18 | CheckpointConfigBase,
|
19 | 19 | )
|
20 |
| -from invokeai.backend.model_manager.taxonomy import SubModelType |
| 20 | +from invokeai.backend.model_manager.taxonomy import BaseModelType, ModelType, SubModelType |
21 | 21 |
|
22 | 22 |
|
23 | 23 | @invocation_output("flux_model_loader_output")
|
@@ -46,23 +46,30 @@ class FluxModelLoaderInvocation(BaseInvocation):
|
46 | 46 |
|
47 | 47 | model: ModelIdentifierField = InputField(
|
48 | 48 | description=FieldDescriptions.flux_model,
|
49 |
| - ui_type=UIType.FluxMainModel, |
50 | 49 | input=Input.Direct,
|
| 50 | + ui_model_base=BaseModelType.Flux, |
| 51 | + ui_model_type=ModelType.Main, |
51 | 52 | )
|
52 | 53 |
|
53 | 54 | t5_encoder_model: ModelIdentifierField = InputField(
|
54 |
| - description=FieldDescriptions.t5_encoder, ui_type=UIType.T5EncoderModel, input=Input.Direct, title="T5 Encoder" |
| 55 | + description=FieldDescriptions.t5_encoder, |
| 56 | + input=Input.Direct, |
| 57 | + title="T5 Encoder", |
| 58 | + ui_model_type=ModelType.T5Encoder, |
55 | 59 | )
|
56 | 60 |
|
57 | 61 | clip_embed_model: ModelIdentifierField = InputField(
|
58 | 62 | description=FieldDescriptions.clip_embed_model,
|
59 |
| - ui_type=UIType.CLIPEmbedModel, |
60 | 63 | input=Input.Direct,
|
61 | 64 | title="CLIP Embed",
|
| 65 | + ui_model_type=ModelType.CLIPEmbed, |
62 | 66 | )
|
63 | 67 |
|
64 | 68 | vae_model: ModelIdentifierField = InputField(
|
65 |
| - description=FieldDescriptions.vae_model, ui_type=UIType.FluxVAEModel, title="VAE" |
| 69 | + description=FieldDescriptions.vae_model, |
| 70 | + title="VAE", |
| 71 | + ui_model_base=BaseModelType.Flux, |
| 72 | + ui_model_type=ModelType.VAE, |
66 | 73 | )
|
67 | 74 |
|
68 | 75 | def invoke(self, context: InvocationContext) -> FluxModelLoaderOutput:
|
|
0 commit comments