The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(create): MOSS Image follow-ups from the full test run (#192)
purple949308a630e2
diff --git a/src/api/__tests__/moss-image-and-an-assigned-workflow-192.test.ts b/src/api/__tests__/moss-image-and-an-assigned-workflow-192.test.tsindex a58cc38d..0fc2f366 100644--- a/src/api/__tests__/moss-image-and-an-assigned-workflow-192.test.ts+++ b/src/api/__tests__/moss-image-and-an-assigned-workflow-192.test.ts@@ -56,8 +56,12 @@ describe('a workflow assigned to a model LU does not know is used', () => {expect(ownWorkflowMisfitNote('MOSS API', MOSS_WORKFLOW, 'unknown')).toBeNull()})- it('also a checkpoint workflow on an unknown model in diffusion_models', () => {- expect(ownWorkflowMisfit(['CheckpointLoaderSimple', 'KSampler'], 'unknown', 'diffusion_model')).toBeNull()+ it('an unknown model in diffusion_models with a UNET workflow fits by its folder', () => {+ expect(ownWorkflowMisfit(MOSS_WORKFLOW, 'unknown', 'diffusion_model')).toBeNull()+ })++ it('NEGATIVE CONTROL: where the folder says what it is, a loader that cannot load it is still set aside', () => {+ expect(ownWorkflowMisfit(['CheckpointLoaderSimple', 'KSampler'], 'unknown', 'diffusion_model')).toMatch(/UNETLoader/)})it('NEGATIVE CONTROL: for a family LU knows, a wrong loader is still set aside', () => {diff --git a/src/api/dynamic-workflow.ts b/src/api/dynamic-workflow.tsindex 87471629..09771006 100644--- a/src/api/dynamic-workflow.ts+++ b/src/api/dynamic-workflow.ts@@ -130,7 +130,7 @@ export const MINIMAX_H3_IMAGE_NO_BUILDER =+ 'import it under Workflows and assign it to this model. Create then runs it with your prompt, size and LoRAs.'/** GH #192: what Create says for MOSS Image until LU has a graph of its own. */export const MOSS_IMAGE_NO_BUILDER =- 'MOSS Image has no workflow built into LU yet. Import a ComfyUI workflow that runs MOSS Image under Workflows and assign it to this model. '+ 'LU has no built in workflow for MOSS Image. Import a ComfyUI workflow that runs MOSS Image under Workflows and assign it to this model. '+ 'Create then runs it with your prompt, size and LoRAs.'/** A step distillation LoRA names its step count (minimax_h3_fl2v_turbo_8step_...). */const H3_STEP_LORA = /turbo\D*?(\d+)\s*_?steps?/idiff --git a/src/lib/own-workflow-fit.ts b/src/lib/own-workflow-fit.tsindex 93a61407..b56b0950 100644--- a/src/lib/own-workflow-fit.ts+++ b/src/lib/own-workflow-fit.ts@@ -22,9 +22,11 @@ export function modelNeedsUnetLoader(type: string, source?: ComfyModelSource): b/** Null when the workflow fits, else why it is set aside. */export function ownWorkflowMisfit(classTypes: readonly string[], type: string, source?: ComfyModelSource): string | null {- // GH #192: for a model LU does not know, the user's assignment is the only- // knowledge there is; LU's own builder has nothing to run it with anyway.- if (type === 'unknown') return null+ // GH #192: for a model LU does not know, found in no folder that says what+ // it is, the user's assignment is the only knowledge there is; it used to be+ // taken for a checkpoint and a UNET workflow was dropped. Where the folder+ // is known, it decides as for every model (#196).+ if (type === 'unknown' && !source) return nullconst needsUnet = modelNeedsUnetLoader(type, source)const hasUnet = classTypes.includes('UNETLoader')const hasCheckpoint = classTypes.includes('CheckpointLoaderSimple')diff --git a/src/lib/param-hints.ts b/src/lib/param-hints.tsindex 14a076b0..9bc26c3e 100644--- a/src/lib/param-hints.ts+++ b/src/lib/param-hints.ts@@ -13,6 +13,8 @@ import type { ModelType } from '../api/comfyui'export const LOW_CFG_FAMILIES: Partial<Record<ModelType, number>> = {flux: 1, flux2: 1, krea2: 1, qwenimage: 1, hidream: 1, ernie_image: 1, minimaxh3image: 1,zimage: 3.5, chroma: 3.5, qwenimage1: 4, sd3: 4, lumina2: 4,+ // GH #192: MOSS Image runs at CFG 3 (OpenMOSS default).+ mossimage: 3,}/** Z-Image: Turbo runs at 1, Base at about 3.5 to 5 (LU starts at 3.5, the