Small fixes

This commit is contained in:
filipstrand 2024-09-04 23:16:02 +02:00
parent d5f5f9607e
commit ff9f998638
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ python main.py --model dev --prompt "Luxury food photograph" --steps 25 --seed 2
- **`--apply-lora`** (optional, `[str]`, default: `[]`): [Lora Safetensors file] - **`--apply-lora`** (optional, `[str]`, default: `[]`): [Lora Safetensors file]
- **`--lora-scales`** (optional, `[float]`, default: `[1.0]`): [Scaling factor for each LoRA files] - **`--lora-scale`** (optional, `[float]`, default: `[1.0]`): [Scaling factor for each LoRA files]
### Note: ### Note:
Ensure that the safetensors file provided is compatible with the model's architecture and that the LoRA keys correctly map to the model's layers. The missing lora-scales shall be treated as 1.0 by default. Ensure that the safetensors file provided is compatible with the model's architecture and that the LoRA keys correctly map to the model's layers. The missing lora-scales shall be treated as 1.0 by default.

View File

@ -15,7 +15,7 @@ class WeightHandler:
repo_id: str | None = None, repo_id: str | None = None,
local_path: str | None = None, local_path: str | None = None,
lora_path: str | None = None, lora_path: str | None = None,
lora_scale: float | None = None, lora_scale: float = 1.0,
): ):
root_path = Path(local_path) if local_path else WeightHandler._download_or_get_cached_weights(repo_id) root_path = Path(local_path) if local_path else WeightHandler._download_or_get_cached_weights(repo_id)