mudler / LocalAI

:robot: The free, Open Source OpenAI alternative. Self-hosted, community-driven and local-first. Drop-in replacement for OpenAI running on consumer-grade hardware. No GPU required. Runs gguf, transformers, diffusers and many more models architectures. It allows to generate Text, Audio, Video, Images. Also with voice cloning capabilities.
https://localai.io
MIT License
21.75k stars 1.66k forks source link

Diffusers is not working at all. Load by default stablediffusion instead diffusers #1499

Closed JZacharie closed 6 months ago

JZacharie commented 6 months ago

LocalAI version: 2.2.0-ffmpeg

Environment, CPU architecture, OS, and Version: Linux srv-gpt 5.15.131-1-pve https://github.com/mudler/LocalAI/issues/1 SMP PVE 5.15.131-2 (2023-11-14T11:32Z) x86_64 x86_64 x86_64 GNU/Linux, Proxmox LXC, AMD Ryzen 9 5900X, 128 GB RAM

Describe the bug Diffusers is not working at all. Load by default stablediffusion instead diffusers

To Reproduce I set up dreamlike-photoreal as stated in the docs. File "dreamlike-photoreal.yaml" in models folder with content:

name: dreamlike-photoreal
parameters:
  model: Linaqruf/dreamlike-photoreal
backend: diffusers
# Force CPU usage - set to true for GPU
f16: false
diffusers:
  pipeline_type: StableDiffusionPipeline
  cuda: false # Enable for GPU usage (CUDA)
  scheduler_type: euler_a

Then ran command as stated in docs:

curl http://localhost:8080/v1/images/generations \
    -H "Content-Type: application/json" \
    -d '{
      "prompt": "cat, outdoor, sun, tree|rain, night, people", 
      "model": "dreamlike-photoreal", 
      "step": 51,
      "size": "1024x1024" 
    }'

It results always in this error:

Load by default stablediffusion instead diffusers

image

env with COMPEL=0

/tmp/localai/backend_data/backend-assets/grpc/stablediffusion

image

image

image

Expected behavior Diffusers generate images.

mudler commented 6 months ago

good catch, this sounds a regression introduced with #1283 . cc @M0Rf30