Add LoRA import script and InvokeAI usage guide
Adds invokeai-import-lora.sh to copy LoRA .safetensors files directly into InvokeAI's Docker model volume, bypassing the greyed-out UI upload buttons. Also adds README documentation for LoRA usage and troubleshooting. https://claude.ai/code/session_01RU7NQuTbA8S8NRoWojvhR5
This commit is contained in:
@@ -65,6 +65,7 @@ sudo systemctl status local-ai
|
||||
| `ubuntu-post-install.sh` | 8,889 | Full Ubuntu 24.04 post-install (dev tools, fonts, apps, tweaks). Run once on a fresh OS install. Independent of the AI stack. |
|
||||
| `configure-storage.sh` | 239 | Storage/mount configuration helper. Run separately if you have a secondary drive for AI data. |
|
||||
| `kiwix_download.sh` | 198 | Downloads ZIM files (Wikipedia, Stack Overflow, etc.) for offline use. Run separately — files are large. |
|
||||
| `invokeai-import-lora.sh` | 85 | Copies a LoRA `.safetensors` file into InvokeAI's Docker model volume. |
|
||||
|
||||
### Which setup script should I use?
|
||||
|
||||
@@ -131,6 +132,38 @@ Both scripts are **idempotent** — safe to re-run for updates. Config files are
|
||||
|
||||
---
|
||||
|
||||
## Using LoRA Models in InvokeAI
|
||||
|
||||
LoRA (Low-Rank Adaptation) files let you customize image generation with fine-tuned styles or characters. If you trained a LoRA on RunPod or elsewhere, here's how to use it.
|
||||
|
||||
### Import a LoRA file
|
||||
|
||||
```bash
|
||||
# Copy your LoRA into the InvokeAI Docker volume:
|
||||
./invokeai-import-lora.sh ~/Downloads/my-lora.safetensors
|
||||
|
||||
# Optionally give it a display name:
|
||||
./invokeai-import-lora.sh ~/Downloads/my-lora.safetensors "My Custom Style"
|
||||
```
|
||||
|
||||
### Use the LoRA in InvokeAI
|
||||
|
||||
1. Open InvokeAI at `http://<ip>:9090`
|
||||
2. Go to **Model Manager** (cube icon, left sidebar) and click **Scan for Models** / **Sync Models**
|
||||
3. Your LoRA should appear in the model list
|
||||
4. Switch to **Text to Image** tab
|
||||
5. In the left panel, find the **LoRA** section (below the model selector)
|
||||
6. Click **+** to add your LoRA, then adjust the **weight** slider (start at 0.7–0.85)
|
||||
|
||||
### Troubleshooting greyed-out upload buttons
|
||||
|
||||
- **No base model installed:** You need a fully downloaded base model (e.g., SD 1.5) before InvokeAI enables LoRA uploads. Use Model Manager to install one first.
|
||||
- **Model not synced:** After copying files, click **Scan for Models** in Model Manager.
|
||||
- **Architecture mismatch:** A LoRA trained on SD 1.5 only works with SD 1.5 base models — not SDXL or SD 2.x.
|
||||
- **Use the import script instead:** The greyed-out UI upload can be bypassed entirely by using `invokeai-import-lora.sh` to copy files directly into the model volume.
|
||||
|
||||
---
|
||||
|
||||
## Updating
|
||||
|
||||
Re-run the setup script — it detects an existing install and skips prereqs:
|
||||
|
||||
Reference in New Issue
Block a user