fix: Calculate 25% more VRAM for base models with weights/LoRAs

Instead of adding a fixed 2GB overhead, now calculates 25% more
VRAM for base models that will have fine-tuned weights/tensors
or LoRA adapters loaded on top.
parent 1162d3c0
......@@ -3909,8 +3909,9 @@ def select_best_model(gen_type, models, vram_gb=24, prefer_quality=True, return_
}
# Check VRAM compatibility using base model requirements
# LoRAs add a small overhead (~1-2GB)
vram_est = parse_vram_estimate(base_model_info.get("vram", "~10 GB")) + 2
# LoRAs and fine-tuned weights add significant overhead (25% more)
base_vram = parse_vram_estimate(base_model_info.get("vram", "~10 GB"))
vram_est = base_vram * 1.25 # 25% more for weights/tensors/loras
if allow_bigger_models:
# If allowing bigger models, check if VRAM + 75% of available RAM is sufficient
available_ram = get_available_ram_gb()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment