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): show sampler and scheduler names the way community tips write them (C24)
purple52a6d5d8c739
diff --git a/e2e/create-expert-section.spec.ts b/e2e/create-expert-section.spec.tsindex a937ba5b..d5b1f7a2 100644--- a/e2e/create-expert-section.spec.ts+++ b/e2e/create-expert-section.spec.ts@@ -169,7 +169,8 @@ test('windows lokal: Expert steht da, ist zu, und traegt nach dem Klick die Comf// Die Vorgabeliste traegt den Standardsampler, auch ohne laufendes ComfyUI.await fieldSelect(page, 'Sampler').click()- await expect(page.getByRole('option', { name: 'dpmpp_2m', exact: true })).toBeVisible()+ // Lesbar, mit dem ComfyUI-Namen klein daneben (C24).+ await expect(page.getByRole('option', { name: /^DPM\+\+ 2M\s*dpmpp_2m$/ })).toBeVisible()})/**diff --git a/e2e/sampler-names-readable.spec.ts b/e2e/sampler-names-readable.spec.tsnew file mode 100644index 00000000..f05cfad9--- /dev/null+++ b/e2e/sampler-names-readable.spec.ts@@ -0,0 +1,103 @@+import { test, expect, type Page } from '@playwright/test'+import { tauriMockInit, DEFAULT_ASSISTANT_REPLY, DEFAULT_MODEL_NAME } from './support/tauri-mock'+import { seedOnboardingDone } from './support/cloud-mock'++/**+ * C24 (Discord xlollobx 31.10.2026): the Sampler and Scheduler pickers in+ * Create list "DPM++ SDE" and "Euler a", the names community tips use, with+ * ComfyUI's raw name small beside them, and the search finds either spelling.+ * Windows, local: a Mac runs MLX and has no sampler picker at all.+ *+ * ComfyUI answers through proxy_localhost, as in workflow-params.spec.ts, with+ * the KSampler lists of a current ComfyUI.+ */+const SAMPLERS = [+ 'euler', 'euler_cfg_pp', 'euler_ancestral', 'heun', 'dpm_2', 'dpm_2_ancestral', 'lms', 'dpm_fast',+ 'dpmpp_2s_ancestral', 'dpmpp_sde', 'dpmpp_sde_gpu', 'dpmpp_2m', 'dpmpp_2m_sde', 'dpmpp_2m_sde_gpu',+ 'dpmpp_3m_sde', 'ddpm', 'lcm', 'ipndm', 'deis', 'res_multistep', 'ddim', 'uni_pc',+]+const SCHEDULERS = ['simple', 'sgm_uniform', 'karras', 'exponential', 'ddim_uniform', 'beta', 'normal', 'kl_optimal']+const OBJECT_INFO = {+ KSampler: { input: { required: { sampler_name: [SAMPLERS], scheduler: [SCHEDULERS] } } },+ CheckpointLoaderSimple: { input: { required: { ckpt_name: [['juggernautXL.safetensors']] } } },+}++async function fakeComfy(page: Page) {+ await page.addInitScript((all: Record<string, unknown>) => {+ localStorage.setItem('create-store', JSON.stringify({+ state: { backend: 'local', imageModel: 'juggernautXL.safetensors', expertOpen: true },+ version: 2,+ }))+ const w = window as unknown as { __TAURI_INTERNALS__: { invoke: (c: string, a: { url?: string }) => Promise<unknown> } }+ const bridge = w.__TAURI_INTERNALS__+ const invoke = bridge.invoke+ bridge.invoke = (command, args) => {+ if (command === 'sniff_model_files') return Promise.resolve([])+ if (command !== 'proxy_localhost' || !args?.url?.includes(':8188')) return invoke(command, args)+ const url = args.url+ if (url.includes('/system_stats')) return Promise.resolve(JSON.stringify({ devices: [{ name: 'RTX 3060', type: 'cuda', vram_total: 12 * 1024 ** 3 }] }))+ const one = /\/object_info\/([^/?]+)/.exec(url)+ if (one) return Promise.resolve(JSON.stringify(one[1] in all ? { [one[1]]: all[one[1]] } : {}))+ if (url.includes('/object_info')) return Promise.resolve(JSON.stringify(all))+ return Promise.resolve('{}')+ }+ }, OBJECT_INFO)+}++// Tall enough that the open list is readable in the screenshots.+test.use({ viewport: { width: 1280, height: 900 } })++const drawer = (page: Page) => page.locator('aside').filter({ hasText: 'Advanced settings' })+const names = (page: Page) => page.getByRole('option').locator('.lu-picker-name').allTextContents()+const shot = (name: string) => `${process.env.LU_SHOT_DIR ?? 'test-results'}/${name}.png`++test('Sampler and Scheduler show the community names and find both spellings', async ({ page }) => {+ await page.addInitScript(tauriMockInit, { assistantReply: DEFAULT_ASSISTANT_REPLY, modelName: DEFAULT_MODEL_NAME, platform: 'windows' as const })+ await seedOnboardingDone(page)+ await fakeComfy(page)+ await page.goto('/')+ await page.getByRole('button', { name: /^Create$/ }).first().click()+ await page.getByRole('radio', { name: 'Image', exact: true }).click()+ await page.getByRole('button', { name: 'Advanced settings' }).click()++ const sampler = drawer(page).getByRole('button', { name: 'Sampler', exact: true })+ const scheduler = drawer(page).getByRole('button', { name: 'Scheduler', exact: true })+ await expect(drawer(page).getByRole('button', { name: 'Quality', exact: true })).toBeVisible({ timeout: 15_000 })+ if (!(await sampler.isVisible())) await drawer(page).getByRole('button', { name: 'Expert', exact: true }).click()+ // The SDXL defaults, dpmpp_2m and karras, under their readable names.+ await expect(sampler).toHaveText('DPM++ 2M', { timeout: 15_000 })+ await expect(scheduler).toHaveText('Karras')+ await expect(sampler.locator('[title]')).toHaveAttribute('title', 'dpmpp_2m')++ await sampler.click()+ // The whole list from ComfyUI, readable, raw name beside each row.+ await expect(page.getByRole('option')).toHaveCount(SAMPLERS.length)+ await expect(page.getByRole('option', { name: /^Euler a\s*euler_ancestral$/ })).toBeVisible()+ await sampler.scrollIntoViewIfNeeded()+ await page.waitForTimeout(300) // the menu's 120 ms fade-in+ await page.screenshot({ path: shot('D2-C24-sampler-liste-1') })++ const search = page.getByPlaceholder('Search...')+ await search.fill('DPM++ SDE')+ expect(await names(page)).toEqual(['DPM++ SDE', 'DPM++ SDE GPU'])+ await page.waitForTimeout(300) // the menu's 120 ms fade-in+ await page.screenshot({ path: shot('D2-C24-sampler-suche-2') })+ await search.fill('euler_a')+ expect(await names(page)).toEqual(['Euler a'])+ await search.fill('dpmpp_2m_sde')+ expect(await names(page)).toEqual(['DPM++ 2M SDE', 'DPM++ 2M SDE GPU'])++ // A pick stores the raw name, the one ComfyUI takes.+ await page.getByRole('option').first().click()+ await expect(sampler).toHaveText('DPM++ 2M SDE')+ await expect(page.getByPlaceholder('Search...')).toHaveCount(0)+ const stored = await page.evaluate(() => JSON.parse(localStorage.getItem('create-store') ?? '{}').state?.sampler)+ expect(stored).toBe('dpmpp_2m_sde')++ await scheduler.click()+ await page.getByPlaceholder('Search...').fill('sgm uniform')+ expect(await names(page)).toEqual(['SGM Uniform'])+ await page.getByRole('option').first().click()+ await expect(scheduler).toHaveText('SGM Uniform')+ expect(await page.evaluate(() => JSON.parse(localStorage.getItem('create-store') ?? '{}').state?.scheduler)).toBe('sgm_uniform')+})diff --git a/src/components/create/experimental/ParamGroups.tsx b/src/components/create/experimental/ParamGroups.tsxindex 57c3ebe4..820b4365 100644--- a/src/components/create/experimental/ParamGroups.tsx+++ b/src/components/create/experimental/ParamGroups.tsx@@ -16,6 +16,7 @@ import { openMlxLoraFolder, mlxLoraAlphaNote, mlxLoraRefusal } from '../../../apimport { MLX_VIDEO_MIN_FRAMES, mlxFramesOnGrid, mlxVideoLaneEntry, mlxVideoMaxFrames, mlxVideoRunSize } from '../../../api/mlx-video'import { INTENT_MAP } from './intents'import { SAMPLERS as SAMPLERS_FALLBACK, SCHEDULERS as SCHEDULERS_FALLBACK } from './badges'+import { samplerOptions, schedulerOptions } from '../../../lib/sampler-names'import { Section } from '../ui/Section'import { Slider } from '../ui/Slider'import { Select } from '../ui/Select'@@ -483,11 +484,11 @@ export function ParamGroups() {rather than let the user tune a control that's silently dropped. */}{!isCloud && !isMlxLocal && (<>- <Field label="Sampler" help="The algorithm that turns noise into your image. dpmpp_2m / euler are safe all-rounders.">- <Select size="sm" options={samplers.map((x) => ({ value: x, label: x }))} value={s.sampler} onChange={s.setSampler} />+ <Field label="Sampler" help="The algorithm that turns noise into your image. DPM++ 2M / Euler are safe all-rounders.">+ <Select size="sm" searchable ariaLabel="Sampler" options={samplerOptions(samplers)} value={s.sampler} onChange={s.setSampler} /></Field>- <Field label="Scheduler" help="How the denoise steps are spaced. karras is a good default for SDXL; simple for FLUX.">- <Select size="sm" options={schedulers.map((x) => ({ value: x, label: x }))} value={s.scheduler} onChange={s.setScheduler} />+ <Field label="Scheduler" help="How the denoise steps are spaced. Karras is a good default for SDXL; Simple for FLUX.">+ <Select size="sm" searchable ariaLabel="Scheduler" options={schedulerOptions(schedulers)} value={s.scheduler} onChange={s.setScheduler} /></Field></>)}diff --git a/src/components/create/experimental/WorkflowParams.tsx b/src/components/create/experimental/WorkflowParams.tsxindex c5b9c808..3d2e2edd 100644--- a/src/components/create/experimental/WorkflowParams.tsx+++ b/src/components/create/experimental/WorkflowParams.tsx@@ -17,6 +17,7 @@ import {listWorkflowParams, workflowNodeTypes,type ParamValue, type WorkflowParamField, type WorkflowParamNode, type WorkflowRunPath,} from '../../../api/workflow-params'+import { workflowOptionText } from '../../../lib/sampler-names'import { useWorkflowStore } from '../../../stores/workflowStore'import { baseFieldClass, label } from './SchemaControl'import { cn } from '../ui/cn'@@ -135,7 +136,7 @@ function FieldControl({ field, value, onChange, id }: {onChange(typeof field.fileValue === 'number' && Number.isFinite(Number(v)) ? Number(v) : v)}}>{field.autoByLu && <option value="">Auto (LU picks a match)</option>}- {c.options.map((o) => <option key={o} value={o}>{o}</option>)}+ {c.options.map((o) => <option key={o} value={o}>{workflowOptionText(field.inputKey, o)}</option>)}</select>)}diff --git a/src/components/create/ui/Select.tsx b/src/components/create/ui/Select.tsxindex 8388ce65..409ba180 100644--- a/src/components/create/ui/Select.tsx+++ b/src/components/create/ui/Select.tsx@@ -80,13 +80,17 @@ export function Select({const unique = options.filter((option) => !seen.has(option.value) && !!seen.add(option.value))if (!query.trim()) return unique- const normalizedQuery = query.toLowerCase()+ // Spaces, underscores, dashes and dots do not count, so "euler a",+ // "euler_a" and "Euler a" are one search, as are "dpmpp sde" and+ // "dpmpp_sde" (C24, sampler names written two ways).+ const loose = (text: string) => text.toLowerCase().replace(/[\s_.-]+/g, '')+ const normalizedQuery = loose(query)return unique.filter((option) =>- option.label.toLowerCase().includes(normalizedQuery) ||- option.sublabel?.toLowerCase().includes(normalizedQuery) ||- option.title?.toLowerCase().includes(normalizedQuery),+ loose(option.label).includes(normalizedQuery) ||+ (option.sublabel !== undefined && loose(option.sublabel).includes(normalizedQuery)) ||+ (option.title !== undefined && loose(option.title).includes(normalizedQuery)),)}, [options, query])diff --git a/src/components/create/ui/__tests__/sampler-names-as-the-community-writes-them.test.tsx b/src/components/create/ui/__tests__/sampler-names-as-the-community-writes-them.test.tsxnew file mode 100644index 00000000..08d3c64e--- /dev/null+++ b/src/components/create/ui/__tests__/sampler-names-as-the-community-writes-them.test.tsx@@ -0,0 +1,114 @@+// @vitest-environment jsdom+/**+ * C24, Discord xlollobx 31.10.2026: "the names look a bit different in the+ * list". Community tips say "DPM++ SDE" and "Euler a", Create listed ComfyUI's+ * dpmpp_sde and euler_ancestral. The list shows the readable name now, keeps+ * the raw one small beside it and as the tooltip, finds either spelling, and+ * still stores and sends the raw name.+ *+ * Run: npx vitest run src/components/create/ui/__tests__/sampler-names-as-the-community-writes-them.test.tsx+ */+import { describe, it, expect, afterEach, vi } from 'vitest'+import { cleanup, fireEvent, render, screen } from '@testing-library/react'+import { Select } from '../Select'+import { samplerLabel, samplerOptions, schedulerLabel, schedulerOptions, workflowOptionText } from '../../../../lib/sampler-names'++afterEach(cleanup)++// What a current ComfyUI reports for KSampler, plus one from a custom node.+const COMFY_SAMPLERS = [+ 'euler', 'euler_cfg_pp', 'euler_ancestral', 'heun', 'dpm_2', 'dpm_2_ancestral', 'lms',+ 'dpmpp_2s_ancestral', 'dpmpp_sde', 'dpmpp_sde_gpu', 'dpmpp_2m', 'dpmpp_2m_sde',+ 'dpmpp_2m_sde_gpu', 'dpmpp_3m_sde', 'lcm', 'ddim', 'uni_pc', 'my_custom_sampler',+]++describe('the readable name', () => {+ it('is the one community tips use', () => {+ expect(samplerLabel('dpmpp_sde')).toBe('DPM++ SDE')+ expect(samplerLabel('dpmpp_2m_sde')).toBe('DPM++ 2M SDE')+ expect(samplerLabel('euler_ancestral')).toBe('Euler a')+ expect(samplerLabel('dpmpp_2s_ancestral')).toBe('DPM++ 2S a')+ expect(samplerLabel('uni_pc')).toBe('UniPC')+ expect(schedulerLabel('karras')).toBe('Karras')+ expect(schedulerLabel('sgm_uniform')).toBe('SGM Uniform')+ })++ it("names ComfyUI's variants after their sampler", () => {+ expect(samplerLabel('dpmpp_2m_sde_gpu')).toBe('DPM++ 2M SDE GPU')+ expect(samplerLabel('euler_cfg_pp')).toBe('Euler CFG++')+ })++ it('falls back to the raw name for a name it does not know', () => {+ expect(samplerLabel('my_custom_sampler')).toBe('my_custom_sampler')+ expect(samplerLabel('foo_gpu')).toBe('foo_gpu')+ expect(schedulerLabel('my_schedule')).toBe('my_schedule')+ // An unknown name is not shown twice.+ expect(samplerOptions(['my_custom_sampler'])).toEqual([{ value: 'my_custom_sampler', label: 'my_custom_sampler' }])+ })++ it('keeps the raw name as the value, beside the row and as the tooltip', () => {+ expect(samplerOptions(['dpmpp_sde'])).toEqual([+ { value: 'dpmpp_sde', label: 'DPM++ SDE', sublabel: 'dpmpp_sde', title: 'dpmpp_sde' },+ ])+ expect(schedulerOptions(['karras'])[0]).toMatchObject({ value: 'karras', label: 'Karras', sublabel: 'karras' })+ })+})++describe('the sampler picker', () => {+ const names = () => screen.queryAllByRole('option').map((o) => o.querySelector('.lu-picker-name')?.textContent)++ function open(onChange = vi.fn()) {+ render(<Select ariaLabel="Sampler" searchable options={samplerOptions(COMFY_SAMPLERS)} value="dpmpp_2m_sde" onChange={onChange} />)+ // The closed field shows the readable name, the raw one is its tooltip.+ const trigger = screen.getByRole('button', { name: 'Sampler' })+ expect(trigger.textContent).toBe('DPM++ 2M SDE')+ expect(trigger.querySelector('[title]')?.getAttribute('title')).toBe('dpmpp_2m_sde')+ fireEvent.click(trigger)+ return screen.getByPlaceholderText('Search...')+ }+ const search = (box: HTMLElement, q: string) => fireEvent.change(box, { target: { value: q } })++ it('finds a sampler by the name from a tip', () => {+ const box = open()+ search(box, 'DPM++ SDE')+ expect(names()).toEqual(['DPM++ SDE', 'DPM++ SDE GPU'])+ search(box, 'euler a')+ expect(names()).toEqual(['Euler a'])+ })++ it('finds it by the raw ComfyUI name, written either way', () => {+ const box = open()+ search(box, 'dpmpp_2m_sde')+ expect(names()).toEqual(['DPM++ 2M SDE', 'DPM++ 2M SDE GPU'])+ search(box, 'euler_a')+ expect(names()).toEqual(['Euler a'])+ search(box, 'dpmpp sde')+ expect(names()).toEqual(['DPM++ SDE', 'DPM++ SDE GPU'])+ })++ it('shows the raw name small in the row and stores it on pick', () => {+ const onChange = vi.fn()+ const box = open(onChange)+ search(box, 'DPM++ SDE')+ const row = screen.getAllByRole('option')[0]+ expect(row.querySelector('.lu-picker-sub')?.textContent).toBe('dpmpp_sde')+ fireEvent.click(row)+ expect(onChange).toHaveBeenCalledWith('dpmpp_sde')+ })++ it('lists an unknown sampler under its raw name', () => {+ const box = open()+ search(box, 'custom')+ expect(names()).toEqual(['my_custom_sampler'])+ })+})++describe('the Workflow parameters list of an imported workflow', () => {+ it('names a sampler or scheduler both ways, other inputs as they are', () => {+ expect(workflowOptionText('sampler_name', 'dpmpp_2m_sde')).toBe('DPM++ 2M SDE · dpmpp_2m_sde')+ expect(workflowOptionText('scheduler', 'karras')).toBe('Karras · karras')+ expect(workflowOptionText('sampler_name', 'my_custom_sampler')).toBe('my_custom_sampler')+ // A "karras" in some other input is not a scheduler.+ expect(workflowOptionText('mode', 'karras')).toBe('karras')+ })+})diff --git a/src/lib/sampler-names.ts b/src/lib/sampler-names.tsnew file mode 100644index 00000000..4b157015--- /dev/null+++ b/src/lib/sampler-names.ts@@ -0,0 +1,96 @@+// C24 (Discord xlollobx, 2026-10-31): Create listed ComfyUI's raw sampler and+// scheduler names (dpmpp_sde, euler_ancestral, karras). Tips from the community+// say "DPM++ SDE" or "Euler a", the names A1111 and Forge show, and users could+// not find them in the list. The list now shows that name with the raw one+// beside it. What is stored and sent to ComfyUI stays the raw name.+import type { SelectOption } from '../components/create/ui/Select'++const SAMPLER_LABELS: Record<string, string> = {+ euler: 'Euler',+ euler_ancestral: 'Euler a',+ heun: 'Heun',+ heunpp2: 'Heun++ 2',+ dpm_2: 'DPM2',+ dpm_2_ancestral: 'DPM2 a',+ lms: 'LMS',+ dpm_fast: 'DPM fast',+ dpm_adaptive: 'DPM adaptive',+ dpmpp_2s_ancestral: 'DPM++ 2S a',+ dpmpp_sde: 'DPM++ SDE',+ dpmpp_2m: 'DPM++ 2M',+ dpmpp_2m_sde: 'DPM++ 2M SDE',+ dpmpp_2m_sde_heun: 'DPM++ 2M SDE Heun',+ dpmpp_3m_sde: 'DPM++ 3M SDE',+ ddpm: 'DDPM',+ lcm: 'LCM',+ ipndm: 'iPNDM',+ ipndm_v: 'iPNDM v',+ deis: 'DEIS',+ res_multistep: 'Res Multistep',+ res_multistep_ancestral: 'Res Multistep a',+ gradient_estimation: 'Gradient Estimation',+ er_sde: 'ER-SDE',+ seeds_2: 'SEEDS 2',+ seeds_3: 'SEEDS 3',+ sa_solver: 'SA-Solver',+ sa_solver_pece: 'SA-Solver PECE',+ ddim: 'DDIM',+ uni_pc: 'UniPC',+ uni_pc_bh2: 'UniPC BH2',+}++/** ComfyUI's variants of a sampler: the same name with a suffix. */+const SAMPLER_SUFFIXES: [string, string][] = [+ ['_cfg_pp', ' CFG++'],+ ['_gpu', ' GPU'],+]++const SCHEDULER_LABELS: Record<string, string> = {+ normal: 'Normal',+ karras: 'Karras',+ exponential: 'Exponential',+ sgm_uniform: 'SGM Uniform',+ simple: 'Simple',+ ddim_uniform: 'DDIM Uniform',+ beta: 'Beta',+ linear_quadratic: 'Linear Quadratic',+ kl_optimal: 'KL Optimal',+ align_your_steps: 'Align Your Steps',+}++/** The name the community uses for a ComfyUI sampler; an unknown one stays raw. */+export function samplerLabel(raw: string): string {+ if (SAMPLER_LABELS[raw]) return SAMPLER_LABELS[raw]+ for (const [suffix, label] of SAMPLER_SUFFIXES) {+ if (raw.endsWith(suffix)) {+ const base = samplerLabel(raw.slice(0, -suffix.length))+ if (base !== raw.slice(0, -suffix.length)) return base + label+ }+ }+ return raw+}++/** The name the community uses for a ComfyUI scheduler; an unknown one stays raw. */+export function schedulerLabel(raw: string): string {+ return SCHEDULER_LABELS[raw] ?? raw+}++function options(list: string[], label: (raw: string) => string): SelectOption[] {+ return list.map((raw) => {+ const shown = label(raw)+ // The raw name stays in sight, small beside the row and as the tooltip,+ // and the search finds it there too.+ return shown === raw ? { value: raw, label: raw } : { value: raw, label: shown, sublabel: raw, title: raw }+ })+}++export const samplerOptions = (list: string[]) => options(list, samplerLabel)+export const schedulerOptions = (list: string[]) => options(list, schedulerLabel)++/** One line for a plain <select> of an imported workflow ("Workflow parameters"):+ * the readable name with the raw one after it, by the ComfyUI input it sets.+ * Other inputs and unknown names stay as they are. */+export function workflowOptionText(inputKey: string, raw: string): string {+ const shown = inputKey === 'sampler_name' ? samplerLabel(raw) : inputKey === 'scheduler' ? schedulerLabel(raw) : raw+ return shown === raw ? raw : `${shown} · ${raw}`+}