Which version of LM Studio?
LM Studio 0.4.18
Which operating system?
Windows 11
What is the bug?
When loading a model, LM Studio logs a warning from common_fit_params indicating it failed to fit parameters to free device memory because n_gpu_layers was already set by the user to 999999, causing an abort.
Model
gemma4-12b
GPU
AMD RX 9060 XT — 16 GB VRAM
Logs
2026-07-04 00:23:03 [DEBUG]
0.03.913.323 W common_fit_params: failed to fit params to free device memory: n_gpu_layers already set by user to 999999, abort
Expected behavior
LM Studio should either adjust n_gpu_layers automatically to fit available VRAM, or show a clear user-facing error instead of silently aborting the param fitting process.
Additional context
The value 999999 for n_gpu_layers appears to be a sentinel/default value used by LM Studio to mean "offload all layers". When the automatic fitting logic detects this user-set value, it aborts instead of falling back gracefully.
Which version of LM Studio?
LM Studio 0.4.18
Which operating system?
Windows 11
What is the bug?
When loading a model, LM Studio logs a warning from
common_fit_paramsindicating it failed to fit parameters to free device memory becausen_gpu_layerswas already set by the user to999999, causing an abort.Model
gemma4-12bGPU
AMD RX 9060 XT — 16 GB VRAM
Logs
Expected behavior
LM Studio should either adjust
n_gpu_layersautomatically to fit available VRAM, or show a clear user-facing error instead of silently aborting the param fitting process.Additional context
The value
999999forn_gpu_layersappears to be a sentinel/default value used by LM Studio to mean "offload all layers". When the automatic fitting logic detects this user-set value, it aborts instead of falling back gracefully.