mudler/LocalAI · error · ValueError

Failed to load pipeline '{effective_pipeline_type}': {e}\nAv

Error message

Failed to load pipeline '{effective_pipeline_type}': {e}\nAvailable pipelines: {', '.join(available[:30])}...

What it means

Raised by the diffusers backend's _load_pipeline when load_diffusers_pipeline() throws while constructing the requested pipeline class. The message chains the original exception and appends up to 30 available pipeline class names so the user can see what this diffusers install actually supports.

Source

Thrown at backend/python/diffusers/backend.py:495

        # Add device_map for multi-GPU support (when TensorParallelSize > 1)
        if device_map:
            load_kwargs["device_map"] = device_map

        # Determine pipeline class name - default to AutoPipelineForText2Image
        effective_pipeline_type = pipeline_type if pipeline_type else "AutoPipelineForText2Image"

        # Use dynamic loader for all pipelines
        try:
            pipe = load_diffusers_pipeline(
                class_name=effective_pipeline_type,
                model_id=model_ref,
                from_single_file=from_single_file,
                **load_kwargs
            )
        except Exception as e:
            # Provide helpful error with available pipelines
            available = get_available_pipelines()
            raise ValueError(
                f"Failed to load pipeline '{effective_pipeline_type}': {e}\n"
                f"Available pipelines: {', '.join(available[:30])}..."
            ) from e

        # Apply LowVRAM optimization if supported and requested
        if request.LowVRAM and hasattr(pipe, 'enable_model_cpu_offload'):
            pipe.enable_model_cpu_offload()

        return pipe

    def Health(self, request, context):
        return backend_pb2.Reply(message=bytes("OK", 'utf-8'))

    def LoadModel(self, request, context):
        try:
            print(f"Loading model {request.Model}...", file=sys.stderr)
            print(f"Request {request}", file=sys.stderr)
            torchType = torch.float32

View on GitHub (pinned to 44413a9d06)

Solutions

  1. Read the chained original exception ({e}) — it carries the root cause; the 'Available pipelines' list is only a hint.
  2. Match the pipeline class to the model family (SD1.5→StableDiffusionPipeline, SDXL→StableDiffusionXLPipeline, Flux→FluxPipeline, etc.).
  3. Upgrade the backend image / diffusers package if the class exists upstream but not in the available list.
  4. Re-download the model snapshot if the underlying error is a missing/corrupt weight file.

Example fix

# before
request.PipelineType = "StableDiffusionPipeline"  # model is SDXL

# after
request.PipelineType = "StableDiffusionXLPipeline"
Defensive patterns

Strategy: try-catch

Validate before calling

available = set(get_available_pipelines())
assert effective_pipeline_type in available, (
    f"pipeline {effective_pipeline_type} not available; known: {sorted(available)[:30]}")

Try / catch

try:
    pipe = _load_pipeline(request, model_ref, ...)
except ValueError as e:
    # message already contains the underlying cause and available pipelines
    logger.error("pipeline load failed: %s", e)
    return error_reply(str(e))

Prevention

When it happens

Trigger: effective_pipeline_type resolves to a class whose from_pretrained/from_single_file load fails — missing model files, incompatible diffusers version lacking that class's required deps (e.g. transformers/k-diffusion), corrupted snapshot, or wrong pipeline type for the model files present.

Common situations: Specifying PipelineType that does not match the model (e.g. StableDiffusionXLPipeline against a Flux checkpoint), an older pinned diffusers version in the backend image missing a newer pipeline, or a partially downloaded model directory.

Related errors


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