diff --git a/scripts/caption-host.mjs b/scripts/caption-host.mjs index 986d0d4..665a71e 100644 --- a/scripts/caption-host.mjs +++ b/scripts/caption-host.mjs @@ -6,13 +6,13 @@ import { pipeline } from 'node:stream/promises' import { Transform } from 'node:stream' import { captionStylePrompt, CAPTION_STYLES } from '../shared/caption.mjs' -const MODEL_NAME = 'Qwen2.5-VL-7B-NSFW-Caption-V4.Q5_K_M.gguf' -const MMPROJ_NAME = 'Qwen2.5-VL-7B-NSFW-Caption-V4.mmproj-f16.gguf' +const MODEL_NAME = 'Qwen2.5-VL-7B-NS-Caption-V4.Q5_K_M.gguf' +const MMPROJ_NAME = 'Qwen2.5-VL-7B-NS-Caption-V4.mmproj-f16.gguf' function defaultModelsDir() { const shared = process.env.COMFY_MODELS_ROOT || join(process.env.LOCALAPPDATA || '', 'Comfy-Desktop', 'ComfyUI-Shared', 'models') - return resolve(process.env.CAPTION_MODELS || join(shared, 'caption', 'qwen25vl-7b-nsfw-v4')) + return resolve(process.env.CAPTION_MODELS || join(shared, 'caption', 'qwen25vl-7b-ns-v4')) } /** Prefer winget ggml.llamacpp; never download. Process exit after one caption = keep_alive 0. */ diff --git a/scripts/setup-caption.ps1 b/scripts/setup-caption.ps1 index 383fada..36cf1f9 100644 --- a/scripts/setup-caption.ps1 +++ b/scripts/setup-caption.ps1 @@ -1,4 +1,4 @@ -# Caption (Qwen2.5-VL NSFW Caption V4 GGUF) — verify host files only. +# Caption (Qwen2.5-VL NS Caption V4 GGUF) — verify host files only. # Models are already on the 5080 host. Do not download. Do not search Hugging Face. $ErrorActionPreference = 'Stop' @@ -10,14 +10,14 @@ function Resolve-ModelsRoot { throw 'Set COMFY_MODELS_ROOT or install Comfy Desktop Shared models.' } -$root = Join-Path (Resolve-ModelsRoot) 'caption\qwen25vl-7b-nsfw-v4' +$root = Join-Path (Resolve-ModelsRoot) 'caption\qwen25vl-7b-ns-v4' if (-not (Test-Path $root)) { throw "Caption models folder missing: $root" } $files = @( - 'Qwen2.5-VL-7B-NSFW-Caption-V4.Q5_K_M.gguf', - 'Qwen2.5-VL-7B-NSFW-Caption-V4.mmproj-f16.gguf' + 'Qwen2.5-VL-7B-NS-Caption-V4.Q5_K_M.gguf', + 'Qwen2.5-VL-7B-NS-Caption-V4.mmproj-f16.gguf' ) foreach ($name in $files) { @@ -44,8 +44,8 @@ $llamaPath = if ($llama.PSObject.Properties['FullName'] -and $llama.FullName) { Write-Host "llama-server: $llamaPath" $ready = @{ - model = 'Qwen2.5-VL-7B-NSFW-Caption-V4.Q5_K_M.gguf' - mmproj = 'Qwen2.5-VL-7B-NSFW-Caption-V4.mmproj-f16.gguf' + model = 'Qwen2.5-VL-7B-NS-Caption-V4.Q5_K_M.gguf' + mmproj = 'Qwen2.5-VL-7B-NS-Caption-V4.mmproj-f16.gguf' modelsDir = $root llamaServer = $llamaPath readyAt = (Get-Date).ToUniversalTime().ToString('o') diff --git a/scripts/start-comfy-host-agent.ps1 b/scripts/start-comfy-host-agent.ps1 index ccaad88..ba731f0 100644 --- a/scripts/start-comfy-host-agent.ps1 +++ b/scripts/start-comfy-host-agent.ps1 @@ -19,7 +19,7 @@ Get-NetTCPConnection -LocalPort 8199 -State Listen -ErrorAction SilentlyContinue Start-Sleep -Milliseconds 400 # Caption VLM — point at existing host GGUFs (no download). -$captionModels = Join-Path $env:LOCALAPPDATA 'Comfy-Desktop\ComfyUI-Shared\models\caption\qwen25vl-7b-nsfw-v4' +$captionModels = Join-Path $env:LOCALAPPDATA 'Comfy-Desktop\ComfyUI-Shared\models\caption\qwen25vl-7b-ns-v4' $llamaServer = Join-Path $env:LOCALAPPDATA 'Microsoft\WinGet\Packages\ggml.llamacpp_Microsoft.Winget.Source_8wekyb3d8bbwe\llama-server.exe' if (Test-Path $captionModels) { $env:CAPTION_MODELS = $captionModels } if (Test-Path $llamaServer) { $env:CAPTION_LLAMA_SERVER = $llamaServer } diff --git a/tests/caption.test.mjs b/tests/caption.test.mjs index 6e38522..0d08bdb 100644 --- a/tests/caption.test.mjs +++ b/tests/caption.test.mjs @@ -15,8 +15,8 @@ assert.throws(() => validateCaptionHostRequest({ id: 'short', style: 'descriptiv const root = mkdtempSync(join(tmpdir(), 'caption-test-')) const models = join(root, 'models') mkdirSync(models) -writeFileSync(join(models, 'Qwen2.5-VL-7B-NSFW-Caption-V4.Q5_K_M.gguf'), 'x') -writeFileSync(join(models, 'Qwen2.5-VL-7B-NSFW-Caption-V4.mmproj-f16.gguf'), 'x') +writeFileSync(join(models, 'Qwen2.5-VL-7B-NS-Caption-V4.Q5_K_M.gguf'), 'x') +writeFileSync(join(models, 'Qwen2.5-VL-7B-NS-Caption-V4.mmproj-f16.gguf'), 'x') writeFileSync(join(root, 'llama-server.exe'), 'x') let prepared = 0