From 781a3ee829cabe4ac59ec478ecdaba1ecbd6a485 Mon Sep 17 00:00:00 2001 From: pewdiepie-archdaemon Date: Sun, 14 Jun 2026 22:23:38 +0900 Subject: [PATCH] =?UTF-8?q?Cookbook:=20rename=20'Run'=20tab=20=E2=86=92=20?= =?UTF-8?q?'Launch'=20(cookbook.js:1865)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/cookbook.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/static/js/cookbook.js b/static/js/cookbook.js index 8b1264690..b825ce415 100644 --- a/static/js/cookbook.js +++ b/static/js/cookbook.js @@ -463,7 +463,10 @@ export function _buildServeCmd(f, modelName, backend) { const _py3Bin = _venvBin ? `${_venvBin}python3` : 'python3'; let cmd = ''; if (backend === 'vllm') { - const gpuId = f.gpu_id?.trim() || ''; + // GPU list comes from the Row-1 button strip (data-field="gpus") — + // the bare "auto" input that used to back gpu_id is gone, and the + // button strip is the only source for which devices to pin. + const gpuId = (f.gpus || f.gpu_id || '').toString().trim(); if (gpuId) cmd += `CUDA_VISIBLE_DEVICES=${gpuId} `; if (f.moe_env) { const _opts = _detectModelOptimizations(modelName); @@ -505,7 +508,10 @@ export function _buildServeCmd(f, modelName, backend) { cmd += ` --speculative-config '{"method":"${_specMethod}","num_speculative_tokens":${_specToks}}'`; } } else if (backend === 'sglang') { - const gpuId = f.gpu_id?.trim() || ''; + // GPU list comes from the Row-1 button strip (data-field="gpus") — + // the bare "auto" input that used to back gpu_id is gone, and the + // button strip is the only source for which devices to pin. + const gpuId = (f.gpus || f.gpu_id || '').toString().trim(); if (gpuId) cmd += `CUDA_VISIBLE_DEVICES=${gpuId} `; const _extraEnv = (f.extra_env ?? '').toString().replace(/\s+/g, ' ').trim(); if (_extraEnv) cmd += _extraEnv + ' '; @@ -522,7 +528,9 @@ export function _buildServeCmd(f, modelName, backend) { if (f.enforce_eager) cmd += ' --disable-cuda-graph'; } else if (backend === 'llamacpp') { const ggufPath = f._gguf_path || 'model.gguf'; - const gpuId = f.gpu_id?.trim() || ''; + // GPU list — read from gpus (button strip); fall back to gpu_id for + // backward-compat with older saved presets that pre-date the removal. + const gpuId = (f.gpus || f.gpu_id || '').toString().trim(); const py = _isWindows() ? 'python' : 'python3'; // CPU-only serve (-ngl 0): drop the GPU-only flags, otherwise the command // mixes "zero GPU layers" with CUDA unified-memory + flash-attn and fails to @@ -1854,7 +1862,7 @@ function _renderRecipes() { // Tabs html += '
'; - html += ''; + html += ''; html += ''; html += ''; html += '';