mudler / LocalAI

:robot: The free, Open Source alternative to OpenAI, Claude and others. Self-hosted 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. Features: Generate Text, Audio, Video, Images, Voice Cloning, Distributed, P2P inference
https://localai.io
MIT License
25.14k stars 1.9k forks source link

Cannot use parler-tts models #3941

Open rn3-sfos opened 2 weeks ago

rn3-sfos commented 2 weeks ago

LocalAI version: localai/localai:latest-gpu-nvidia-cuda-12 (sha256:ff0b3e63d517631b1660fb3f7dbf6cfbbe8f0df730573c6f9b7b6effa964af05)

Environment, CPU architecture, OS, and Version: Linux 82a266e95db7 6.11.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 22 Oct 2024 18:31:38 +0000 x86_64 x86_64 x86_64 GNU/Linux

Describe the bug Parler-tts backend imports runtime_version from protobuf and fails.

To Reproduce

  1. Install parler-tts model from gallery
  2. Try to invoke the model
  3. curl -L http://localhost:8080/tts \ -H "Content-Type: application/json" \ -d '{ "model": "parler-tts", "input": "Hi there!" }' | aplay

Expected behavior Model loads and generates audio for the text

Logs 7:11AM DBG Wait for the service to start up 7:11AM DBG GRPC(-127.0.0.1:34227): stdout Initializing libbackend for parler-tts 7:11AM DBG GRPC(-127.0.0.1:34227): stdout virtualenv activated 7:11AM DBG GRPC(-127.0.0.1:34227): stdout activated virtualenv has been ensured 7:11AM DBG GRPC(-127.0.0.1:34227): stderr Traceback (most recent call last): 7:11AM DBG GRPC(-127.0.0.1:34227): stderr File "/build/backend/python/parler-tts/backend.py", line 13, in <module> 7:11AM DBG GRPC(-127.0.0.1:34227): stderr import backend_pb2 7:11AM DBG GRPC(-127.0.0.1:34227): stderr File "/build/backend/python/parler-tts/backend_pb2.py", line 9, in <module> 7:11AM DBG GRPC(-127.0.0.1:34227): stderr from google.protobuf import runtime_version as _runtime_version 7:11AM DBG GRPC(-127.0.0.1:34227): stderr ImportError: cannot import name 'runtime_version' from 'google.protobuf' (/build/backend/python/parler-tts/venv/lib/python3.10/site-packages/google/protobuf/__init__.py)

mudler commented 2 weeks ago

Should be covered by https://github.com/mudler/LocalAI/pull/3954 - we had a hacky workaround in place for workarounding https://github.com/descriptinc/audiotools/pull/111

mudler commented 5 days ago

Still present on master images. Needs deeper investigation