llama-server uses stb_image internally which does not support WebP, TIFF, AVIF, and other formats that browsers accept for upload. Uploading a WebP image to a vision GGUF model caused a 400 error: "Failed to load image or audio file" / "failed to decode image bytes". Convert all uploaded images to PNG via PIL before base64-encoding and forwarding to llama-server. This handles WebP, TIFF, BMP, GIF, AVIF, and any other format PIL supports. RGBA images are converted to RGB first since PNG with alpha can cause issues in some vision pipelines. |
||
|---|---|---|
| .. | ||
| assets | ||
| auth | ||
| core | ||
| loggers | ||
| models | ||
| plugins | ||
| requirements | ||
| routes | ||
| state | ||
| tests | ||
| utils | ||
| __init__.py | ||
| colab.py | ||
| main.py | ||
| run.py | ||