mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-06-07 14:17:09 -04:00
Only compute VRAM/GPU layers for llama.cpp models
This commit is contained in:
parent
9ec9b1bf83
commit
253e85a519
1 changed files with 1 additions and 1 deletions
|
@ -441,7 +441,7 @@ def update_gpu_layers_and_vram(loader, model, gpu_layers, ctx_size, cache_type,
|
||||||
- If for_ui=True: (vram_info_update, gpu_layers_update) or just vram_info_update
|
- If for_ui=True: (vram_info_update, gpu_layers_update) or just vram_info_update
|
||||||
- If for_ui=False: (vram_usage, adjusted_layers) or just vram_usage
|
- If for_ui=False: (vram_usage, adjusted_layers) or just vram_usage
|
||||||
"""
|
"""
|
||||||
if loader != 'llama.cpp' or model in ["None", None]:
|
if loader != 'llama.cpp' or model in ["None", None] or not model.endswith(".gguf"):
|
||||||
vram_info = "<div id=\"vram-info\"'>Estimated VRAM to load the model:</span>"
|
vram_info = "<div id=\"vram-info\"'>Estimated VRAM to load the model:</span>"
|
||||||
if for_ui:
|
if for_ui:
|
||||||
return (vram_info, gr.update()) if auto_adjust else vram_info
|
return (vram_info, gr.update()) if auto_adjust else vram_info
|
||||||
|
|
Loading…
Add table
Reference in a new issue