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.

fix(create): the style mode's composer line and counter speak of pictures

purpled71f0e115aea
diff --git a/e2e/style-train.spec.ts b/e2e/style-train.spec.ts
index 23c8a5d6..a9f2e06b 100644
--- a/e2e/style-train.spec.ts
+++ b/e2e/style-train.spec.ts
@@ -68,6 +68,9 @@ test('mac: a style is trained with content captions and lands switched on in the
await page.getByRole('radio', { name: 'Style / concept', exact: true }).click()
await expect(page.getByTestId('style-mode-note')).toContainText('Teaches a look, a concept or a pose')
await expect(page.getByText('Drop 4 to 100 pictures in the style here')).toBeVisible()
+ // FEHLER-P8 #1: the line over Create speaks of the style too.
+ await expect(page.getByText('Add 4 to 100 pictures that share the style above, give it a name, then hit Create to train.')).toBeVisible()
+ await expect(page.getByText(/photos of one person or character/)).toHaveCount(0)
await expect(page.getByTestId('mac-train-hint')).toContainText('Standard, 1600 steps')
await expect(page.getByTestId('mac-train-hint')).toContainText('The style lands in your LoRA folder')
await controls.getByPlaceholder('Name, e.g. inkwash').fill('p8lino')
@@ -76,7 +79,7 @@ test('mac: a style is trained with content captions and lands switched on in the
const files = pictures(4)
await page.locator('input[type="file"][accept="image/*"]').first().setInputFiles(files)
- await expect(controls).toContainText('4/100 photos')
+ await expect(controls).toContainText('4/100 pictures')
await expect(page.getByTestId('train-caption-help')).toContainText('what is left unnamed is what the LoRA learns')
const fields = page.getByPlaceholder('e.g. a fox in a forest')
await expect(fields).toHaveCount(4)
diff --git a/src/components/create/experimental/Composer.tsx b/src/components/create/experimental/Composer.tsx
index 32ccd04c..a31c03b1 100644
--- a/src/components/create/experimental/Composer.tsx
+++ b/src/components/create/experimental/Composer.tsx
@@ -78,6 +78,7 @@ export function Composer({ onOpenAdvanced, onOpenWorkflows }: Props) {
// the short gap between two of its images: the button stays Cancel.
const isGenerating = useCreateStore((s) => s.isGenerating || s.batchRun !== null)
const backend = useCreateStore((s) => s.backend)
+ const trainKind = useCreateStore((s) => s.trainKind)
const targetResolution = useCreateStore((s) => s.targetResolution)
const setTargetResolution = useCreateStore((s) => s.setTargetResolution)
const upscaleFactor = useCreateStore((s) => s.upscaleFactor)
@@ -369,7 +370,7 @@ export function Composer({ onOpenAdvanced, onOpenWorkflows }: Props) {
// A caption that names the missing inputs is a note above the prompt
// window (laneHint.ts isInputHint); the action captions stay inside it.
const inputNote = showNoPromptHint && !needsMask && isInputHint(intent)
- const laneCaption = noPromptHint(meta.id, backend, backend === 'local' && isMlxImageHost())
+ const laneCaption = noPromptHint(meta.id, backend, backend === 'local' && isMlxImageHost(), trainKind)
// The disabled button says which input it waits for (laneHint.ts).
const missingSource = missingSourceHint({ intent, needsSource: meta.needsSource, hasSource: hasStart })
diff --git a/src/components/create/experimental/SpecialIntentControls.tsx b/src/components/create/experimental/SpecialIntentControls.tsx
index e3487d8e..ab7d9d91 100644
--- a/src/components/create/experimental/SpecialIntentControls.tsx
+++ b/src/components/create/experimental/SpecialIntentControls.tsx
@@ -745,7 +745,7 @@ function LocalTrainControls() {
options={TRAIN_VRAM_PRESETS.map((p) => ({ value: p.value, label: p.label }))}
/>
<span className="t-label text-gray-600">
- {trainImages.length}/{maxTrainImages('local')} photos{trainImages.length < MIN_TRAIN_IMAGES ? `, need at least ${MIN_TRAIN_IMAGES}` : ''}
+ {trainImages.length}/{maxTrainImages('local')} {trainKind === 'style' ? 'pictures' : 'photos'}{trainImages.length < MIN_TRAIN_IMAGES ? `, need at least ${MIN_TRAIN_IMAGES}` : ''}
</span>
</div>
{!isGenerating && (
@@ -865,7 +865,7 @@ function MacTrainControls() {
options={presets.map((p) => ({ value: String(p.steps), label: p.label }))}
/>
<span className="t-label text-gray-600">
- {trainImages.length}/{maxTrainImages('local')} photos{trainImages.length < MIN_TRAIN_IMAGES ? `, need at least ${MIN_TRAIN_IMAGES}` : ''}
+ {trainImages.length}/{maxTrainImages('local')} {trainKind === 'style' ? 'pictures' : 'photos'}{trainImages.length < MIN_TRAIN_IMAGES ? `, need at least ${MIN_TRAIN_IMAGES}` : ''}
</span>
</div>
{!isGenerating && (
diff --git a/src/components/create/experimental/__tests__/laneHint.test.ts b/src/components/create/experimental/__tests__/laneHint.test.ts
index 435efb9c..71b70fba 100644
--- a/src/components/create/experimental/__tests__/laneHint.test.ts
+++ b/src/components/create/experimental/__tests__/laneHint.test.ts
@@ -73,6 +73,16 @@ describe('noPromptHint', () => {
expect(noPromptHint('character', 'cloud')).toContain('4 to 30 photos')
})
+ it('speaks of a style, not of one person, in the style mode (FEHLER-P8 #1)', () => {
+ const style = noPromptHint('character', 'local', false, 'style')
+ expect(style).toBe('Add 4 to 100 pictures that share the style above, give it a name, then hit Create to train.')
+ expect(style).not.toMatch(/person|trigger|photos/)
+ expect(noPromptHint('character', 'local', true, 'style')).toBe(style)
+ // The cloud has no style mode: a leftover choice changes nothing there.
+ expect(noPromptHint('character', 'cloud', false, 'style')).toBe(noPromptHint('character', 'cloud'))
+ expect(noPromptHint('character', 'local', false, 'character')).toContain('photos of one person or character')
+ })
+
it('keeps the eraser on its own line instead of the cutout default', () => {
// The old copy said "remove the background" for every prompt-less lane,
// which walked eraser users straight into "Paint a mask first".
diff --git a/src/components/create/experimental/laneHint.ts b/src/components/create/experimental/laneHint.ts
index c6cb4315..4995298e 100644
--- a/src/components/create/experimental/laneHint.ts
+++ b/src/components/create/experimental/laneHint.ts
@@ -8,6 +8,7 @@
// the user did.
import type { CreateBackend, CreateIntent } from '../../../stores/createStore'
import { MIN_TRAIN_IMAGES, maxTrainImages } from '../../../lib/train-image-cap'
+import type { TrainKind } from '../../../lib/train-kind'
/** Captions that name the inputs a lane is waiting for. These go stale the
* moment the chips are filled, so they hide once the lane reports ready. */
@@ -31,13 +32,19 @@ export function isInputHint(id: CreateIntent): boolean {
/** Caption for prompt-less intents so each reads honestly (the old copy said
* "remove the background" for every one of them — misleading the eraser into
* a guaranteed "Paint a mask first" error). */
-export function noPromptHint(id: CreateIntent, backend: CreateBackend = 'local', mac = false): string {
+export function noPromptHint(id: CreateIntent, backend: CreateBackend = 'local', mac = false, trainKind: TrainKind = 'character'): string {
switch (id) {
case 'upscale':
return 'No prompt needed. Just hit Create to enhance the image.'
case 'eraser':
return 'No prompt needed. Paint a mask over the object to remove, then hit Create.'
case 'character':
+ // 3.0.9 P8 (FEHLER-P8 #1): the style mode of the local trainers wants
+ // pictures in one style and a name, not one person and a trigger word.
+ // The cloud trains characters only, so it keeps the character line.
+ if (trainKind === 'style' && backend === 'local') {
+ return `Add ${MIN_TRAIN_IMAGES} to ${maxTrainImages(backend)} pictures that share the style above, give it a name, then hit Create to train.`
+ }
return `Add ${MIN_TRAIN_IMAGES} to ${maxTrainImages(backend)} photos of one person or character above, pick a trigger word, then hit Create to train.`
case 'lipsync':
// A Mac makes the clip from a portrait; it has no clip to resync.