diff --git a/scripts/makeComfy.js b/scripts/makeComfy.js index 12141a720..f33d04a66 100644 --- a/scripts/makeComfy.js +++ b/scripts/makeComfy.js @@ -20,6 +20,13 @@ if (pkg.config.comfyUI.optionalBranch) { const assetsComfyPath = path.join('assets', 'ComfyUI'); const managerRequirementsPath = path.join(assetsComfyPath, 'manager_requirements.txt'); +// Mark this ComfyUI install as the desktop deploy environment. ComfyUI reads +// `.comfy_environment` from its own install directory (next to main.py) and +// sends the value as the `X-Comfy-Deploy-Env` header on partner-node API +// calls. The file is gitignored upstream, so writing it into the freshly +// cloned ComfyUI repo doesn't dirty the working tree. +fs.writeFileSync(path.join(assetsComfyPath, '.comfy_environment'), 'local-desktop\n'); + if (fs.existsSync(managerRequirementsPath)) { console.log('Detected manager_requirements.txt, skipping legacy ComfyUI-Manager clone.'); } else { diff --git a/scripts/verifyBuild.js b/scripts/verifyBuild.js index 0fbb4be7d..4e52bb817 100644 --- a/scripts/verifyBuild.js +++ b/scripts/verifyBuild.js @@ -12,13 +12,14 @@ import path from 'node:path'; const PATHS = /** @type {Record<'mac' | 'windows', VerifyConfig>} */ ({ mac: { base: 'dist/mac-arm64/ComfyUI.app/Contents/Resources', - required: ['ComfyUI', 'UI', 'uv/macos/uv', 'uv/macos/uvx'], + required: ['ComfyUI', 'ComfyUI/.comfy_environment', 'UI', 'uv/macos/uv', 'uv/macos/uvx'], }, windows: { base: 'dist/win-unpacked/resources', required: [ // Add Windows-specific paths here 'ComfyUI', + 'ComfyUI/.comfy_environment', 'UI', 'uv/win/uv.exe', 'uv/win/uvx.exe',