|
6 | 6 |
|
7 | 7 | import accelerate |
8 | 8 | import torch |
9 | | - |
10 | 9 | from transformers import AutoTokenizer, Qwen3ForCausalLM |
11 | 10 |
|
12 | 11 | from invokeai.backend.model_manager.configs.base import Checkpoint_Config_Base, Diffusers_Config_Base |
@@ -288,8 +287,7 @@ def _load_from_singlefile( |
288 | 287 |
|
289 | 288 | if not isinstance(config, Main_GGUF_ZImage_Config): |
290 | 289 | raise TypeError( |
291 | | - f"Expected Main_GGUF_ZImage_Config, got {type(config).__name__}. " |
292 | | - "Model configuration type mismatch." |
| 290 | + f"Expected Main_GGUF_ZImage_Config, got {type(config).__name__}. Model configuration type mismatch." |
293 | 291 | ) |
294 | 292 | model_path = Path(config.path) |
295 | 293 |
|
@@ -511,10 +509,11 @@ def _load_from_singlefile( |
511 | 509 | self, |
512 | 510 | config: AnyModelConfig, |
513 | 511 | ) -> AnyModel: |
514 | | - from invokeai.backend.util.logging import InvokeAILogger |
515 | 512 | from safetensors.torch import load_file |
516 | 513 | from transformers import Qwen3Config, Qwen3ForCausalLM |
517 | 514 |
|
| 515 | + from invokeai.backend.util.logging import InvokeAILogger |
| 516 | + |
518 | 517 | logger = InvokeAILogger.get_logger(self.__class__.__name__) |
519 | 518 |
|
520 | 519 | if not isinstance(config, Qwen3Encoder_Checkpoint_Config): |
@@ -670,15 +669,15 @@ def _load_from_gguf( |
670 | 669 | self, |
671 | 670 | config: AnyModelConfig, |
672 | 671 | ) -> AnyModel: |
673 | | - from invokeai.backend.util.logging import InvokeAILogger |
674 | 672 | from transformers import Qwen3Config, Qwen3ForCausalLM |
675 | 673 |
|
| 674 | + from invokeai.backend.util.logging import InvokeAILogger |
| 675 | + |
676 | 676 | logger = InvokeAILogger.get_logger(self.__class__.__name__) |
677 | 677 |
|
678 | 678 | if not isinstance(config, Qwen3Encoder_GGUF_Config): |
679 | 679 | raise TypeError( |
680 | | - f"Expected Qwen3Encoder_GGUF_Config, got {type(config).__name__}. " |
681 | | - "Model configuration type mismatch." |
| 680 | + f"Expected Qwen3Encoder_GGUF_Config, got {type(config).__name__}. Model configuration type mismatch." |
682 | 681 | ) |
683 | 682 | model_path = Path(config.path) |
684 | 683 |
|
|
0 commit comments