Enhance SwarmUI integration and GPU environment verification
- Updated CLI documentation to reflect the new handling of `CIVITAI_API_TOKEN`, which is now automatically passed to SwarmUI user settings during startup. - Improved the `render_access_panel` function to include additional warnings for idle-killer failures and stack errors, enhancing user feedback. - Introduced a new function `seed_swarmui_api_keys` to manage API key injection into SwarmUI, ensuring seamless integration with the Model Downloader. - Enhanced GPU environment verification logic to include fail-fast checks for critical components like CUDA, improving error handling and user notifications. - Updated tests to validate the new API key handling and access panel behavior, ensuring robustness in the integration process.
This commit is contained in:
+6
-2
@@ -233,8 +233,12 @@ Application credential для idle-killer CLI создаёт на `up` (узко
|
||||
2. TCP 22 / SSH
|
||||
3. Backend Idle (если SwarmUI) → toast (если `NOTIFY_READY`)
|
||||
4. На VM: HTTP сервисов стека (SwarmUI `:7801` / Ollama `:11434` / llama.cpp `:8080`) — `verify_stack_on_vm`
|
||||
5. На VM: **nvidia-smi / CUDA** (+ **torch+cuda** в Comfy venv, если SwarmUI) — `verify_gpu_env`
|
||||
6. Туннель + проверка **localhost** тех же сервисов → access-card
|
||||
5. На VM: **nvidia-smi / CUDA** (fail-fast) + **torch+cuda** в Comfy venv при SwarmUI (ждём) — `verify_gpu_env`
|
||||
6. В логе: строка **`тайминг up:`** (SSH / bootstrap / Idle / verify / …)
|
||||
7. Туннель + проверка **localhost** тех же сервисов → access-card (красная рамка, если killer failed)
|
||||
|
||||
`gpu-rent logs --unit swarm|ollama|llamacpp|killer` — фильтр journalctl.
|
||||
`gpu-rent status` — killer/hold, последний стек/GPU-env, тайминг up.
|
||||
|
||||
Локальный порт UI: **17801** (на VM по-прежнему 7801 на loopback).
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@ copy models.example.yaml models.yaml
|
||||
| В `.env` есть `CIVITAI_API_TOKEN` **и** в манифесте есть хотя бы одна запись | Скачать перечисленные модели с Civitai **на VM** (не через ноут). Рядом положить метаданные. **Не** качать дефолтный чекпоинт установщика SwarmUI |
|
||||
| Токена нет, или манифест пуст/отсутствует | Обычный первый запуск SwarmUI: пусть ставит свою стандартную модель. В лог — почему Civitai-seed пропущен |
|
||||
|
||||
После старта SwarmUI тот же `CIVITAI_API_TOKEN` прокидывается в UI через `/API/SetAPIKey` (`civitai_api`) — Model Downloader и gated-модели в браузере. При наличии `HF_TOKEN` / `HUGGING_FACE_HUB_TOKEN` — ещё `huggingface_api`.
|
||||
|
||||
Токен без манифеста = предупреждение и ветка SwarmUI default, не «пустой диск без моделей».
|
||||
|
||||
ComfyUI в `dlbackend` качается всегда. Речь только о **модели весов** установщика SwarmUI, не о backend.
|
||||
|
||||
@@ -169,6 +169,7 @@ notepad .env
|
||||
2. [Account settings](https://civitai.com/user/account) → **API Keys** → **Add**.
|
||||
3. Токен показывают **один раз** → в `.env`: `CIVITAI_API_TOKEN=...`
|
||||
4. Хост по умолчанию **`civitai.red`** (полный каталог). С `.com` NSFW часто 404.
|
||||
5. На `up` токен уходит и в seed на VM, и в SwarmUI User Settings (Civitai API Key) — вручную в UI вводить не нужно.
|
||||
5. Манифест:
|
||||
|
||||
```powershell
|
||||
|
||||
Reference in New Issue
Block a user