Add LoRA stacks with per-item strengths and named video/image generation presets so setups survive reload without mixing Klein onto MiniMax. Keep LTX Pink Cherry and xAIGen LoRAs on xAIGen, and run Recommend on Beast.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+18
-18
@@ -38,13 +38,24 @@ export function getBeastImageHost() {
|
||||
}
|
||||
}
|
||||
|
||||
function isRetiredSidecarHost(raw: string) {
|
||||
return /192\.168\.77\.101(?!\d)/.test(raw)
|
||||
}
|
||||
|
||||
export function getSidecarImageHost() {
|
||||
const config = useRuntimeConfig()
|
||||
const fallback = String(config.imageComfyFallbackHost || process.env.IMAGE_COMFY_FALLBACK_HOST || '').trim()
|
||||
if (fallback) return normalizeHost(fallback)
|
||||
const legacy = String(config.imageComfyHost || process.env.IMAGE_COMFY_HOST || '').trim()
|
||||
const port = String(config.imageComfyPort || process.env.IMAGE_COMFY_PORT || '').trim()
|
||||
return normalizeHost(legacy, port)
|
||||
const candidates: Array<[string, string]> = [
|
||||
[String(config.promptComfyHost || process.env.PROMPT_COMFY_HOST || '').trim(), ''],
|
||||
[String(config.imageComfyHost || process.env.IMAGE_COMFY_HOST || '').trim(), port],
|
||||
[String(config.imageComfyFallbackHost || process.env.IMAGE_COMFY_FALLBACK_HOST || '').trim(), '']
|
||||
]
|
||||
for (const [raw, extraPort] of candidates) {
|
||||
if (!raw || isRetiredSidecarHost(raw)) continue
|
||||
const host = normalizeHost(raw, extraPort)
|
||||
if (host && !isRetiredSidecarHost(host)) return host
|
||||
}
|
||||
return getBeastImageHost()
|
||||
}
|
||||
|
||||
export function getImageComfyHost() {
|
||||
@@ -352,19 +363,8 @@ async function purgeImageOnDesktop(opts: {
|
||||
output?: { filename: string; subfolder: string; type: string }
|
||||
}) {
|
||||
const config = useRuntimeConfig()
|
||||
const host = getImageComfyHost()
|
||||
const sidecar = getSidecarImageHost()
|
||||
const useSidecarAgent = sidecar && sameImageHost(host, sidecar)
|
||||
const controlUrl = String(
|
||||
useSidecarAgent
|
||||
? (config.imageComfyControlUrl || process.env.IMAGE_COMFY_CONTROL_URL || '')
|
||||
: (config.comfyControlUrl || process.env.COMFY_CONTROL_URL || '')
|
||||
).replace(/\/$/, '')
|
||||
const token = String(
|
||||
useSidecarAgent
|
||||
? (config.imageComfyControlToken || process.env.IMAGE_COMFY_CONTROL_TOKEN || '')
|
||||
: (config.comfyControlToken || process.env.COMFY_CONTROL_TOKEN || '')
|
||||
)
|
||||
const controlUrl = String(config.comfyControlUrl || process.env.COMFY_CONTROL_URL || '').replace(/\/$/, '')
|
||||
const token = String(config.comfyControlToken || process.env.COMFY_CONTROL_TOKEN || '')
|
||||
if (!controlUrl) return
|
||||
try {
|
||||
await fetch(`${controlUrl}/purge`, {
|
||||
@@ -382,7 +382,7 @@ async function purgeImageOnDesktop(opts: {
|
||||
signal: AbortSignal.timeout(4000)
|
||||
})
|
||||
} catch {
|
||||
/* Sidecar host agent is optional; Comfy HTTP delete is the primary path. */
|
||||
/* Host agent purge is optional; Comfy HTTP delete is the primary path. */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user