invoke-ai/InvokeAI · error · ValueError
Only CheckpointConfigBase models are currently supported her
Error message
Only CheckpointConfigBase models are currently supported here.
What it means
The Qwen Image single-file (checkpoint) loader only accepts configs deriving from CheckpointConfigBase. When _load_model receives a diffusers-folder style config (e.g. Main_Diffusers_Config or a GGUF config class not based on checkpoint), it raises this ValueError because the single-file loading path cannot handle it.
Source
Thrown at invokeai/backend/model_manager/load/model_loaders/qwen_image.py:192
result = load_class.from_pretrained(model_path, **dtype_kwarg, local_files_only=True)
else:
raise e
result = self._apply_fp8_layerwise_casting(result, config, submodel_type)
return result
@ModelLoaderRegistry.register(base=BaseModelType.QwenImage, type=ModelType.Main, format=ModelFormat.GGUFQuantized)
class QwenImageGGUFCheckpointModel(ModelLoader):
"""Class to load GGUF-quantized Qwen Image Edit transformer models."""
def _load_model(
self,
config: AnyModelConfig,
submodel_type: Optional[SubModelType] = None,
) -> AnyModel:
if not isinstance(config, Checkpoint_Config_Base):
raise ValueError("Only CheckpointConfigBase models are currently supported here.")
match submodel_type:
case SubModelType.Transformer:
return self._load_from_singlefile(config)
raise ValueError(
f"Only Transformer submodels are currently supported. Received: {submodel_type.value if submodel_type else 'None'}"
)
def _load_from_singlefile(self, config: AnyModelConfig) -> AnyModel:
from diffusers import QwenImageTransformer2DModel
if not isinstance(config, Main_GGUF_QwenImage_Config):
raise TypeError(f"Expected Main_GGUF_QwenImage_Config, got {type(config).__name__}.")
model_path = Path(config.path)
target_device = TorchDevice.choose_torch_device()
compute_dtype = TorchDevice.choose_bfloat16_safe_dtype(target_device)View on GitHub (pinned to 0b6a024f2f)
Solutions
- Re-import or re-convert the model so it is registered with a CheckpointConfigBase-derived config (Main_Checkpoint_QwenImage_Config or Main_GGUF_QwenImage_Config).
- Verify the model's format in the model manager UI/API matches its actual file layout (single-file vs diffusers folder).
- If the model is truly a diffusers folder, use the diffusers-registered Qwen Image loader instead.
Example fix
// before config = Main_Diffusers_Config(path=..., model_format=...) # folder-style config model = checkpoint_loader._load_model(config, SubModelType.Transformer) // after config = Main_Checkpoint_QwenImage_Config(path=model_file, config=ConfigVariantEnum.QwenImage) model = checkpoint_loader._load_model(config, SubModelType.Transformer)
Defensive patterns
Strategy: type-guard
Validate before calling
from invokeai.backend.model_manager.config import Checkpoint_Config_Base
if not isinstance(config, Checkpoint_Config_Base):
raise TypeError(f"Single-file loader needs a checkpoint config, got {type(config).__name__}") Type guard
def is_checkpoint_config(config: AnyModelConfig) -> bool:
return isinstance(config, Checkpoint_Config_Base) Try / catch
try:
model = loader._load_model(config, SubModelType.Transformer)
except ValueError as e:
if "Only CheckpointConfigBase" in str(e):
config = reimport_model_with_correct_format(model_path) # re-scan/re-register
model = loader._load_model(config, SubModelType.Transformer)
else:
raise Prevention
- Match the model record's format field to the on-disk layout (single-file vs folder)
- Re-scan the models directory after moving or converting model files
- Check isinstance before calling format-specific loaders directly
When it happens
Trigger: Registering a Qwen Image single-file model but having it resolved with a non-checkpoint config class, or calling the checkpoint-registered loader's _load_model with a Diffusers/GGUF config object.
Common situations: Model format misdetected during scan (single-file .safetensors registered as diffusers); wrong ModelFormat on import; hand-constructed config passed to the wrong loader.
Related errors
- Expected QwenVLEncoder_Checkpoint_Config, got {type(config).
- Expected Main_GGUF_QwenImage_Config, got {type(config).__nam
- Expected Main_Checkpoint_QwenImage_Config, got {type(config)
- Expected QwenVLEncoder_Diffusers_Config, got {type(config)._
- No VAE source provided. Single-file / GGUF transformers requ
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/1cb1dbd59db695db.
Report an issue: GitHub.