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.

Hide empty cloud Expert controls while keeping local controls

David041f7fb816bc
diff --git a/src/components/create/experimental/ParamGroups.tsx b/src/components/create/experimental/ParamGroups.tsx
index 8682c9ba..efdad190 100644
--- a/src/components/create/experimental/ParamGroups.tsx
+++ b/src/components/create/experimental/ParamGroups.tsx
@@ -45,6 +45,7 @@ export function ParamGroups() {
// silently dropped, so the whole Expert section is dead on the local Mac.
// Keep it on Mac-cloud and on the ComfyUI hosts (Windows/Linux).
const isMlxLocal = !isCloud && isMlxImageHost()
+ const showExpert = !isMlxLocal && (!isCloud || isEdit)
// LoRA is a local-only knob; for video it's offered only on families whose
// builder actually applies it (see VIDEO_LORA_FAMILIES). Image always qualifies.
const loraSupported = !isCloud && (!isVideo || VIDEO_LORA_FAMILIES.has(classifyModel(s.videoModel)))
@@ -197,9 +198,8 @@ export function ParamGroups() {
)}
</Section>
- {/* EXPERT — every control in here is dropped by the Mac MLX pipeline, so
- the whole section is hidden on the local Mac (kept on cloud + ComfyUI). */}
- {!isMlxLocal && (
+ {/* Only render a section with controls the selected backend can use. */}
+ {showExpert && (
<Section title="Expert" icon={FlaskConical} defaultOpen={false}>
{/* Sampler/Scheduler are ComfyUI-only knobs — the hosted WaveSpeed
endpoints don't accept them, so hide them on the cloud backend
@@ -218,7 +218,7 @@ export function ParamGroups() {
{isEdit && (
<Slider label="Denoise (raw)" min={0.05} max={1} step={0.05} value={s.denoise} onChange={s.setDenoise} format={(v) => v.toFixed(2)} />
)}
- {meta.allowsMask && (
+ {meta.allowsMask && !isCloud && (
<Slider label="Mask edge feather" min={0} max={64} step={1} value={s.growMaskBy} onChange={s.setGrowMaskBy} unit="px" />
)}
diff --git a/src/components/create/experimental/__tests__/expert-visibility.test.ts b/src/components/create/experimental/__tests__/expert-visibility.test.ts
new file mode 100644
index 00000000..b8a3f414
--- /dev/null
+++ b/src/components/create/experimental/__tests__/expert-visibility.test.ts
@@ -0,0 +1,51 @@
+// @vitest-environment jsdom
+import { createElement } from 'react'
+import { afterEach, describe, expect, it, vi } from 'vitest'
+import { cleanup, fireEvent, render, screen } from '@testing-library/react'
+import { useCreateStore } from '../../../../stores/createStore'
+import { ParamGroups } from '../ParamGroups'
+
+const host = vi.hoisted(() => ({ mlx: false }))
+vi.mock('../../../../api/mlx-image', () => ({ isMlxImageHost: () => host.mlx }))
+vi.mock('../../../../api/comfyui', () => ({ classifyModel: () => 'sdxl' }))
+vi.mock('../CreateContext', () => ({ useCreateExp: () => ({
+ samplerList: [], schedulerList: [], loraList: [], vaeList: [], refreshModelLists: vi.fn(),
+}) }))
+
+afterEach(() => { cleanup(); host.mlx = false })
+
+describe('Expert controls match the desktop backend', () => {
+ it('hides the empty cloud image section', () => {
+ useCreateStore.setState({ backend: 'cloud', mode: 'image' })
+ useCreateStore.getState().setIntent('image')
+ render(createElement(ParamGroups))
+ expect(screen.queryByText('Expert')).toBeNull()
+ })
+
+ it('keeps working ComfyUI controls visible when expanded', () => {
+ useCreateStore.setState({ backend: 'local', mode: 'image' })
+ useCreateStore.getState().setIntent('image')
+ render(createElement(ParamGroups))
+ fireEvent.click(screen.getByText('Expert'))
+ expect(screen.getByText('Sampler')).toBeTruthy()
+ expect(screen.getByText('Scheduler')).toBeTruthy()
+ })
+
+ it('does not offer unsupported controls on MLX', () => {
+ host.mlx = true
+ useCreateStore.setState({ backend: 'local', mode: 'image' })
+ useCreateStore.getState().setIntent('image')
+ render(createElement(ParamGroups))
+ expect(screen.queryByText('Expert')).toBeNull()
+ })
+
+ it('keeps cloud edit denoise while hiding local mask controls', () => {
+ useCreateStore.setState({ backend: 'cloud', mode: 'image' })
+ useCreateStore.getState().setIntent('edit')
+ render(createElement(ParamGroups))
+ fireEvent.click(screen.getByText('Expert'))
+ expect(screen.getByText('Denoise (raw)')).toBeTruthy()
+ expect(screen.queryByText('Mask edge feather')).toBeNull()
+ expect(screen.queryByText('Sampler')).toBeNull()
+ })
+})