Skip to content

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.

feat(models): Noct Q, a Qwen-Image 2.1 finetune, as its own image bundle

purple64e325cb15d9
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c7b021c1..e2d60f13 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -41,6 +41,16 @@ image models in the cloud catalogue.
the Expert settings in Create have a "Text encoder" row to pick which one
reads your prompt, for new pictures, for edits and for pictures made in
chat. The official one stays the default.
+- **Noct Q, an unfiltered finetune of Qwen-Image 2.1, is in the Model
+ Manager.** Models, Image, Get new has "Noct Q (Qwen-Image 2.1,
+ Unfiltered)", a community finetune of Qwen-Image 2.1 by Noctaluna. Here
+ the image model itself is changed: its notice says the Qwen-Image 2.1
+ transformer weights were modified. It uses the official text encoder and
+ VAE, so if you already have Qwen-Image 2.1, only the image model is
+ downloaded, about 7 GB. The app treats it as Qwen-Image 2.1: new pictures,
+ edits with reference images, transparent background, the text encoder
+ choice and the prompt enhancer are there for it. Qwen Research License,
+ non-commercial use. Not yet run on our own hardware.
- **"Improve my prompt" lets your chat model rewrite the prompt before a
run.** The switch is in the advanced settings, off by default and
remembered. When it is on, the chat model you picked rewrites your prompt
diff --git a/README.md b/README.md
index 54e912e6..7eb003a4 100644
--- a/README.md
+++ b/README.md
@@ -152,6 +152,7 @@ GLM 5.3 is in the catalog too, but its smallest local quant is 217 GB, so on a d
| Z-Image Turbo | 10-16 GB | Unfiltered. Loads slowly below 16 GB. |
| Qwen-Image 2.1 | 16-24 GB | Generates and edits in one model. Needs ComfyUI 0.37.0. Research license, non-commercial. |
| Qwen-Image 2.1 (No Refusals) | 16-24 GB | The same model with a community text encoder that has its refusals removed (Heretic). |
+| Noct Q (Qwen-Image 2.1, Unfiltered) | 16-24 GB | A community finetune of Qwen-Image 2.1 with modified image model weights. Research license, non-commercial. |
| ERNIE-Image Turbo | 24 GB | Baidu DiT, eight steps. |
### Video
diff --git a/e2e/qwen-prompt-enhancer.spec.ts b/e2e/qwen-prompt-enhancer.spec.ts
index ddde1f24..f3accbe1 100644
--- a/e2e/qwen-prompt-enhancer.spec.ts
+++ b/e2e/qwen-prompt-enhancer.spec.ts
@@ -9,7 +9,12 @@ import { seedOnboardingDone } from './support/cloud-mock'
* files in its text encoder folder. Nothing is rendered.
*/
-const QWEN = 'qwen_image_2.1_int8_convrot.safetensors'
+// Once per image model file of the family: the official weights and the Noct
+// Q finetune, whose file name says neither "qwen" nor "2.1".
+const WEIGHTS = [
+ ['official weights', 'qwen_image_2.1_int8_convrot.safetensors'],
+ ['Noct Q', 'NoctQ_V4_int8_convrot.safetensors'],
+] as const
const ENCODER = 'qwen3vl_8b_int8_convrot.safetensors'
const ENHANCERS = [
'qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors',
@@ -18,7 +23,7 @@ const ENHANCERS = [
'qwen3.5_9b_qwen_image_2.1_pe_i2i_heretic.int8_convrot.safetensors',
]
-async function bootWithFakeComfy(page: Page, textEncoders: string[]) {
+async function bootWithFakeComfy(page: Page, model: string, textEncoders: string[]) {
await page.addInitScript(tauriMockInit, { assistantReply: DEFAULT_ASSISTANT_REPLY, modelName: DEFAULT_MODEL_NAME, platform: 'windows' as const })
await seedOnboardingDone(page)
await page.addInitScript(([model, encoders]) => {
@@ -45,7 +50,7 @@ async function bootWithFakeComfy(page: Page, textEncoders: string[]) {
if (url.includes('/object_info')) return Promise.resolve(JSON.stringify(nodes))
return Promise.resolve('{}')
}
- }, [QWEN, textEncoders] as const)
+ }, [model, textEncoders] as const)
}
async function openAdvanced(page: Page, intent: string) {
@@ -62,48 +67,50 @@ const saved = (page: Page) => page.evaluate(() => {
return { improvePrompt: state?.improvePrompt, improveWith: state?.improveWith }
})
-test('with the enhancers installed, the one switch offers who writes and remembers the pick', async ({ page }) => {
- await bootWithFakeComfy(page, [ENCODER, ...ENHANCERS])
- await openAdvanced(page, 'Image')
- await expect(theSwitch(page)).toBeVisible({ timeout: 15_000 })
- await expect(theSwitch(page)).toHaveCount(1)
- await expect(theSwitch(page)).toHaveAttribute('aria-checked', 'false')
- await expect(writers(page)).toHaveCount(0)
+for (const [weights, model] of WEIGHTS) {
+ test(`${weights}: with the enhancers installed, the one switch offers who writes and remembers the pick`, async ({ page }) => {
+ await bootWithFakeComfy(page, model, [ENCODER, ...ENHANCERS])
+ await openAdvanced(page, 'Image')
+ await expect(theSwitch(page)).toBeVisible({ timeout: 15_000 })
+ await expect(theSwitch(page)).toHaveCount(1)
+ await expect(theSwitch(page)).toHaveAttribute('aria-checked', 'false')
+ await expect(writers(page)).toHaveCount(0)
- await theSwitch(page).click()
- await expect(theSwitch(page)).toHaveAttribute('aria-checked', 'true')
- await expect(writers(page).getByRole('radio')).toHaveText(['Qwen enhancer', 'Qwen enhancer, no refusals', 'Chat model'])
- await expect(page.getByRole('radio', { name: 'Qwen enhancer', exact: true })).toHaveAttribute('aria-checked', 'true')
+ await theSwitch(page).click()
+ await expect(theSwitch(page)).toHaveAttribute('aria-checked', 'true')
+ await expect(writers(page).getByRole('radio')).toHaveText(['Qwen enhancer', 'Qwen enhancer, no refusals', 'Chat model'])
+ await expect(page.getByRole('radio', { name: 'Qwen enhancer', exact: true })).toHaveAttribute('aria-checked', 'true')
- await page.getByRole('radio', { name: 'Qwen enhancer, no refusals' }).click()
- await expect(page.getByRole('radio', { name: 'Qwen enhancer, no refusals' })).toHaveAttribute('aria-checked', 'true')
- await expect.poll(() => saved(page)).toEqual({ improvePrompt: true, improveWith: 'unfiltered' })
+ await page.getByRole('radio', { name: 'Qwen enhancer, no refusals' }).click()
+ await expect(page.getByRole('radio', { name: 'Qwen enhancer, no refusals' })).toHaveAttribute('aria-checked', 'true')
+ await expect.poll(() => saved(page)).toEqual({ improvePrompt: true, improveWith: 'unfiltered' })
- // Nothing of it sits in or above the prompt field: with the drawer closed
- // the page shows neither the switch nor the row.
- await page.keyboard.press('Escape')
- await expect(theSwitch(page)).toHaveCount(0)
- await expect(page.getByText('Rewritten by')).toHaveCount(0)
-})
+ // Nothing of it sits in or above the prompt field: with the drawer closed
+ // the page shows neither the switch nor the row.
+ await page.keyboard.press('Escape')
+ await expect(theSwitch(page)).toHaveCount(0)
+ await expect(page.getByText('Rewritten by')).toHaveCount(0)
+ })
-test('Edit gets the switch through the edit enhancer and lists no chat model', async ({ page }) => {
- await bootWithFakeComfy(page, [ENCODER, ...ENHANCERS])
- await openAdvanced(page, 'Edit / Image to Image')
- await expect(theSwitch(page)).toBeVisible({ timeout: 15_000 })
- await theSwitch(page).click()
- await expect(writers(page).getByRole('radio')).toHaveText(['Qwen enhancer', 'Qwen enhancer, no refusals'])
-})
+ test(`${weights}: Edit gets the switch through the edit enhancer and lists no chat model`, async ({ page }) => {
+ await bootWithFakeComfy(page, model, [ENCODER, ...ENHANCERS])
+ await openAdvanced(page, 'Edit / Image to Image')
+ await expect(theSwitch(page)).toBeVisible({ timeout: 15_000 })
+ await theSwitch(page).click()
+ await expect(writers(page).getByRole('radio')).toHaveText(['Qwen enhancer', 'Qwen enhancer, no refusals'])
+ })
-test('without an enhancer the switch is the chat model switch: no row, and none on Edit', async ({ page }) => {
- await bootWithFakeComfy(page, [ENCODER])
- await openAdvanced(page, 'Image')
- await expect(theSwitch(page)).toBeVisible({ timeout: 15_000 })
- await theSwitch(page).click()
- await expect(theSwitch(page)).toHaveAttribute('aria-checked', 'true')
- await expect(writers(page)).toHaveCount(0)
- await page.keyboard.press('Escape')
- await page.getByRole('radio', { name: 'Edit / Image to Image', exact: true }).click()
- await page.getByRole('button', { name: 'Advanced settings' }).click()
- await expect(page.getByRole('button', { name: 'Quality' })).toBeVisible()
- await expect(theSwitch(page)).toHaveCount(0)
-})
+ test(`${weights}: without an enhancer the switch is the chat model switch: no row, and none on Edit`, async ({ page }) => {
+ await bootWithFakeComfy(page, model, [ENCODER])
+ await openAdvanced(page, 'Image')
+ await expect(theSwitch(page)).toBeVisible({ timeout: 15_000 })
+ await theSwitch(page).click()
+ await expect(theSwitch(page)).toHaveAttribute('aria-checked', 'true')
+ await expect(writers(page)).toHaveCount(0)
+ await page.keyboard.press('Escape')
+ await page.getByRole('radio', { name: 'Edit / Image to Image', exact: true }).click()
+ await page.getByRole('button', { name: 'Advanced settings' }).click()
+ await expect(page.getByRole('button', { name: 'Quality' })).toBeVisible()
+ await expect(theSwitch(page)).toHaveCount(0)
+ })
+}
diff --git a/e2e/qwen-text-encoder.spec.ts b/e2e/qwen-text-encoder.spec.ts
index 7611f5c3..40823ae1 100644
--- a/e2e/qwen-text-encoder.spec.ts
+++ b/e2e/qwen-text-encoder.spec.ts
@@ -8,13 +8,19 @@ import { seedOnboardingDone } from './support/cloud-mock'
* to pick which one reads the prompt. A rebuilt ComfyUI answers through
* proxy_localhost with a local Qwen-Image 2.1 and, per test, the files in its
* text encoder folder. Nothing is rendered.
+ *
+ * Run once per image model file of the family: the official weights and the
+ * Noct Q finetune, whose file name says neither "qwen" nor "2.1".
*/
-const QWEN = 'qwen_image_2.1_int8_convrot.safetensors'
+const WEIGHTS = [
+ ['official weights', 'qwen_image_2.1_int8_convrot.safetensors'],
+ ['Noct Q', 'NoctQ_V4_int8_convrot.safetensors'],
+] as const
const OFFICIAL = 'qwen3vl_8b_int8_convrot.safetensors'
const FREE = 'qwen3vl_8b_int8_convrot_heretic.safetensors'
-async function bootWithFakeComfy(page: Page, textEncoders: string[]) {
+async function bootWithFakeComfy(page: Page, model: string, textEncoders: string[]) {
await page.addInitScript(tauriMockInit, { assistantReply: DEFAULT_ASSISTANT_REPLY, modelName: DEFAULT_MODEL_NAME, platform: 'windows' as const })
await seedOnboardingDone(page)
await page.addInitScript(([model, encoders]) => {
@@ -41,7 +47,7 @@ async function bootWithFakeComfy(page: Page, textEncoders: string[]) {
if (url.includes('/object_info')) return Promise.resolve(JSON.stringify(nodes))
return Promise.resolve('{}')
}
- }, [QWEN, textEncoders] as const)
+ }, [model, textEncoders] as const)
}
async function openExpert(page: Page, intent: string) {
@@ -55,34 +61,36 @@ async function openExpert(page: Page, intent: string) {
const row = (page: Page) => page.getByRole('button', { name: 'Text encoder', exact: true })
const saved = (page: Page) => page.evaluate(() => JSON.parse(localStorage.getItem('create-store') || '{}').state?.qwenTextEncoder)
-test('with both text encoders installed, Expert offers which one reads the prompt and remembers the pick', async ({ page }) => {
- await bootWithFakeComfy(page, [OFFICIAL, FREE])
- await openExpert(page, 'Image')
- await expect(row(page)).toBeVisible({ timeout: 15_000 })
- await expect(row(page)).toHaveCount(1)
- await expect(row(page)).toHaveText('Qwen3-VL 8B')
+for (const [weights, model] of WEIGHTS) {
+ test(`${weights}: with both text encoders installed, Expert offers which one reads the prompt and remembers the pick`, async ({ page }) => {
+ await bootWithFakeComfy(page, model, [OFFICIAL, FREE])
+ await openExpert(page, 'Image')
+ await expect(row(page)).toBeVisible({ timeout: 15_000 })
+ await expect(row(page)).toHaveCount(1)
+ await expect(row(page)).toHaveText('Qwen3-VL 8B')
- await row(page).click()
- await expect(page.getByRole('option')).toHaveText(['Qwen3-VL 8B', 'Qwen3-VL 8B, no refusals'])
- await page.getByRole('option', { name: 'Qwen3-VL 8B, no refusals' }).click()
- await expect(row(page)).toHaveText('Qwen3-VL 8B, no refusals')
- await expect.poll(() => saved(page)).toBe('unfiltered')
+ await row(page).click()
+ await expect(page.getByRole('option')).toHaveText(['Qwen3-VL 8B', 'Qwen3-VL 8B, no refusals'])
+ await page.getByRole('option', { name: 'Qwen3-VL 8B, no refusals' }).click()
+ await expect(row(page)).toHaveText('Qwen3-VL 8B, no refusals')
+ await expect.poll(() => saved(page)).toBe('unfiltered')
- // Nothing of it sits in or above the prompt field: with the drawer closed
- // the page shows no such row.
- await page.keyboard.press('Escape')
- await expect(row(page)).toHaveCount(0)
- await expect(page.getByText('Text encoder', { exact: true })).toHaveCount(0)
+ // Nothing of it sits in or above the prompt field: with the drawer closed
+ // the page shows no such row.
+ await page.keyboard.press('Escape')
+ await expect(row(page)).toHaveCount(0)
+ await expect(page.getByText('Text encoder', { exact: true })).toHaveCount(0)
- // The pick is still there after a restart, and Edit shows the same row.
- await page.reload()
- await openExpert(page, 'Edit / Image to Image')
- await expect(row(page)).toHaveText('Qwen3-VL 8B, no refusals', { timeout: 15_000 })
-})
+ // The pick is still there after a restart, and Edit shows the same row.
+ await page.reload()
+ await openExpert(page, 'Edit / Image to Image')
+ await expect(row(page)).toHaveText('Qwen3-VL 8B, no refusals', { timeout: 15_000 })
+ })
-test('with one text encoder installed there is nothing to choose and no row', async ({ page }) => {
- await bootWithFakeComfy(page, [FREE])
- await openExpert(page, 'Image')
- await expect(page.getByText('Sampler', { exact: true })).toBeVisible({ timeout: 15_000 })
- await expect(row(page)).toHaveCount(0)
-})
+ test(`${weights}: with one text encoder installed there is nothing to choose and no row`, async ({ page }) => {
+ await bootWithFakeComfy(page, model, [FREE])
+ await openExpert(page, 'Image')
+ await expect(page.getByText('Sampler', { exact: true })).toBeVisible({ timeout: 15_000 })
+ await expect(row(page)).toHaveCount(0)
+ })
+}
diff --git a/src/api/__tests__/noct-q-bundle.test.ts b/src/api/__tests__/noct-q-bundle.test.ts
new file mode 100644
index 00000000..e407ff83
--- /dev/null
+++ b/src/api/__tests__/noct-q-bundle.test.ts
@@ -0,0 +1,100 @@
+/**
+ * Noct Q in the Model Manager: a community finetune of Qwen-Image 2.1 as its
+ * own bundle next to the two Qwen-Image 2.1 bundles.
+ *
+ * Read off Hugging Face on 2026-10-03 without a token (model API, tree API,
+ * NOTICE, model card, HEAD on the file, and the safetensors headers by Range):
+ * - Noctaluna/Noct-Q-Uncensored-Qwen-Image-2.1: not gated, not private,
+ * licence "qwen-research", base model Qwen/Qwen-Image-2.1
+ * - NoctQ_V4_int8_convrot.safetensors, 7256784368 bytes, lfs.oid 4d92d553...
+ * - NOTICE: "the Qwen-Image-2.1 transformer weights were modified by noctaluna"
+ * - the card names the official text encoder and the official VAE
+ * - header: 649 tensors, names, shapes and data types equal to the official
+ * qwen_image_2.1_int8_convrot.safetensors (192 I8, 192 U8, 192 F32, 73 BF16)
+ *
+ * That the lane runs the file is in the tests parametrised over both weights
+ * (qwen-image-21-workflow, -transparent, -no-refusals, the two useCreate tests).
+ *
+ * Run: npx vitest run src/api/__tests__/noct-q-bundle.test.ts
+ */
+import { describe, it, expect } from 'vitest'
+import { getImageBundles } from '../discover'
+import { classifyModel } from '../comfyui'
+import { localTier } from '../../lib/render/local-model-tier'
+import { NOCT_Q_MODEL } from './qwen21-weights'
+
+const all = getImageBundles()
+const official = all.find((b) => b.name === 'Qwen-Image 2.1 (Generate and Edit)')!
+const noRefusals = all.find((b) => b.name === 'Qwen-Image 2.1 (No Refusals)')!
+const bundle = all.find((b) => b.name === 'Noct Q (Qwen-Image 2.1, Unfiltered)')!
+const file = (b: typeof bundle, folder: string) => b.files.find((f) => f.subfolder === folder)!
+
+describe('bundle Noct Q (Qwen-Image 2.1, Unfiltered)', () => {
+ it('exists once, under Image, right after the two Qwen-Image 2.1 bundles', () => {
+ expect(all.filter((b) => b.name === bundle.name)).toHaveLength(1)
+ expect(all.indexOf(noRefusals)).toBe(all.indexOf(official) + 1)
+ expect(all.indexOf(bundle)).toBe(all.indexOf(noRefusals) + 1)
+ expect(bundle.workflow).toBe('qwenimage')
+ })
+
+ it('is in the list of unfiltered models and is not marked verified', () => {
+ expect(bundle.uncensored).toBe(true)
+ expect(bundle.verified).toBeUndefined()
+ expect(bundle.tags).toContain('Unfiltered')
+ })
+
+ it('the image model is the V4 file, with byte count and SHA-256, in diffusion_models', () => {
+ const model = file(bundle, 'diffusion_models')
+ expect(bundle.files).toHaveLength(3)
+ expect(model.filename).toBe(NOCT_Q_MODEL)
+ expect(model.downloadUrl).toBe(`https://huggingface.co/Noctaluna/Noct-Q-Uncensored-Qwen-Image-2.1/resolve/main/${NOCT_Q_MODEL}`)
+ expect(model.sizeBytes).toBe(7_256_784_368)
+ expect(model.sha256).toBe('4d92d5538253ab36e6a73b056cce5f697950f4303cb9e6686a3198d0ea13f9e8')
+ expect(Math.abs(model.sizeGB! - 7_256_784_368 / 1_073_741_824)).toBeLessThan(0.01)
+ })
+
+ it('the catalogue file is recognised as Qwen-Image 2.1, at the tier of the bundle', () => {
+ const type = classifyModel(file(bundle, 'diffusion_models').filename)
+ expect(type).toBe(bundle.workflow)
+ expect(localTier({ name: NOCT_Q_MODEL, type })).toBe(bundle.tier)
+ })
+
+ it('the text encoder and the VAE are the very entries of the official bundle', () => {
+ expect(file(bundle, 'text_encoders')).toBe(file(official, 'text_encoders'))
+ expect(file(bundle, 'vae')).toBe(file(official, 'vae'))
+ expect(file(bundle, 'vae')).toBe(file(noRefusals, 'vae'))
+ expect(file(bundle, 'text_encoders').filename).toBe('qwen3vl_8b_int8_convrot.safetensors')
+ })
+
+ it('the total is the sum of its three files', () => {
+ const sum = bundle.files.reduce((n, f) => n + f.sizeGB!, 0)
+ expect(Math.abs(bundle.totalSizeGB - sum)).toBeLessThan(0.05)
+ })
+
+ it('tier, VRAM figure and numbers are those of the official bundle', () => {
+ expect(bundle.tier).toBe(official.tier)
+ expect(bundle.vramRequired).toBe(official.vramRequired)
+ expect(bundle.vramMinGB).toBe(official.vramMinGB)
+ expect(bundle.vramComfortGB).toBe(official.vramComfortGB)
+ expect(bundle.customNodes).toBeUndefined()
+ })
+
+ it('says what it is, what was changed, what is shared, and the licence', () => {
+ const d = bundle.description
+ expect(d).toContain('A community finetune of Qwen-Image 2.1 by Noctaluna')
+ expect(d).toContain('the Qwen-Image 2.1 transformer weights were modified')
+ expect(d).toContain('The text encoder and the VAE are the official files')
+ expect(d).toContain('Qwen Research License, non-commercial use: https://huggingface.co/Noctaluna/Noct-Q-Uncensored-Qwen-Image-2.1/blob/main/LICENSE')
+ })
+
+ it('makes no quality or speed claim, names nothing explicit, and has no dash', () => {
+ const texts = [bundle.name, bundle.description, ...bundle.tags, ...bundle.files.flatMap((f) => [f.name, f.description])]
+ // The repository address carries the name its author gave it; the words
+ // the app writes itself are what is checked.
+ for (const text of texts.map((t) => t.replace(/https:\/\/\S+/g, ''))) {
+ expect(text).not.toMatch(/[\u2013\u2014]/)
+ expect(text).not.toMatch(/faster|better|sharper|quality|realis|stunning|best/i)
+ expect(text).not.toMatch(/nsfw|nud|explicit|uncensored|adult|porn|sex/i)
+ }
+ })
+})
diff --git a/src/api/__tests__/qwen-image-21-no-refusals-installed.test.ts b/src/api/__tests__/qwen-image-21-no-refusals-installed.test.ts
index 4ef3445c..c80dcaed 100644
--- a/src/api/__tests__/qwen-image-21-no-refusals-installed.test.ts
+++ b/src/api/__tests__/qwen-image-21-no-refusals-installed.test.ts
@@ -1,7 +1,10 @@
/**
- * The two Qwen-Image 2.1 bundles share the image model and the VAE and differ
- * in the text encoder. So the card of one must not read Installed on the
- * files of the other: the encoder is what makes each bundle what it is.
+ * The three Qwen-Image 2.1 bundles share files: the official one and the one
+ * without refusals share the image model and the VAE and differ in the text
+ * encoder, Noct Q shares the text encoder and the VAE with the official one
+ * and differs in the image model. So the card of one must not read Installed
+ * on the files of another: the file that differs is what makes each bundle
+ * what it is.
*
* Run: npx vitest run src/api/__tests__/qwen-image-21-no-refusals-installed.test.ts
*/
@@ -24,7 +27,7 @@ vi.mock('../comfyui', async (importOriginal) => ({
readComfyFolderLists: async () => {
const names = [...onDisk.files.keys()]
return {
- diffusion_models: names.filter((n) => n.startsWith('qwen_image_2.1_int8')),
+ diffusion_models: names.filter((n) => n.startsWith('qwen_image_2.1_int8') || n.startsWith('NoctQ')),
vae: names.filter((n) => n.includes('vae')),
text_encoders: names.filter((n) => n.startsWith('qwen3vl')),
}
@@ -39,28 +42,45 @@ const MODEL = ['qwen_image_2.1_int8_convrot.safetensors', 7_256_783_064] as cons
const VAE = ['qwen_image_2.1_vae_bf16.safetensors', 675_509_688] as const
const OFFICIAL = ['qwen3vl_8b_int8_convrot.safetensors', 9_350_798_360] as const
const FREE = ['qwen3vl_8b_int8_convrot_heretic.safetensors', 9_350_828_392] as const
+const NOCT = ['NoctQ_V4_int8_convrot.safetensors', 7_256_784_368] as const
const OFFICIAL_BUNDLE = 'Qwen-Image 2.1 (Generate and Edit)'
const FREE_BUNDLE = 'Qwen-Image 2.1 (No Refusals)'
-const bundles = getImageBundles().filter((b) => b.name === OFFICIAL_BUNDLE || b.name === FREE_BUNDLE)
+const NOCT_BUNDLE = 'Noct Q (Qwen-Image 2.1, Unfiltered)'
+const bundles = getImageBundles().filter((b) => [OFFICIAL_BUNDLE, FREE_BUNDLE, NOCT_BUNDLE].includes(b.name))
const have = (...files: (readonly [string, number])[]) => { onDisk.files = new Map(files) }
beforeEach(() => { onDisk.files = new Map() })
-describe('Installed, for the two Qwen-Image 2.1 bundles', () => {
+describe('Installed, for the three Qwen-Image 2.1 bundles', () => {
it('only the official files: the official card reads Installed, the other one does not', async () => {
have(MODEL, VAE, OFFICIAL)
- expect(await checkBundlesInstalled(bundles)).toEqual({ [OFFICIAL_BUNDLE]: true, [FREE_BUNDLE]: false })
+ expect(await checkBundlesInstalled(bundles)).toEqual({ [OFFICIAL_BUNDLE]: true, [FREE_BUNDLE]: false, [NOCT_BUNDLE]: false })
})
it('the edition without refusals alone: its card reads Installed, the official one does not', async () => {
have(MODEL, VAE, FREE)
- expect(await checkBundlesInstalled(bundles)).toEqual({ [OFFICIAL_BUNDLE]: false, [FREE_BUNDLE]: true })
+ expect(await checkBundlesInstalled(bundles)).toEqual({ [OFFICIAL_BUNDLE]: false, [FREE_BUNDLE]: true, [NOCT_BUNDLE]: false })
})
it('both encoders next to the shared files: both read Installed', async () => {
have(MODEL, VAE, OFFICIAL, FREE)
- expect(await checkBundlesInstalled(bundles)).toEqual({ [OFFICIAL_BUNDLE]: true, [FREE_BUNDLE]: true })
+ expect(await checkBundlesInstalled(bundles)).toEqual({ [OFFICIAL_BUNDLE]: true, [FREE_BUNDLE]: true, [NOCT_BUNDLE]: false })
+ })
+
+ it('Noct Q with the official text encoder and the VAE: only its card reads Installed', async () => {
+ have(NOCT, VAE, OFFICIAL)
+ expect(await checkBundlesInstalled(bundles)).toEqual({ [OFFICIAL_BUNDLE]: false, [FREE_BUNDLE]: false, [NOCT_BUNDLE]: true })
+ })
+
+ it('Noct Q next to the encoder without refusals only: no card reads Installed', async () => {
+ have(NOCT, VAE, FREE)
+ expect(await checkBundlesInstalled(bundles)).toEqual({ [OFFICIAL_BUNDLE]: false, [FREE_BUNDLE]: false, [NOCT_BUNDLE]: false })
+ })
+
+ it('everything on disk: all three read Installed', async () => {
+ have(MODEL, NOCT, VAE, OFFICIAL, FREE)
+ expect(await checkBundlesInstalled(bundles)).toEqual({ [OFFICIAL_BUNDLE]: true, [FREE_BUNDLE]: true, [NOCT_BUNDLE]: true })
})
})
diff --git a/src/api/__tests__/qwen-image-21-no-refusals.test.ts b/src/api/__tests__/qwen-image-21-no-refusals.test.ts
index b8a67c0f..177d0ae2 100644
--- a/src/api/__tests__/qwen-image-21-no-refusals.test.ts
+++ b/src/api/__tests__/qwen-image-21-no-refusals.test.ts
@@ -41,8 +41,8 @@ import { isQwenEnhancerFile, improveWriters, pickQwenEnhancer } from '../../lib/
import { extraReferenceSlots } from '../../lib/edit-references'
import { supportsTransparent } from '../../lib/transparent-image'
import { localTier } from '../../lib/render/local-model-tier'
+import { QWEN21_OFFICIAL_MODEL as MODEL, NOCT_Q_MODEL, QWEN21_WEIGHTS } from './qwen21-weights'
-const MODEL = 'qwen_image_2.1_int8_convrot.safetensors'
const OFFICIAL = 'qwen3vl_8b_int8_convrot.safetensors'
const FREE = 'qwen3vl_8b_int8_convrot_heretic.safetensors'
const VAE_FILE = 'qwen_image_2.1_vae_bf16.safetensors'
@@ -52,7 +52,7 @@ const T2I_FREE = 'qwen3.5_9b_qwen_image_2.1_pe_t2i_heretic.int8_convrot.safetens
const I2I_FREE = 'qwen3.5_9b_qwen_image_2.1_pe_i2i_heretic.int8_convrot.safetensors'
const nodes = (withEncodeNode = true) => ({
- UNETLoader: { input: { required: { unet_name: [[MODEL]] } } },
+ UNETLoader: { input: { required: { unet_name: [[MODEL, NOCT_Q_MODEL]] } } },
CLIPLoader: { input: { required: { clip_name: [[OFFICIAL, FREE]] } } },
VAELoader: { input: { required: { vae_name: [[VAE_FILE]] } } },
...(withEncodeNode
@@ -66,12 +66,12 @@ const nodes = (withEncodeNode = true) => ({
SaveImage: { input: { required: {} } },
})
-const baseParams = {
- model: MODEL,
+const paramsFor = (model: string) => ({
+ model,
prompt: 'a red apple on a white plate', negativePrompt: '',
sampler: 'euler', scheduler: 'simple',
steps: 25, cfgScale: 1, width: 1024, height: 1024, seed: 42, batchSize: 1,
-}
+})
/** What ComfyUI lists in models/text_encoders and models/vae. */
function serve(clips: string[], vaes: string[] = [VAE_FILE]) {
@@ -155,7 +155,7 @@ describe('which encoder a run takes', () => {
// ── The resolver ComfyUI graphs are built from ──────────────────────────
-describe('findMatchingCLIP for Qwen-Image 2.1', () => {
+describe.each(QWEN21_WEIGHTS)('findMatchingCLIP for Qwen-Image 2.1, %s', (_weights, MODEL) => {
it('only the edition without refusals installed: it is the encoder', async () => {
serve([FREE])
expect(await findMatchingCLIP('qwenimage', MODEL)).toBe(FREE)
@@ -193,23 +193,25 @@ describe('findMatchingCLIP for Qwen-Image 2.1', () => {
// ── Every graph of the family, with the other encoder in the loader ─────
-/** The same run built twice: with the official encoder, and with the edition
- * without refusals. Nothing but the loader's file name may differ. */
-async function bothGraphs(params: Record<string, unknown>) {
- serve([OFFICIAL])
- const official = await buildDynamicWorkflow({ ...baseParams, ...params } as never)
- serve([FREE])
- const free = await buildDynamicWorkflow({ ...baseParams, ...params } as never)
- return { official, free }
-}
-
function withEncoder(graph: Awaited<ReturnType<typeof buildDynamicWorkflow>>, file: string) {
const copy = JSON.parse(JSON.stringify(graph)) as typeof graph
nodeOf(copy, 'CLIPLoader')![1].inputs.clip_name = file
return copy
}
-describe('buildDynamicWorkflow with the encoder without refusals', () => {
+describe.each(QWEN21_WEIGHTS)('buildDynamicWorkflow with the encoder without refusals, %s', (_weights, MODEL) => {
+ const baseParams = paramsFor(MODEL)
+
+ /** The same run built twice: with the official encoder, and with the edition
+ * without refusals. Nothing but the loader's file name may differ. */
+ async function bothGraphs(params: Record<string, unknown>) {
+ serve([OFFICIAL])
+ const official = await buildDynamicWorkflow({ ...baseParams, ...params } as never)
+ serve([FREE])
+ const free = await buildDynamicWorkflow({ ...baseParams, ...params } as never)
+ return { official, free }
+ }
+
const cases: [string, Record<string, unknown>][] = [
['Image: generate from a prompt', {}],
['Edit without a mask: one source image', { prompt: 'put a blue hat on the person', inputImage: 'source.png', denoise: 0.7 }],
@@ -278,7 +280,7 @@ describe('buildDynamicWorkflow with the encoder without refusals', () => {
// ── What hangs on the family, not on the encoder ────────────────────────
-describe('what the family can do does not depend on the encoder', () => {
+describe.each(QWEN21_WEIGHTS)('what the family can do does not depend on the encoder, %s', (_weights, MODEL) => {
it('reference slots, transparent background and the tier come from the image model', () => {
const type = classifyModel(MODEL)
expect(extraReferenceSlots(type, MODEL)).toBe(3)
@@ -287,7 +289,7 @@ describe('what the family can do does not depend on the encoder', () => {
})
it('the prompt enhancers are found and picked the same with this encoder installed', () => {
- const situation = { local: true, modelType: 'qwenimage', textEncoders: [FREE, T2I, T2I_FREE, I2I_FREE] }
+ const situation = { local: true, modelType: classifyModel(MODEL), textEncoders: [FREE, T2I, T2I_FREE, I2I_FREE] }
expect(improveWriters({ ...situation, intent: 'image' }).map((w) => w.id)).toEqual(['official', 'unfiltered', 'chat'])
expect(pickQwenEnhancer({ ...situation, intent: 'image' }, 'unfiltered')?.file).toBe(T2I_FREE)
expect(pickQwenEnhancer({ ...situation, intent: 'edit' }, 'auto')?.file).toBe(I2I_FREE)
diff --git a/src/api/__tests__/qwen-image-21-transparent.test.ts b/src/api/__tests__/qwen-image-21-transparent.test.ts
index dd28bd65..0083e835 100644
--- a/src/api/__tests__/qwen-image-21-transparent.test.ts
+++ b/src/api/__tests__/qwen-image-21-transparent.test.ts
@@ -27,13 +27,13 @@ import { getAllNodeInfo } from '../comfyui-nodes'
import { localFetch } from '../backend'
import { transparentPrompt } from '../../lib/transparent-image'
import { nodeOf, nodesOf } from './graph-test-support'
+import { QWEN21_WEIGHTS } from './qwen21-weights'
-const MODEL = 'qwen_image_2.1_int8_convrot.safetensors'
const ENCODER = 'qwen3vl_8b_int8_convrot.safetensors'
const VAE_FILE = 'qwen_image_2.1_vae_bf16.safetensors'
-const QWEN_NODES = {
- UNETLoader: { input: { required: { unet_name: [[MODEL]] } } },
+const qwenNodes = (model: string) => ({
+ UNETLoader: { input: { required: { unet_name: [[model]] } } },
CLIPLoader: { input: { required: { clip_name: [[ENCODER]] } } },
VAELoader: { input: { required: { vae_name: [[VAE_FILE]] } } },
TextEncodeQwenImage21: { input: { required: { clip: ['CLIP'], prompt: ['STRING'], negative_prompt: ['STRING'], resolution: ['INT'] }, optional: { vae: ['VAE'], 'images.image_1': ['IMAGE'] } } },
@@ -43,17 +43,16 @@ const QWEN_NODES = {
VAEDecode: { input: { required: {} } },
LoadImage: { input: { required: {} } },
SaveImage: { input: { required: {} } },
-}
+})
-const baseParams = {
- model: MODEL,
+const paramsFor = (model: string) => ({
+ model,
prompt: 'a red apple on a white plate', negativePrompt: '',
sampler: 'euler', scheduler: 'simple',
steps: 25, cfgScale: 1, width: 1024, height: 1024, seed: 42, batchSize: 1,
-}
+})
beforeEach(() => {
- vi.mocked(getAllNodeInfo).mockResolvedValue(QWEN_NODES as never)
vi.mocked(localFetch).mockResolvedValue({
ok: true,
json: async () => ({
@@ -63,7 +62,10 @@ beforeEach(() => {
} as never)
})
-describe('Transparent background: the graph', () => {
+describe.each(QWEN21_WEIGHTS)('Transparent background: the graph, %s', (_weights, MODEL) => {
+ const baseParams = paramsFor(MODEL)
+ beforeEach(() => { vi.mocked(getAllNodeInfo).mockResolvedValue(qwenNodes(MODEL) as never) })
+
it('wraps the prompt the way the official template says', async () => {
const wf = await buildDynamicWorkflow({ ...baseParams, transparent: true } as never)
const enc = nodesOf(wf, 'TextEncodeQwenImage21')
diff --git a/src/api/__tests__/qwen-image-21-workflow.test.ts b/src/api/__tests__/qwen-image-21-workflow.test.ts
index 8cbe7ba5..04f9988e 100644
--- a/src/api/__tests__/qwen-image-21-workflow.test.ts
+++ b/src/api/__tests__/qwen-image-21-workflow.test.ts
@@ -45,14 +45,15 @@ import {
import { getImageBundles } from '../discover'
import { localFetch } from '../backend'
import { nodeOf, nodesOf } from './graph-test-support'
+import { QWEN21_OFFICIAL_MODEL as OFFICIAL_MODEL, NOCT_Q_MODEL, QWEN21_WEIGHTS } from './qwen21-weights'
-const MODEL = 'qwen_image_2.1_int8_convrot.safetensors'
const ENCODER = 'qwen3vl_8b_int8_convrot.safetensors'
const VAE_FILE = 'qwen_image_2.1_vae_bf16.safetensors'
-/** Minimal /object_info for a ComfyUI new enough to run Qwen-Image 2.1. */
-const QWEN_NODES = {
- UNETLoader: { input: { required: { unet_name: [[MODEL]] } } },
+/** Minimal /object_info for a ComfyUI new enough to run Qwen-Image 2.1, with
+ * one image model file in the UNETLoader. */
+const qwenNodes = (model: string) => ({
+ UNETLoader: { input: { required: { unet_name: [[model]] } } },
CLIPLoader: { input: { required: { clip_name: [[ENCODER]] } } },
VAELoader: { input: { required: { vae_name: [[VAE_FILE]] } } },
TextEncodeQwenImage21: { input: { required: { clip: ['CLIP'], prompt: ['STRING'], negative_prompt: ['STRING'], resolution: ['INT'] }, optional: { vae: ['VAE'], 'images.image_1': ['IMAGE'] } } },
@@ -62,17 +63,18 @@ const QWEN_NODES = {
VAEDecode: { input: { required: {} } },
LoadImage: { input: { required: {} } },
SaveImage: { input: { required: {} } },
-}
+})
+const OFFICIAL_NODES = qwenNodes(OFFICIAL_MODEL)
-const baseParams = {
- model: MODEL,
+const paramsFor = (model: string) => ({
+ model,
prompt: 'a red apple on a white plate', negativePrompt: '',
sampler: 'euler', scheduler: 'simple',
steps: 25, cfgScale: 1, width: 1024, height: 1024, seed: 42, batchSize: 1,
-}
+})
const emptyModels: AvailableModels = {
- checkpoints: [], unets: [MODEL], vaes: [VAE_FILE], clips: [ENCODER], motionModels: [],
+ checkpoints: [], unets: [OFFICIAL_MODEL], vaes: [VAE_FILE], clips: [ENCODER], motionModels: [],
}
function serveEnums(vaes: string[] = [VAE_FILE], clips: string[] = [ENCODER]) {
@@ -89,12 +91,30 @@ function serveEnums(vaes: string[] = [VAE_FILE], clips: string[] = [ENCODER]) {
describe('Qwen-Image 2.1 classification', () => {
it('names the catalogue file and the spelling variants', () => {
- expect(classifyModel(MODEL)).toBe('qwenimage')
+ expect(classifyModel(OFFICIAL_MODEL)).toBe('qwenimage')
expect(classifyModel('qwen_image_2.1_bf16.safetensors')).toBe('qwenimage')
expect(classifyModel('Qwen-Image-2.1-Q8_0.gguf')).toBe('qwenimage')
expect(classifyModel('qwenimage_2_1_w4a8.safetensors')).toBe('qwenimage')
})
+ // Noct Q is a Qwen-Image 2.1 finetune whose file names say neither "qwen"
+ // nor "2.1": the Hugging Face name, a CivitAI style name, a subfolder.
+ it('names the Noct Q finetune under the names it is published with', () => {
+ expect(classifyModel(NOCT_Q_MODEL)).toBe('qwenimage')
+ expect(classifyModel('NoctQ_V3_base_int8_convrot.safetensors')).toBe('qwenimage')
+ expect(classifyModel('noctQ_v4.safetensors')).toBe('qwenimage')
+ expect(classifyModel('noctQQwenImage21_v4Int8.safetensors')).toBe('qwenimage')
+ expect(classifyModel('Noct-Q-V4-fp8.safetensors')).toBe('qwenimage')
+ expect(classifyModel('noct_q_v4_bf16.safetensors')).toBe('qwenimage')
+ expect(classifyModel('qwen\\NoctQ_V4_int8_convrot.safetensors')).toBe('qwenimage')
+ })
+
+ it('COUNTER-CHECK: a name that merely starts like Noct Q is not taken for it', () => {
+ expect(classifyModel('noctquartz_xl.safetensors')).not.toBe('qwenimage')
+ expect(classifyModel('equinoctq.safetensors')).not.toBe('qwenimage')
+ expect(classifyModel('noctaluna_style_sdxl.safetensors')).not.toBe('qwenimage')
+ })
+
// The regression that matters: this classifier also sees VAE and text
// encoder filenames (the addon inventory lane runs every folder through it).
it('does NOT swallow the text encoder or any companion file', () => {
@@ -166,7 +186,7 @@ describe('Qwen-Image 2.1 COMPONENT_REGISTRY', () => {
// ── Strategy gate ───────────────────────────────────────────────────────
describe('determineStrategy, the Qwen-Image 2.1 gate', () => {
- const full: CategorizedNodes = categorizeNodes(QWEN_NODES as never)
+ const full: CategorizedNodes = categorizeNodes(OFFICIAL_NODES as never)
it('routes to unet_qwenimage when the loaders and the encode node are there', () => {
const r = determineStrategy('qwenimage', false, full, emptyModels)
@@ -193,7 +213,9 @@ describe('determineStrategy, the Qwen-Image 2.1 gate', () => {
// ── The generate graph ──────────────────────────────────────────────────
-describe('buildDynamicWorkflow, Qwen-Image 2.1 generate (no reference image)', () => {
+describe.each(QWEN21_WEIGHTS)('buildDynamicWorkflow, Qwen-Image 2.1 generate (no reference image), %s', (_weights, MODEL) => {
+ const QWEN_NODES = qwenNodes(MODEL)
+ const baseParams = paramsFor(MODEL)
beforeEach(() => {
vi.mocked(getAllNodeInfo).mockResolvedValue(QWEN_NODES as never)
serveEnums()
@@ -275,7 +297,9 @@ describe('buildDynamicWorkflow, Qwen-Image 2.1 generate (no reference image)', (
// ── The edit graph ──────────────────────────────────────────────────────
-describe('buildDynamicWorkflow, Qwen-Image 2.1 edit (one reference image)', () => {
+describe.each(QWEN21_WEIGHTS)('buildDynamicWorkflow, Qwen-Image 2.1 edit (one reference image), %s', (_weights, MODEL) => {
+ const QWEN_NODES = qwenNodes(MODEL)
+ const baseParams = paramsFor(MODEL)
beforeEach(() => {
vi.mocked(getAllNodeInfo).mockResolvedValue(QWEN_NODES as never)
serveEnums()
@@ -335,8 +359,8 @@ describe('buildDynamicWorkflow, Qwen-Image 2.1 edit (one reference image)', () =
// ── Companion resolution ────────────────────────────────────────────────
-describe('the resolvers pick the 2.1 files, and leave Krea 2 its own', () => {
- beforeEach(() => { vi.mocked(getAllNodeInfo).mockResolvedValue(QWEN_NODES as never) })
+describe.each(QWEN21_WEIGHTS)('the resolvers pick the 2.1 files, and leave Krea 2 its own, %s', (_weights, MODEL) => {
+ beforeEach(() => { vi.mocked(getAllNodeInfo).mockResolvedValue(qwenNodes(MODEL) as never) })
// A box can hold both families at once now that both are in the Model
// Manager, and their companion filenames are one tier apart.
@@ -373,10 +397,10 @@ describe('the resolvers pick the 2.1 files, and leave Krea 2 its own', () => {
describe('Qwen-Image 2.1 bundle', () => {
const bundle = getImageBundles().find(b => b.workflow === 'qwenimage')
- it('exists exactly once, next to the one edition with the other text encoder', () => {
+ it('exists exactly once, next to the edition with the other text encoder and the Noct Q finetune', () => {
// The two prompt enhancer add-ons share the family and carry no model file.
const withModel = getImageBundles().filter(b => b.workflow === 'qwenimage' && b.files.some(f => f.subfolder === 'diffusion_models'))
- expect(withModel.map(b => b.name)).toEqual(['Qwen-Image 2.1 (Generate and Edit)', 'Qwen-Image 2.1 (No Refusals)'])
+ expect(withModel.map(b => b.name)).toEqual(['Qwen-Image 2.1 (Generate and Edit)', 'Qwen-Image 2.1 (No Refusals)', 'Noct Q (Qwen-Image 2.1, Unfiltered)'])
expect(withModel[0].name).toBe(bundle!.name)
expect(bundle).toBeDefined()
})
@@ -384,7 +408,7 @@ describe('Qwen-Image 2.1 bundle', () => {
it('ships the three files the graph loads, in the three folders it reads', () => {
const byFolder = Object.fromEntries(bundle!.files.map(f => [f.subfolder, f.filename]))
expect(bundle!.files).toHaveLength(3)
- expect(byFolder.diffusion_models).toBe(MODEL)
+ expect(byFolder.diffusion_models).toBe(OFFICIAL_MODEL)
expect(byFolder.text_encoders).toBe(ENCODER)
expect(byFolder.vae).toBe(VAE_FILE)
})
@@ -400,7 +424,7 @@ describe('Qwen-Image 2.1 bundle', () => {
// byte counts in gibibytes, not the decimal figures on the file listing.
it('the declared sizes are the measured ones, and the total is their sum', () => {
const bytes: Record<string, number> = {
- [MODEL]: 7_256_783_064,
+ [OFFICIAL_MODEL]: 7_256_783_064,
[ENCODER]: 9_350_798_360,
[VAE_FILE]: 675_509_688,
}
@@ -430,7 +454,9 @@ describe('Qwen-Image 2.1 bundle', () => {
// ── Further references (GH #144) ────────────────────────────────────────
-describe('buildDynamicWorkflow, Qwen-Image 2.1 edit with further references', () => {
+describe.each(QWEN21_WEIGHTS)('buildDynamicWorkflow, Qwen-Image 2.1 edit with further references, %s', (_weights, MODEL) => {
+ const QWEN_NODES = qwenNodes(MODEL)
+ const baseParams = paramsFor(MODEL)
beforeEach(() => {
vi.mocked(getAllNodeInfo).mockResolvedValue(QWEN_NODES as never)
serveEnums()
diff --git a/src/api/__tests__/qwen21-weights.ts b/src/api/__tests__/qwen21-weights.ts
new file mode 100644
index 00000000..9c519ed8
--- /dev/null
+++ b/src/api/__tests__/qwen21-weights.ts
@@ -0,0 +1,16 @@
+/**
+ * The image model files the Qwen-Image 2.1 lane runs, for the tests that are
+ * parametrised over them: whatever the family does has to come out the same
+ * with either file in the UNETLoader.
+ *
+ * - the official weights (Comfy-Org/Qwen-Image-2.1)
+ * - Noct Q V4 (Noctaluna/Noct-Q-Uncensored-Qwen-Image-2.1), a community
+ * finetune with the same tensor names, shapes and data types
+ */
+export const QWEN21_OFFICIAL_MODEL = 'qwen_image_2.1_int8_convrot.safetensors'
+export const NOCT_Q_MODEL = 'NoctQ_V4_int8_convrot.safetensors'
+
+export const QWEN21_WEIGHTS: [label: string, file: string][] = [
+ ['official weights', QWEN21_OFFICIAL_MODEL],
+ ['Noct Q', NOCT_Q_MODEL],
+]
diff --git a/src/api/comfyui.ts b/src/api/comfyui.ts
index 50714594..502f9efa 100644
--- a/src/api/comfyui.ts
+++ b/src/api/comfyui.ts
@@ -324,6 +324,11 @@ export function classifyModel(name: string | null | undefined): ModelType {
// Before the 'krea' check and the 'xl' suffix scan below, so no later tag
// can take a 2.1 file first.
if (/qwen[._-]?image/.test(lower) && /2[._-]?1/.test(lower)) return 'qwenimage'
+ // Noct Q (Noctaluna, September 2026): a Qwen-Image 2.1 finetune whose file
+ // names say neither "qwen" nor "2.1" (NoctQ_V4_int8_convrot.safetensors on
+ // Hugging Face, the CivitAI spelling noctQ_v4). Its header carries the
+ // tensor names and shapes of the official file, so it runs on the same lane.
+ if (/(^|[^a-z0-9])noct[._ -]?q(?![a-z])/.test(lower)) return 'qwenimage'
// Qwen-Image 1 (2508, 2512) and Qwen-Image-Edit (2509, 2511, FireRed):
// Qwen2.5-VL 7B encoder, qwen_image_vae, and for the edit files
// TextEncodeQwenImageEditPlus (Discord 2026-09-28: "every model except
diff --git a/src/api/model-bundles.ts b/src/api/model-bundles.ts
index 0368940c..b1f1c7c3 100644
--- a/src/api/model-bundles.ts
+++ b/src/api/model-bundles.ts
@@ -86,12 +86,13 @@ export interface DiscoverModel {
sha256?: string
}
-// The two Qwen-Image 2.1 files that both of its bundles load, the official one
-// and the one with the text encoder without refusals: the image model and the
-// VAE. One entry each, so the two bundles can never drift apart and a machine
-// that has one bundle does not fetch these again for the other. Byte counts
-// and SHA-256 are the Hugging Face LFS values of Comfy-Org/Qwen-Image-2.1,
-// read on 2026-10-03.
+// The Qwen-Image 2.1 files that more than one of its bundles load: the
+// official image model (the official bundle and the one with the text encoder
+// without refusals), the official text encoder (the official bundle and Noct
+// Q) and the VAE (all three). One entry each, so the bundles can never drift
+// apart and a machine that has one bundle does not fetch these again for
+// another. Byte counts and SHA-256 are the Hugging Face LFS values of
+// Comfy-Org/Qwen-Image-2.1, read on 2026-10-03.
const QWEN21_DIFFUSION_MODEL: DiscoverModel = {
name: 'Qwen-Image 2.1 (INT8)',
description: 'Diffusion model · generates and edits, native 2K, transparent backgrounds.',
@@ -101,6 +102,15 @@ const QWEN21_DIFFUSION_MODEL: DiscoverModel = {
sizeBytes: 7256783064,
sha256: 'cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d',
}
+const QWEN21_TEXT_ENCODER: DiscoverModel = {
+ name: 'Qwen3-VL 8B Text Encoder (INT8)',
+ description: 'Required text encoder for Qwen-Image 2.1 prompt understanding.',
+ pulls: '', tags: ['Text Encoder', '9.35 GB'], updated: 'New',
+ downloadUrl: 'https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors',
+ filename: 'qwen3vl_8b_int8_convrot.safetensors', subfolder: 'text_encoders', sizeGB: 8.71,
+ sizeBytes: 9350798360,
+ sha256: '8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f',
+}
const QWEN21_VAE: DiscoverModel = {
name: 'Qwen-Image 2.1 VAE',
description: 'Required autoencoder for Qwen-Image 2.1.',
@@ -398,15 +408,7 @@ export function getImageBundles(): ModelBundle[] {
url: 'https://huggingface.co/Comfy-Org/Qwen-Image-2.1',
files: [
QWEN21_DIFFUSION_MODEL,
- {
- name: 'Qwen3-VL 8B Text Encoder (INT8)',
- description: 'Required text encoder for Qwen-Image 2.1 prompt understanding.',
- pulls: '', tags: ['Text Encoder', '9.35 GB'], updated: 'New',
- downloadUrl: 'https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors',
- filename: 'qwen3vl_8b_int8_convrot.safetensors', subfolder: 'text_encoders', sizeGB: 8.71,
- sizeBytes: 9350798360,
- sha256: '8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f',
- },
+ QWEN21_TEXT_ENCODER,
QWEN21_VAE,
],
},
@@ -447,6 +449,48 @@ export function getImageBundles(): ModelBundle[] {
QWEN21_VAE,
],
},
+ // Noct Q, a community finetune of Qwen-Image 2.1. Read off Hugging Face on
+ // 2026-10-03 (Noctaluna/Noct-Q-Uncensored-Qwen-Image-2.1, not gated, Qwen
+ // Research License): the NOTICE file says "the Qwen-Image-2.1 transformer
+ // weights were modified by noctaluna", the card calls the result
+ // uncensored and says it edits with the same file in ComfyUI's Qwen Image
+ // 2.1 edit template. Unlike the bundle above, the image model itself is
+ // the changed file here. The safetensors header of NoctQ_V4_int8_convrot
+ // carries the same 649 tensor names, shapes and data types as the official
+ // qwen_image_2.1_int8_convrot, so UNETLoader and the whole Qwen-Image 2.1
+ // lane take it as they take the official file.
+ // The card names the official text encoder and the official VAE as its
+ // companions, so those are the two shared entries: the file is published
+ // against that encoder, and a machine with the official bundle fetches
+ // only the image model. Whoever has the encoder without refusals too picks
+ // it under Text encoder like for any Qwen-Image 2.1 run.
+ // Byte count and SHA-256 are the Hugging Face LFS values; the address
+ // answers without a token. Not marked verified: no run on real hardware.
+ {
+ name: 'Noct Q (Qwen-Image 2.1, Unfiltered)',
+ description: 'A community finetune of Qwen-Image 2.1 by Noctaluna, published as an unfiltered edition. The image model itself is changed: its notice says the Qwen-Image 2.1 transformer weights were modified. Generates from a prompt and edits a reference image from a prompt, no mask needed. The text encoder and the VAE are the official files, shared with the official bundle and not downloaded twice. Qwen Research License, non-commercial use: https://huggingface.co/Noctaluna/Noct-Q-Uncensored-Qwen-Image-2.1/blob/main/LICENSE',
+ tags: ['Qwen Image 2.1', 'Unfiltered', 'Image', 'Edit', '1024px'],
+ uncensored: true,
+ // 6.76 + 8.71 + 0.63, in gibibytes like the official bundle.
+ totalSizeGB: 16.1,
+ vramRequired: '16-24 GB',
+ workflow: 'qwenimage',
+ tier: 'best',
+ url: 'https://huggingface.co/Noctaluna/Noct-Q-Uncensored-Qwen-Image-2.1',
+ files: [
+ {
+ name: 'Noct Q V4 (INT8)',
+ description: 'Diffusion model · Qwen-Image 2.1 with transformer weights modified by Noctaluna.',
+ pulls: '', tags: ['Diffusion Model', '7.26 GB'], updated: 'New',
+ downloadUrl: 'https://huggingface.co/Noctaluna/Noct-Q-Uncensored-Qwen-Image-2.1/resolve/main/NoctQ_V4_int8_convrot.safetensors',
+ filename: 'NoctQ_V4_int8_convrot.safetensors', subfolder: 'diffusion_models', sizeGB: 6.76,
+ sizeBytes: 7256784368,
+ sha256: '4d92d5538253ab36e6a73b056cce5f697950f4303cb9e6686a3198d0ea13f9e8',
+ },
+ QWEN21_TEXT_ENCODER,
+ QWEN21_VAE,
+ ],
+ },
// The Qwen-Image 2.1 prompt enhancers (GH #148). Add-ons to the bundle
// above, not models of their own: a 9B text model that turns a short
// prompt or edit instruction into the long prompt Qwen-Image 2.1 works
diff --git a/src/components/create/experimental/__tests__/qwen-21-gewichte-oberflaeche.test.tsx b/src/components/create/experimental/__tests__/qwen-21-gewichte-oberflaeche.test.tsx
new file mode 100644
index 00000000..24343eda
--- /dev/null
+++ b/src/components/create/experimental/__tests__/qwen-21-gewichte-oberflaeche.test.tsx
@@ -0,0 +1,79 @@
+// @vitest-environment jsdom
+/**
+ * What the Create surface offers for a local Qwen-Image 2.1 has to be there
+ * for every image model file of the family: the official weights and the Noct
+ * Q finetune, whose file name says neither "qwen" nor "2.1".
+ *
+ * The sibling tests of each row mock the classifier and hand the type in.
+ * Here the classifier is the real one, so a file the classifier does not know
+ * would lose its rows: Transparent background, the Text encoder row, the
+ * prompt enhancer on Edit, and the three further reference slots.
+ */
+import { afterEach, describe, expect, it, vi } from 'vitest'
+import { cleanup, fireEvent, render, screen } from '@testing-library/react'
+
+vi.mock('../../../../api/mlx-image', () => ({ isMlxImageHost: () => false }))
+vi.mock('../CreateContext', () => ({
+ useCreateExp: () => ({
+ samplerList: [], schedulerList: [], loraList: [], vaeList: [], refreshModelLists: vi.fn(),
+ }),
+}))
+
+import { ParamGroups } from '../ParamGroups'
+import { ImproveToggle } from '../ImproveToggle'
+import { useCreateStore } from '../../../../stores/createStore'
+import { classifyModel } from '../../../../api/comfyui'
+import { extraReferenceSlots } from '../../../../lib/edit-references'
+import { QWEN21_WEIGHTS } from '../../../../api/__tests__/qwen21-weights'
+
+const OFFICIAL = 'qwen3vl_8b_int8_convrot.safetensors'
+const FREE = 'qwen3vl_8b_int8_convrot_heretic.safetensors'
+const I2I_FREE = 'qwen3.5_9b_qwen_image_2.1_pe_i2i_heretic.int8_convrot.safetensors'
+
+function setup(model: string, textEncoders: string[]) {
+ useCreateStore.setState({
+ backend: 'local', isGenerating: false, qwenTextEncoder: 'auto', transparentBackground: false,
+ improvePrompt: false, improveWith: 'auto', cloudStudioOptions: {},
+ imageModel: model, imageModelList: [{ name: model, type: classifyModel(model) }],
+ cloudOp: null, utilityOp: null, removebg: false, textEncoderList: textEncoders,
+ } as never)
+ useCreateStore.getState().setIntent('image')
+}
+
+afterEach(() => { cleanup() })
+
+describe.each(QWEN21_WEIGHTS)('the Create surface for local Qwen-Image 2.1, %s', (_weights, model) => {
+ it('Transparent background is offered', () => {
+ setup(model, [OFFICIAL])
+ render(<ParamGroups />)
+ expect(screen.getByRole('switch', { name: /transparent background/i })).toBeTruthy()
+ })
+
+ it('with both text encoders installed, Expert has the Text encoder row', () => {
+ setup(model, [OFFICIAL, FREE])
+ render(<ParamGroups />)
+ fireEvent.click(screen.getByRole('button', { name: 'Expert' }))
+ expect(screen.getByRole('button', { name: 'Text encoder' }).textContent).toBe('Qwen3-VL 8B')
+ })
+
+ it('Edit has Improve my prompt when the edit enhancer is installed', () => {
+ setup(model, [OFFICIAL, I2I_FREE])
+ useCreateStore.getState().setIntent('edit')
+ render(<ImproveToggle />)
+ expect(screen.getByRole('switch', { name: /improve my prompt/i })).toBeTruthy()
+ })
+
+ it('an edit takes three further reference images', () => {
+ expect(extraReferenceSlots(classifyModel(model), model)).toBe(3)
+ })
+})
+
+describe('COUNTER-CHECK: a file of another family gets none of it', () => {
+ it('an SDXL checkpoint has no Transparent background and no Text encoder row', () => {
+ setup('sdxl_base_1.0.safetensors', [OFFICIAL, FREE])
+ render(<ParamGroups />)
+ expect(screen.queryByRole('switch', { name: /transparent background/i })).toBeNull()
+ fireEvent.click(screen.getByRole('button', { name: 'Expert' }))
+ expect(screen.queryByRole('button', { name: 'Text encoder' })).toBeNull()
+ })
+})
diff --git a/src/hooks/__tests__/useCreate-qwen-enhancer.test.ts b/src/hooks/__tests__/useCreate-qwen-enhancer.test.ts
index f0560350..dc8537b3 100644
--- a/src/hooks/__tests__/useCreate-qwen-enhancer.test.ts
+++ b/src/hooks/__tests__/useCreate-qwen-enhancer.test.ts
@@ -71,8 +71,9 @@ vi.mock('../../lib/render/improve-prompt-run', () => ({
import { useCreate } from '../useCreate'
import { useCreateStore } from '../../stores/createStore'
+import { classifyModel } from '../../api/comfyui'
+import { QWEN21_WEIGHTS } from '../../api/__tests__/qwen21-weights'
-const QWEN = 'qwen_image_2.1_int8_convrot.safetensors'
const T2I = 'qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors'
const I2I = 'qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors'
const T2I_FREE = 'qwen3.5_9b_qwen_image_2.1_pe_t2i_heretic.int8_convrot.safetensors'
@@ -80,143 +81,147 @@ const I2I_FREE = 'qwen3.5_9b_qwen_image_2.1_pe_i2i_heretic.int8_convrot.safetens
const image = (filename: string) => ({ filename, url: `blob:${filename}`, width: 1024, height: 1024 })
-beforeEach(() => {
- seen.order.length = 0
- seen.enhancer.length = 0
- seen.built.length = 0
- seen.chat.length = 0
- seen.outcome = { status: 'improved', prompt: 'A long rewritten prompt from the enhancer.' }
- seen.buildError = null
- useCreateStore.setState({
- backend: 'local', isGenerating: false, error: null, gallery: [], promptHistory: [],
- improvePrompt: true, improveWith: 'auto',
- cloudOp: null, utilityOp: null, removebg: false, source: null, mask: null, references: [],
- selectedLoras: [], hiresFixEnabled: false, transparentBackground: false, seed: 42,
- imageModel: QWEN, imageModelList: [{ name: QWEN, type: 'qwenimage' }],
- textEncoderList: ['qwen3vl_8b_int8_convrot.safetensors', T2I, I2I, T2I_FREE, I2I_FREE],
- } as never)
- const s = useCreateStore.getState()
- s.setIntent('image')
- s.setPrompt('a fox in snow')
-})
-
-async function run() {
- const { result } = renderHook(() => useCreate())
- await result.current.generate()
-}
-
-describe('Improve my prompt on local Qwen-Image 2.1, enhancer installed', () => {
- it('the enhancer writes, not the chat model, and the picture is built from its prompt', async () => {
- await run()
- expect(seen.chat).toHaveLength(0)
- expect(seen.enhancer).toEqual([{ file: T2I, mode: 't2i', prompt: 'a fox in snow', images: [], seed: 42 }])
- expect(seen.built).toHaveLength(1)
- expect(seen.built[0].prompt).toBe('A long rewritten prompt from the enhancer.')
- // The field keeps the user's own words.
- expect(useCreateStore.getState().prompt).toBe('a fox in snow')
+// Every run of the family, once per image model file: the official weights
+// and the Noct Q finetune. The type comes from the real classifier.
+describe.each(QWEN21_WEIGHTS)('local Qwen-Image 2.1, %s', (_weights, QWEN) => {
+ beforeEach(() => {
+ seen.order.length = 0
+ seen.enhancer.length = 0
+ seen.built.length = 0
+ seen.chat.length = 0
+ seen.outcome = { status: 'improved', prompt: 'A long rewritten prompt from the enhancer.' }
+ seen.buildError = null
+ useCreateStore.setState({
+ backend: 'local', isGenerating: false, error: null, gallery: [], promptHistory: [],
+ improvePrompt: true, improveWith: 'auto',
+ cloudOp: null, utilityOp: null, removebg: false, source: null, mask: null, references: [],
+ selectedLoras: [], hiresFixEnabled: false, transparentBackground: false, seed: 42,
+ imageModel: QWEN, imageModelList: [{ name: QWEN, type: classifyModel(QWEN) }],
+ textEncoderList: ['qwen3vl_8b_int8_convrot.safetensors', T2I, I2I, T2I_FREE, I2I_FREE],
+ } as never)
+ const s = useCreateStore.getState()
+ s.setIntent('image')
+ s.setPrompt('a fox in snow')
})
- it('order on the card: chat model out, enhancer runs, then the picture is built', async () => {
- await run()
- expect(seen.order).toEqual(['evict-chat', 'build-enhancer', 'run-enhancer', 'build-picture', 'submit-picture'])
- })
+ async function run() {
+ const { result } = renderHook(() => useCreate())
+ await result.current.generate()
+ }
+
+ describe('Improve my prompt on local Qwen-Image 2.1, enhancer installed', () => {
+ it('the enhancer writes, not the chat model, and the picture is built from its prompt', async () => {
+ await run()
+ expect(seen.chat).toHaveLength(0)
+ expect(seen.enhancer).toEqual([{ file: T2I, mode: 't2i', prompt: 'a fox in snow', images: [], seed: 42 }])
+ expect(seen.built).toHaveLength(1)
+ expect(seen.built[0].prompt).toBe('A long rewritten prompt from the enhancer.')
+ // The field keeps the user's own words.
+ expect(useCreateStore.getState().prompt).toBe('a fox in snow')
+ })
- it('the user picked the one without refusals', async () => {
- useCreateStore.setState({ improveWith: 'unfiltered' } as never)
- await run()
- expect(seen.enhancer[0].file).toBe(T2I_FREE)
- })
+ it('order on the card: chat model out, enhancer runs, then the picture is built', async () => {
+ await run()
+ expect(seen.order).toEqual(['evict-chat', 'build-enhancer', 'run-enhancer', 'build-picture', 'submit-picture'])
+ })
- it('Edit: the edit enhancer gets the instruction, the source and the references in order', async () => {
- useCreateStore.getState().setIntent('edit')
- useCreateStore.setState({
- source: image('street.png'), references: [image('woman.png'), image('hat.png')], improveWith: 'unfiltered',
- } as never)
- useCreateStore.getState().setPrompt('put the woman from image 2 into the street')
- await run()
- expect(seen.chat).toHaveLength(0)
- expect(seen.enhancer).toEqual([{
- file: I2I_FREE, mode: 'i2i', prompt: 'put the woman from image 2 into the street',
- images: ['street.png', 'woman.png', 'hat.png'], seed: 42,
- }])
- expect(seen.built[0]).toEqual({
- prompt: 'A long rewritten prompt from the enhancer.',
- inputImage: 'street.png', referenceImages: ['woman.png', 'hat.png'],
+ it('the user picked the one without refusals', async () => {
+ useCreateStore.setState({ improveWith: 'unfiltered' } as never)
+ await run()
+ expect(seen.enhancer[0].file).toBe(T2I_FREE)
})
- })
- it('a failed rewrite does not stop the picture: it is built from the user\'s own prompt', async () => {
- seen.outcome = { status: 'failed' }
- await run()
- expect(seen.built[0].prompt).toBe('a fox in snow')
- expect(seen.chat).toHaveLength(0)
- })
+ it('Edit: the edit enhancer gets the instruction, the source and the references in order', async () => {
+ useCreateStore.getState().setIntent('edit')
+ useCreateStore.setState({
+ source: image('street.png'), references: [image('woman.png'), image('hat.png')], improveWith: 'unfiltered',
+ } as never)
+ useCreateStore.getState().setPrompt('put the woman from image 2 into the street')
+ await run()
+ expect(seen.chat).toHaveLength(0)
+ expect(seen.enhancer).toEqual([{
+ file: I2I_FREE, mode: 'i2i', prompt: 'put the woman from image 2 into the street',
+ images: ['street.png', 'woman.png', 'hat.png'], seed: 42,
+ }])
+ expect(seen.built[0]).toEqual({
+ prompt: 'A long rewritten prompt from the enhancer.',
+ inputImage: 'street.png', referenceImages: ['woman.png', 'hat.png'],
+ })
+ })
- it('a rewrite that breaks the safety rule never runs', async () => {
- seen.outcome = { status: 'improved', prompt: 'a nude child on a beach' }
- await run()
- expect(seen.built[0].prompt).toBe('a fox in snow')
- })
+ it('a failed rewrite does not stop the picture: it is built from the user\'s own prompt', async () => {
+ seen.outcome = { status: 'failed' }
+ await run()
+ expect(seen.built[0].prompt).toBe('a fox in snow')
+ expect(seen.chat).toHaveLength(0)
+ })
- it('a ComfyUI too old for the enhancer and a no to the update: the run does not start and says why', async () => {
- seen.buildError = Object.assign(new Error('The Qwen prompt enhancer needs ComfyUI 0.37.2 or newer. Update ComfyUI in Settings.'), {
- name: 'WorkflowUnavailableError', needsComfyUpdate: true,
+ it('a rewrite that breaks the safety rule never runs', async () => {
+ seen.outcome = { status: 'improved', prompt: 'a nude child on a beach' }
+ await run()
+ expect(seen.built[0].prompt).toBe('a fox in snow')
})
- const { result } = renderHook(() => useCreate())
- const done = result.current.generate()
- await vi.waitFor(() => expect(useCreateStore.getState().fixupPrompt).not.toBeNull())
- expect(useCreateStore.getState().fixupPrompt?.title).toBe('ComfyUI needs an update')
- useCreateStore.getState().fixupPrompt?.resolve(false)
- await done
- expect(seen.built).toHaveLength(0)
- expect(useCreateStore.getState().error).toBe('Not started. The Qwen prompt enhancer needs ComfyUI 0.37.2 or newer. Update ComfyUI in Settings.')
- })
- it('switch off: neither writes', async () => {
- useCreateStore.setState({ improvePrompt: false } as never)
- await run()
- expect(seen.order).toEqual(['evict-chat', 'build-picture', 'submit-picture'])
- expect(seen.built[0].prompt).toBe('a fox in snow')
- })
-})
+ it('a ComfyUI too old for the enhancer and a no to the update: the run does not start and says why', async () => {
+ seen.buildError = Object.assign(new Error('The Qwen prompt enhancer needs ComfyUI 0.37.2 or newer. Update ComfyUI in Settings.'), {
+ name: 'WorkflowUnavailableError', needsComfyUpdate: true,
+ })
+ const { result } = renderHook(() => useCreate())
+ const done = result.current.generate()
+ await vi.waitFor(() => expect(useCreateStore.getState().fixupPrompt).not.toBeNull())
+ expect(useCreateStore.getState().fixupPrompt?.title).toBe('ComfyUI needs an update')
+ useCreateStore.getState().fixupPrompt?.resolve(false)
+ await done
+ expect(seen.built).toHaveLength(0)
+ expect(useCreateStore.getState().error).toBe('Not started. The Qwen prompt enhancer needs ComfyUI 0.37.2 or newer. Update ComfyUI in Settings.')
+ })
-describe('falling back to the chat model', () => {
- it('no enhancer installed: the chat model writes, before the card is cleared for the picture', async () => {
- useCreateStore.setState({ textEncoderList: ['qwen3vl_8b_int8_convrot.safetensors'] } as never)
- await run()
- expect(seen.enhancer).toHaveLength(0)
- expect(seen.chat).toEqual([{ prompt: 'a fox in snow', kind: 'image' }])
- expect(seen.order).toEqual(['chat-rewrite', 'evict-chat', 'build-picture', 'submit-picture'])
- expect(seen.built[0].prompt).toBe('A rewrite from the chat model.')
+ it('switch off: neither writes', async () => {
+ useCreateStore.setState({ improvePrompt: false } as never)
+ await run()
+ expect(seen.order).toEqual(['evict-chat', 'build-picture', 'submit-picture'])
+ expect(seen.built[0].prompt).toBe('a fox in snow')
+ })
})
- it('only the edit enhancer installed: a new picture is written by the chat model', async () => {
- useCreateStore.setState({ textEncoderList: [I2I, I2I_FREE] } as never)
- await run()
- expect(seen.enhancer).toHaveLength(0)
- expect(seen.chat).toHaveLength(1)
- })
+ describe('falling back to the chat model', () => {
+ it('no enhancer installed: the chat model writes, before the card is cleared for the picture', async () => {
+ useCreateStore.setState({ textEncoderList: ['qwen3vl_8b_int8_convrot.safetensors'] } as never)
+ await run()
+ expect(seen.enhancer).toHaveLength(0)
+ expect(seen.chat).toEqual([{ prompt: 'a fox in snow', kind: 'image' }])
+ expect(seen.order).toEqual(['chat-rewrite', 'evict-chat', 'build-picture', 'submit-picture'])
+ expect(seen.built[0].prompt).toBe('A rewrite from the chat model.')
+ })
- it('the user picked the chat model although the enhancer is there', async () => {
- useCreateStore.setState({ improveWith: 'chat' } as never)
- await run()
- expect(seen.enhancer).toHaveLength(0)
- expect(seen.built[0].prompt).toBe('A rewrite from the chat model.')
- })
+ it('only the edit enhancer installed: a new picture is written by the chat model', async () => {
+ useCreateStore.setState({ textEncoderList: [I2I, I2I_FREE] } as never)
+ await run()
+ expect(seen.enhancer).toHaveLength(0)
+ expect(seen.chat).toHaveLength(1)
+ })
- it('another local model with the enhancers on disk: the chat model writes', async () => {
- useCreateStore.setState({ imageModel: 'flux-2-klein-4b.safetensors', imageModelList: [{ name: 'flux-2-klein-4b.safetensors', type: 'flux2' }] } as never)
- await run()
- expect(seen.enhancer).toHaveLength(0)
- expect(seen.chat).toHaveLength(1)
- })
+ it('the user picked the chat model although the enhancer is there', async () => {
+ useCreateStore.setState({ improveWith: 'chat' } as never)
+ await run()
+ expect(seen.enhancer).toHaveLength(0)
+ expect(seen.built[0].prompt).toBe('A rewrite from the chat model.')
+ })
- it('Edit without an edit enhancer: nobody rewrites, as before', async () => {
- useCreateStore.getState().setIntent('edit')
- useCreateStore.setState({ source: image('street.png'), textEncoderList: [T2I, T2I_FREE] } as never)
- await run()
- expect(seen.enhancer).toHaveLength(0)
- expect(seen.chat).toHaveLength(0)
- expect(seen.built[0].prompt).toBe('a fox in snow')
+ it('another local model with the enhancers on disk: the chat model writes', async () => {
+ useCreateStore.setState({ imageModel: 'flux-2-klein-4b.safetensors', imageModelList: [{ name: 'flux-2-klein-4b.safetensors', type: 'flux2' }] } as never)
+ await run()
+ expect(seen.enhancer).toHaveLength(0)
+ expect(seen.chat).toHaveLength(1)
+ })
+
+ it('Edit without an edit enhancer: nobody rewrites, as before', async () => {
+ useCreateStore.getState().setIntent('edit')
+ useCreateStore.setState({ source: image('street.png'), textEncoderList: [T2I, T2I_FREE] } as never)
+ await run()
+ expect(seen.enhancer).toHaveLength(0)
+ expect(seen.chat).toHaveLength(0)
+ expect(seen.built[0].prompt).toBe('a fox in snow')
+ })
})
})
diff --git a/src/hooks/__tests__/useCreate-qwen-text-encoder.test.ts b/src/hooks/__tests__/useCreate-qwen-text-encoder.test.ts
index 47cec94b..c6740705 100644
--- a/src/hooks/__tests__/useCreate-qwen-text-encoder.test.ts
+++ b/src/hooks/__tests__/useCreate-qwen-text-encoder.test.ts
@@ -66,8 +66,9 @@ vi.mock('../../api/qwen-enhancer', () => ({
import { useCreate } from '../useCreate'
import { useCreateStore } from '../../stores/createStore'
+import { classifyModel } from '../../api/comfyui'
+import { QWEN21_WEIGHTS } from '../../api/__tests__/qwen21-weights'
-const QWEN = 'qwen_image_2.1_int8_convrot.safetensors'
const OFFICIAL = 'qwen3vl_8b_int8_convrot.safetensors'
const FREE = 'qwen3vl_8b_int8_convrot_heretic.safetensors'
const T2I_FREE = 'qwen3.5_9b_qwen_image_2.1_pe_t2i_heretic.int8_convrot.safetensors'
@@ -75,105 +76,109 @@ const I2I_FREE = 'qwen3.5_9b_qwen_image_2.1_pe_i2i_heretic.int8_convrot.safetens
const image = (filename: string) => ({ filename, url: `blob:${filename}`, width: 1024, height: 1024 })
-beforeEach(() => {
- seen.order.length = 0
- seen.built.length = 0
- seen.enhancer.length = 0
- useCreateStore.setState({
- backend: 'local', isGenerating: false, error: null, gallery: [], promptHistory: [],
- improvePrompt: false, improveWith: 'auto', qwenTextEncoder: 'unfiltered',
- cloudOp: null, utilityOp: null, removebg: false, source: null, mask: null, references: [],
- selectedLoras: [], hiresFixEnabled: false, transparentBackground: false, seed: 42,
- imageModel: QWEN, imageModelList: [{ name: QWEN, type: 'qwenimage' }],
- textEncoderList: [OFFICIAL, FREE],
- } as never)
- const s = useCreateStore.getState()
- s.setIntent('image')
- s.setPrompt('a fox in snow')
-})
-
-async function run() {
- const { result } = renderHook(() => useCreate())
- await result.current.generate()
-}
-
-describe('the picked text encoder reaches the builder', () => {
- it('Image: a new picture', async () => {
- await run()
- expect(seen.built).toHaveLength(1)
- expect(seen.built[0].qwenTextEncoder).toBe('unfiltered')
- expect(seen.built[0].prompt).toBe('a fox in snow')
+// Every run of the family, once per image model file: the official weights
+// and the Noct Q finetune. The type comes from the real classifier.
+describe.each(QWEN21_WEIGHTS)('local Qwen-Image 2.1, %s', (_weights, QWEN) => {
+ beforeEach(() => {
+ seen.order.length = 0
+ seen.built.length = 0
+ seen.enhancer.length = 0
+ useCreateStore.setState({
+ backend: 'local', isGenerating: false, error: null, gallery: [], promptHistory: [],
+ improvePrompt: false, improveWith: 'auto', qwenTextEncoder: 'unfiltered',
+ cloudOp: null, utilityOp: null, removebg: false, source: null, mask: null, references: [],
+ selectedLoras: [], hiresFixEnabled: false, transparentBackground: false, seed: 42,
+ imageModel: QWEN, imageModelList: [{ name: QWEN, type: classifyModel(QWEN) }],
+ textEncoderList: [OFFICIAL, FREE],
+ } as never)
+ const s = useCreateStore.getState()
+ s.setIntent('image')
+ s.setPrompt('a fox in snow')
})
- it('the default sends no pick, the builder then takes the official one first', async () => {
- useCreateStore.setState({ qwenTextEncoder: 'auto' } as never)
- await run()
- expect(seen.built[0].qwenTextEncoder).toBeUndefined()
- })
+ async function run() {
+ const { result } = renderHook(() => useCreate())
+ await result.current.generate()
+ }
- it('the official one picked by hand is sent as such', async () => {
- useCreateStore.setState({ qwenTextEncoder: 'official' } as never)
- await run()
- expect(seen.built[0].qwenTextEncoder).toBe('official')
- })
+ describe('the picked text encoder reaches the builder', () => {
+ it('Image: a new picture', async () => {
+ await run()
+ expect(seen.built).toHaveLength(1)
+ expect(seen.built[0].qwenTextEncoder).toBe('unfiltered')
+ expect(seen.built[0].prompt).toBe('a fox in snow')
+ })
- it('Edit without a mask, with the source', async () => {
- useCreateStore.getState().setIntent('edit')
- useCreateStore.setState({ source: image('street.png') } as never)
- await run()
- expect(seen.built[0]).toMatchObject({ inputImage: 'street.png', qwenTextEncoder: 'unfiltered' })
- })
+ it('the default sends no pick, the builder then takes the official one first', async () => {
+ useCreateStore.setState({ qwenTextEncoder: 'auto' } as never)
+ await run()
+ expect(seen.built[0].qwenTextEncoder).toBeUndefined()
+ })
- it('Edit with three more reference images', async () => {
- useCreateStore.getState().setIntent('edit')
- useCreateStore.setState({ source: image('street.png'), references: [image('a.png'), image('b.png'), image('c.png')] } as never)
- await run()
- expect(seen.built[0]).toMatchObject({
- inputImage: 'street.png', referenceImages: ['a.png', 'b.png', 'c.png'], qwenTextEncoder: 'unfiltered',
+ it('the official one picked by hand is sent as such', async () => {
+ useCreateStore.setState({ qwenTextEncoder: 'official' } as never)
+ await run()
+ expect(seen.built[0].qwenTextEncoder).toBe('official')
})
- })
- it('Transparent background', async () => {
- useCreateStore.setState({ transparentBackground: true } as never)
- await run()
- expect(seen.built[0]).toMatchObject({ transparent: true, qwenTextEncoder: 'unfiltered' })
- })
+ it('Edit without a mask, with the source', async () => {
+ useCreateStore.getState().setIntent('edit')
+ useCreateStore.setState({ source: image('street.png') } as never)
+ await run()
+ expect(seen.built[0]).toMatchObject({ inputImage: 'street.png', qwenTextEncoder: 'unfiltered' })
+ })
- // The batch runs the normal single run once per image, with that image as
- // the source (batchRun.ts). Two runs in a row are what it does.
- it('several images edited one after the other: every run carries the pick', async () => {
- useCreateStore.getState().setIntent('edit')
- for (const name of ['one.png', 'two.png']) {
- useCreateStore.setState({ source: image(name), isGenerating: false, error: null } as never)
+ it('Edit with three more reference images', async () => {
+ useCreateStore.getState().setIntent('edit')
+ useCreateStore.setState({ source: image('street.png'), references: [image('a.png'), image('b.png'), image('c.png')] } as never)
await run()
- }
- expect(seen.built.map((b) => [b.inputImage, b.qwenTextEncoder])).toEqual([['one.png', 'unfiltered'], ['two.png', 'unfiltered']])
- })
-})
+ expect(seen.built[0]).toMatchObject({
+ inputImage: 'street.png', referenceImages: ['a.png', 'b.png', 'c.png'], qwenTextEncoder: 'unfiltered',
+ })
+ })
-describe('together with Improve my prompt', () => {
- beforeEach(() => {
- useCreateStore.setState({ improvePrompt: true, improveWith: 'unfiltered', textEncoderList: [OFFICIAL, FREE, T2I_FREE, I2I_FREE] } as never)
- })
+ it('Transparent background', async () => {
+ useCreateStore.setState({ transparentBackground: true } as never)
+ await run()
+ expect(seen.built[0]).toMatchObject({ transparent: true, qwenTextEncoder: 'unfiltered' })
+ })
- it('new picture: the enhancer writes, then the picture is built with the picked encoder', async () => {
- await run()
- expect(seen.enhancer).toEqual([{ file: T2I_FREE, mode: 't2i' }])
- expect(seen.order).toEqual(['build-enhancer', 'build-picture', 'submit-picture'])
- expect(seen.built[0]).toMatchObject({ prompt: 'A long rewritten prompt from the enhancer.', qwenTextEncoder: 'unfiltered' })
+ // The batch runs the normal single run once per image, with that image as
+ // the source (batchRun.ts). Two runs in a row are what it does.
+ it('several images edited one after the other: every run carries the pick', async () => {
+ useCreateStore.getState().setIntent('edit')
+ for (const name of ['one.png', 'two.png']) {
+ useCreateStore.setState({ source: image(name), isGenerating: false, error: null } as never)
+ await run()
+ }
+ expect(seen.built.map((b) => [b.inputImage, b.qwenTextEncoder])).toEqual([['one.png', 'unfiltered'], ['two.png', 'unfiltered']])
+ })
})
- it('edit: the edit enhancer writes, the encoder pick rides along', async () => {
- useCreateStore.getState().setIntent('edit')
- useCreateStore.setState({ source: image('street.png') } as never)
- await run()
- expect(seen.enhancer).toEqual([{ file: I2I_FREE, mode: 'i2i' }])
- expect(seen.built[0]).toMatchObject({ inputImage: 'street.png', qwenTextEncoder: 'unfiltered' })
- })
+ describe('together with Improve my prompt', () => {
+ beforeEach(() => {
+ useCreateStore.setState({ improvePrompt: true, improveWith: 'unfiltered', textEncoderList: [OFFICIAL, FREE, T2I_FREE, I2I_FREE] } as never)
+ })
- it('the text encoder is never offered to the enhancer as its file', async () => {
- useCreateStore.setState({ textEncoderList: [OFFICIAL, FREE] } as never)
- await run()
- expect(seen.enhancer).toHaveLength(0)
+ it('new picture: the enhancer writes, then the picture is built with the picked encoder', async () => {
+ await run()
+ expect(seen.enhancer).toEqual([{ file: T2I_FREE, mode: 't2i' }])
+ expect(seen.order).toEqual(['build-enhancer', 'build-picture', 'submit-picture'])
+ expect(seen.built[0]).toMatchObject({ prompt: 'A long rewritten prompt from the enhancer.', qwenTextEncoder: 'unfiltered' })
+ })
+
+ it('edit: the edit enhancer writes, the encoder pick rides along', async () => {
+ useCreateStore.getState().setIntent('edit')
+ useCreateStore.setState({ source: image('street.png') } as never)
+ await run()
+ expect(seen.enhancer).toEqual([{ file: I2I_FREE, mode: 'i2i' }])
+ expect(seen.built[0]).toMatchObject({ inputImage: 'street.png', qwenTextEncoder: 'unfiltered' })
+ })
+
+ it('the text encoder is never offered to the enhancer as its file', async () => {
+ useCreateStore.setState({ textEncoderList: [OFFICIAL, FREE] } as never)
+ await run()
+ expect(seen.enhancer).toHaveLength(0)
+ })
})
})
diff --git a/src/lib/__tests__/vram-fit.test.ts b/src/lib/__tests__/vram-fit.test.ts
index 65eaf51b..351ca0f5 100644
--- a/src/lib/__tests__/vram-fit.test.ts
+++ b/src/lib/__tests__/vram-fit.test.ts
@@ -188,6 +188,7 @@ describe('every bundle in the catalogue carries the two numbers', () => {
['Z-Image Base (Unfiltered, Quality)', 10, 16, 'big tight fits fits'],
['Qwen-Image 2.1 (Generate and Edit)', 16, 24, 'big big tight fits'],
['Qwen-Image 2.1 (No Refusals)', 16, 24, 'big big tight fits'],
+ ['Noct Q (Qwen-Image 2.1, Unfiltered)', 16, 24, 'big big tight fits'],
['Qwen-Image 2.1 Prompt Enhancer (Official)', 16, 16, 'big big fits fits'],
['Qwen-Image 2.1 Prompt Enhancer (No Refusals)', 16, 16, 'big big fits fits'],
['DreamShaper XL Turbo V2 (Anime/Stylized)', 6, 8, 'fits fits fits fits'],
diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts
index 9eb2f861..a04d6cd0 100644
--- a/src/lib/release-notes.ts
+++ b/src/lib/release-notes.ts
@@ -180,6 +180,10 @@ export const RELEASE_NOTES: ReleaseNote[] = [
title: 'Qwen-Image 2.1 comes with a text encoder without refusals.',
detail: 'Models, Image, Get new has "Qwen-Image 2.1 (No Refusals)". It is the same image model and the same VAE with a community text encoder that has its refusal direction removed (Heretic). If you already have Qwen-Image 2.1, only the text encoder is downloaded, about 9 GB. With both text encoders installed, the Expert settings in Create have a "Text encoder" row to pick which one reads your prompt, for new pictures, for edits and for pictures made in chat. The official one stays the default.',
},
+ {
+ title: 'Noct Q, an unfiltered finetune of Qwen-Image 2.1, is in the Model Manager.',
+ detail: 'Models, Image, Get new has "Noct Q (Qwen-Image 2.1, Unfiltered)", a community finetune of Qwen-Image 2.1 by Noctaluna. Here the image model itself is changed: its notice says the Qwen-Image 2.1 transformer weights were modified. It uses the official text encoder and VAE, so if you already have Qwen-Image 2.1, only the image model is downloaded, about 7 GB. The app treats it as Qwen-Image 2.1: new pictures, edits with reference images, transparent background, the text encoder choice and the prompt enhancer are there for it. Qwen Research License, non-commercial use. Not yet run on our own hardware.',
+ },
{
title: 'Models carry a Best mark, and older ones sit under "Older models".',
detail: 'The model picker in Create and the Model Manager put the current models first with a Best mark and collect the ones a newer family has replaced under "Older models". No model was removed.',
diff --git a/src/lib/render/__tests__/local-model-tier.test.ts b/src/lib/render/__tests__/local-model-tier.test.ts
index 5efc2f76..b474ebe5 100644
--- a/src/lib/render/__tests__/local-model-tier.test.ts
+++ b/src/lib/render/__tests__/local-model-tier.test.ts
@@ -25,8 +25,8 @@ const mainFile = (b: ModelBundle) =>
const tierOfFile = (name: string) => localTier({ name, type: classifyModel(name) })
describe('jedes lokale Bundle traegt eine Stufe', () => {
- it('alle 42 Bundles haben best, standard oder older', () => {
- expect(ALL.length).toBe(42)
+ it('alle 43 Bundles haben best, standard oder older', () => {
+ expect(ALL.length).toBe(43)
for (const b of ALL) expect(['best', 'standard', 'older'], b.name).toContain(b.tier)
})
diff --git a/src/stores/__tests__/releaseNotesStore.test.ts b/src/stores/__tests__/releaseNotesStore.test.ts
index a04e8f22..fbcbc12e 100644
--- a/src/stores/__tests__/releaseNotesStore.test.ts
+++ b/src/stores/__tests__/releaseNotesStore.test.ts
@@ -406,6 +406,8 @@ describe('the notes table', () => {
'transparent background', 'rewritten by', 'comfyui 0.37.2', 'issue 148',
// Qwen-Image 2.1 mit dem Text-Encoder ohne Verweigerungen.
'qwen-image 2.1 (no refusals)', 'which one reads your prompt',
+ // Noct Q, der Community-Finetune von Qwen-Image 2.1.
+ 'noct q (qwen-image 2.1, unfiltered)', 'transformer weights were modified',
// Shots, LoRA-Staerke, Turbo-LoRA, Marken.
'shots slider', 'from -10 to 10', 'ready to install', 'older models',
// Passt das Modell zur Grafikkarte: Model Manager, Waehler, Wartezeile.