fix: More conservative VRAM estimate for base models with weights

Calculate: base_vram + 2GB + 50%
This ensures a 14B model estimated at 18GB will require ~29GB instead of 22.5GB.
parent 62e22d1f
...@@ -3909,9 +3909,10 @@ def select_best_model(gen_type, models, vram_gb=24, prefer_quality=True, return_ ...@@ -3909,9 +3909,10 @@ def select_best_model(gen_type, models, vram_gb=24, prefer_quality=True, return_
} }
# Check VRAM compatibility using base model requirements # Check VRAM compatibility using base model requirements
# LoRAs and fine-tuned weights add significant overhead (25% more) # LoRAs and fine-tuned weights add significant overhead
# Conservative estimate: base VRAM + 2GB + 50% for weights/tensors/loras
base_vram = parse_vram_estimate(base_model_info.get("vram", "~10 GB")) base_vram = parse_vram_estimate(base_model_info.get("vram", "~10 GB"))
vram_est = base_vram * 1.25 # 25% more for weights/tensors/loras vram_est = base_vram + 2 + (base_vram * 0.50) # Base + 2GB + 50%
if allow_bigger_models: if allow_bigger_models:
# If allowing bigger models, check if VRAM + 75% of available RAM is sufficient # If allowing bigger models, check if VRAM + 75% of available RAM is sufficient
available_ram = get_available_ram_gb() 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