mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-20 18:51:26 -03:00
5ae4aef30e
models.dev is served by Cloudflare with brotli compression when the client advertises it, and brotli is a required dependency here, so aiohttp always negotiates br. A corrupted br stream can crash the native decoder with a Windows access violation (a Python-level exception handler cannot catch it), or produce garbage bytes. Send an explicit "Accept-Encoding: gzip, deflate" header on the model catalog and Ollama model-list requests so the server never returns brotli. zlib handles corrupt gzip data by raising ContentEncodingError (an aiohttp.ClientError subclass), which the existing handlers already catch and degrade to a warning with an empty-catalog fallback.