Add Hugging Face support and enhance model resolution logic

- Introduced support for Hugging Face API integration, allowing fallback model resolution when Civitai fails.
- Updated configuration to include `HF_TOKEN` and `HF_TOKEN_PATH` for authentication.
- Enhanced model capture logic to differentiate between Civitai and Hugging Face sources.
- Improved error handling for model downloads, providing clearer messages for authentication issues.
- Updated documentation to reflect new environment variables and usage instructions for Hugging Face integration.
- Added tests to validate the new fallback mechanism and ensure robust model resolution.
This commit is contained in:
Leonid Pershin
2026-08-21 07:34:15 +03:00
parent 7343fb0e83
commit 618e6e4806
12 changed files with 642 additions and 96 deletions
+4 -1
View File
@@ -46,7 +46,10 @@ OLLAMA_LOCAL_PORT=17811
LLAMACPP_LOCAL_PORT=17812
# OLLAMA_MODELS_MANIFEST=
# LLAMACPP_MODELS_MANIFEST=
# HF_TOKEN= # optional, gated GGUF on Hugging Face
# CIVITAI_API_TOKEN=
# CIVITAI_API_HOST=civitai.red
# Hugging Face (GGUF / gated HF URLs / capture fallback metadata):
# HF_TOKEN= # or HUGGING_FACE_HUB_TOKEN — https://huggingface.co/settings/tokens
# git pull SwarmUI + extensions on each up (default true). CLI: --no-update
UPDATE_GIT=true