mudler/LocalAI · error · ValueError

Pipeline class {pipeline_class.__name__} does not support fr

Error message

Pipeline class {pipeline_class.__name__} does not support from_single_file(). Use from_pretrained() instead.

What it means

Raised by load_diffusers_pipeline when from_single_file=True was requested but the resolved pipeline class lacks a from_single_file() method. Only single-file-capable pipelines (ckpt/safetenders checkpoints) implement it; the error tells you to use from_pretrained() with a diffusers-layout model directory instead.

Source

Thrown at backend/python/diffusers/diffusers_dynamic_loader.py:489

    # Resolve the pipeline class
    pipeline_class = resolve_pipeline_class(
        class_name=class_name,
        task=task,
        model_id=model_id
    )

    # If no model_id provided but we have a class, we can't load
    if model_id is None:
        raise ValueError("model_id is required to load a pipeline")

    # Load the pipeline
    try:
        if from_single_file:
            # Check if the class has from_single_file method
            if hasattr(pipeline_class, 'from_single_file'):
                return pipeline_class.from_single_file(model_id, **kwargs)
            else:
                raise ValueError(
                    f"Pipeline class {pipeline_class.__name__} does not support from_single_file(). "
                    f"Use from_pretrained() instead."
                )
        else:
            return pipeline_class.from_pretrained(model_id, **kwargs)

    except Exception as e:
        # Provide helpful error message
        available = get_available_pipelines()
        raise RuntimeError(
            f"Failed to load pipeline '{pipeline_class.__name__}' from '{model_id}': {e}\n"
            f"Available pipelines: {', '.join(available[:20])}..."
        ) from e


def get_pipeline_info(class_name: str) -> Dict[str, Any]:
    """
    Get information about a specific pipeline class.

View on GitHub (pinned to 44413a9d06)

Solutions

  1. If the model is a diffusers-format directory, drop from_single_file and pass the directory as model_id (uses from_pretrained).
  2. Upgrade diffusers — from_single_file coverage widened over versions.
  3. Pick a pipeline class known to support single-file loading (StableDiffusionPipeline, StableDiffusionXLPipeline).
  4. Convert the checkpoint to diffusers layout once and always load via from_pretrained.

Example fix

# before
load_diffusers_pipeline(class_name="FluxPipeline", model_id="model.safetensors", from_single_file=True)

# after
load_diffusers_pipeline(class_name="FluxPipeline", model_id="/models/flux-diffusers")
Defensive patterns

Strategy: validation

Validate before calling

cls = resolve_pipeline_class(class_name=class_name)
supports_single_file = hasattr(cls, 'from_single_file')
assert not from_single_file or supports_single_file, f"{cls.__name__} cannot load single files"

Type guard

def supports_single_file(class_name: str) -> bool:
    cls = resolve_pipeline_class(class_name=class_name)
    return hasattr(cls, "from_single_file")

Try / catch

try:
    pipe = load_diffusers_pipeline(class_name=c, model_id=m, from_single_file=True)
except ValueError as e:
    if "does not support from_single_file" in str(e):
        pipe = load_diffusers_pipeline(class_name=c, model_id=m)  # dir-format fallback
    else:
        raise

Prevention

When it happens

Trigger: Loading a .ckpt/.safetensors single checkpoint file with from_single_file=True where the resolved class (e.g. a newer pipeline like FluxPipeline in some versions, or a custom subclass) does not implement from_single_file.

Common situations: Pointing the single-file flag at a model that only ships in diffusers directory format, an older diffusers version where from_single_file had limited class coverage, or resolving to the generic DiffusionPipeline fallback class which may not expose the method.

Related errors


AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15). Data as JSON: /api/errors/ac2e84844a0e7a28. Report an issue: GitHub.