Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat(writers-room): tighter image-gen settings + steps/seed + suppress text in graphic novel & comic book presets

Adam Eivyeafb7e85a8fb
diff --git a/client/src/components/writers-room/SceneCard.jsx b/client/src/components/writers-room/SceneCard.jsx
index 8f0666076f..84ca34be25 100644
--- a/client/src/components/writers-room/SceneCard.jsx
+++ b/client/src/components/writers-room/SceneCard.jsx
@@ -144,6 +144,8 @@ export default function SceneCard({
setProgress(null);
setGenerated(null);
const prompt = buildScenePromptWithCharacters(workTitle, scene, matchedCharacters, imageStyle?.prompt || '');
+ const stepsNum = imageCfg.steps ? Number(imageCfg.steps) : undefined;
+ const seedNum = imageCfg.seed && Number(imageCfg.seed) >= 0 ? Number(imageCfg.seed) : undefined;
const res = await generateImage({
prompt,
negativePrompt: imageStyle?.negativePrompt || '',
@@ -151,6 +153,8 @@ export default function SceneCard({
mode: imageCfg.mode,
width: imageCfg.width,
height: imageCfg.height,
+ ...(Number.isFinite(stepsNum) ? { steps: stepsNum } : {}),
+ ...(Number.isFinite(seedNum) ? { seed: seedNum } : {}),
}).catch((err) => {
setError(err.message);
setGenStatus('error');
diff --git a/client/src/components/writers-room/StoryboardPanel.jsx b/client/src/components/writers-room/StoryboardPanel.jsx
index 638fb0b449..390c350d40 100644
--- a/client/src/components/writers-room/StoryboardPanel.jsx
+++ b/client/src/components/writers-room/StoryboardPanel.jsx
@@ -1,5 +1,6 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
-import { Clapperboard, Loader2, RefreshCcw, Settings as SettingsIcon, AlertTriangle, Palette, Check } from 'lucide-react';
+import { Clapperboard, Loader2, RefreshCcw, Settings as SettingsIcon, AlertTriangle, Palette, Check, Dice5 } from 'lucide-react';
+import { randomSeed } from '../../lib/genUtils';
import toast from '../ui/Toast';
import {
listWritersRoomAnalyses,
@@ -346,47 +347,88 @@ function WorldStyleRow({ value, presets, onChange }) {
);
}
+const RES_PRESETS = [
+ { label: '768×512 (3:2)', width: 768, height: 512 },
+ { label: '512×512 (1:1)', width: 512, height: 512 },
+ { label: '512×768 (2:3)', width: 512, height: 768 },
+ { label: '1024×576 (16:9)', width: 1024, height: 576 },
+ { label: '1024×1024 (1:1)', width: 1024, height: 1024 },
+];
+
function ImageGenSettingsRow({ cfg, models, onChange }) {
- const RES_PRESETS = [
- { label: '768×512 (3:2)', width: 768, height: 512 },
- { label: '512×512 (1:1)', width: 512, height: 512 },
- { label: '512×768 (2:3)', width: 512, height: 768 },
- { label: '1024×576 (16:9)', width: 1024, height: 576 },
- { label: '1024×1024 (1:1)', width: 1024, height: 1024 },
- ];
const presetMatch = RES_PRESETS.find((p) => p.width === cfg.width && p.height === cfg.height);
+ const currentModel = models.find((m) => m.id === cfg.modelId);
+ const inputCls = 'w-full mt-0.5 bg-port-bg border border-port-border rounded px-2 py-1 text-[11px] text-gray-200 focus:border-port-accent outline-none';
+ const labelCls = 'text-[9px] uppercase tracking-wider text-gray-500';
return (
<div className="space-y-1.5">
- <label className="block">
- <span className="text-[9px] uppercase tracking-wider text-gray-500">Image model</span>
- <select
- value={cfg.modelId}
- onChange={(e) => onChange({ ...cfg, modelId: e.target.value })}
- className="w-full mt-0.5 bg-port-bg border border-port-border rounded px-2 py-1 text-[11px] text-gray-200"
- >
- {models.length === 0 && <option value={cfg.modelId}>{cfg.modelId}</option>}
- {models.map((m) => (
- <option key={m.id} value={m.id}>{m.name || m.id}</option>
- ))}
- </select>
- </label>
- <label className="block">
- <span className="text-[9px] uppercase tracking-wider text-gray-500">Resolution</span>
- <select
- value={presetMatch ? `${cfg.width}x${cfg.height}` : 'custom'}
- onChange={(e) => {
- if (e.target.value === 'custom') return;
- const [w, h] = e.target.value.split('x').map(Number);
- onChange({ ...cfg, width: w, height: h });
- }}
- className="w-full mt-0.5 bg-port-bg border border-port-border rounded px-2 py-1 text-[11px] text-gray-200"
- >
- {RES_PRESETS.map((p) => (
- <option key={p.label} value={`${p.width}x${p.height}`}>{p.label}</option>
- ))}
- {!presetMatch && <option value="custom">Custom ({cfg.width}×{cfg.height})</option>}
- </select>
- </label>
+ <div className="grid grid-cols-2 gap-1.5">
+ <label className="block">
+ <span className={labelCls}>Image model</span>
+ <select
+ value={cfg.modelId}
+ onChange={(e) => onChange({ ...cfg, modelId: e.target.value })}
+ className={inputCls}
+ >
+ {models.length === 0 && <option value={cfg.modelId}>{cfg.modelId}</option>}
+ {models.map((m) => (
+ <option key={m.id} value={m.id}>{m.name || m.id}</option>
+ ))}
+ </select>
+ </label>
+ <label className="block">
+ <span className={labelCls}>Resolution</span>
+ <select
+ value={presetMatch ? `${cfg.width}x${cfg.height}` : 'custom'}
+ onChange={(e) => {
+ if (e.target.value === 'custom') return;
+ const [w, h] = e.target.value.split('x').map(Number);
+ onChange({ ...cfg, width: w, height: h });
+ }}
+ className={inputCls}
+ >
+ {RES_PRESETS.map((p) => (
+ <option key={p.label} value={`${p.width}x${p.height}`}>{p.label}</option>
+ ))}
+ {!presetMatch && <option value="custom">Custom ({cfg.width}×{cfg.height})</option>}
+ </select>
+ </label>
+ </div>
+ <div className="grid grid-cols-2 gap-1.5">
+ <label className="block">
+ <span className={labelCls}>
+ Steps {currentModel?.steps && <span className="normal-case text-gray-600">(default {currentModel.steps})</span>}
+ </span>
+ <input
+ type="number" min={1} max={150}
+ value={cfg.steps}
+ onChange={(e) => onChange({ ...cfg, steps: e.target.value })}
+ placeholder={String(currentModel?.steps || 'auto')}
+ className={inputCls}
+ />
+ </label>
+ <label className="block">
+ <span className={labelCls}>Seed</span>
+ <div className="flex items-stretch gap-1 mt-0.5">
+ <input
+ type="number"
+ value={cfg.seed}
+ onChange={(e) => onChange({ ...cfg, seed: e.target.value })}
+ placeholder="random"
+ className="flex-1 bg-port-bg border border-port-border rounded px-2 py-1 text-[11px] text-gray-200 focus:border-port-accent outline-none"
+ />
+ <button
+ type="button"
+ onClick={() => onChange({ ...cfg, seed: randomSeed() })}
+ className="px-1.5 text-gray-500 hover:text-port-accent border border-port-border rounded"
+ title="Randomize seed"
+ aria-label="Randomize seed"
+ >
+ <Dice5 size={11} />
+ </button>
+ </div>
+ </label>
+ </div>
</div>
);
}
diff --git a/client/src/components/writers-room/sceneCardHelpers.js b/client/src/components/writers-room/sceneCardHelpers.js
index 5b3c35c0ca..5b40ed11f9 100644
--- a/client/src/components/writers-room/sceneCardHelpers.js
+++ b/client/src/components/writers-room/sceneCardHelpers.js
@@ -4,11 +4,16 @@
// Defaults for the per-scene image gen pipe. Klein-4B is the fastest FLUX.2
// variant on Apple Silicon, and 768×512 is a 3:2 aspect that suits scene work.
+// steps + seed are stored as strings (or empty) so the form inputs can bind
+// directly. Empty string = "use model default" for steps, "random per render"
+// for seed. Parsed to numbers at the generateImage boundary in SceneCard.
export const WR_IMAGE_DEFAULTS = {
modelId: 'flux2-klein-4b',
mode: 'local',
width: 768,
height: 512,
+ steps: '',
+ seed: '',
};
export function readWrImageSettings(settings) {
@@ -18,6 +23,8 @@ export function readWrImageSettings(settings) {
mode: stored.mode || WR_IMAGE_DEFAULTS.mode,
width: Number.isFinite(stored.width) ? stored.width : WR_IMAGE_DEFAULTS.width,
height: Number.isFinite(stored.height) ? stored.height : WR_IMAGE_DEFAULTS.height,
+ steps: stored.steps != null && stored.steps !== '' ? String(stored.steps) : '',
+ seed: stored.seed != null && stored.seed !== '' ? String(stored.seed) : '',
};
}
diff --git a/server/lib/writersRoomStylePresets.js b/server/lib/writersRoomStylePresets.js
index eb9f45e311..93b9a9760b 100644
--- a/server/lib/writersRoomStylePresets.js
+++ b/server/lib/writersRoomStylePresets.js
@@ -44,8 +44,12 @@ export const STYLE_PRESETS = [
id: 'graphic-novel',
label: 'Graphic novel',
description: 'Bold ink linework, halftone shading, limited palette.',
- prompt: 'graphic novel illustration, bold ink outlines, halftone shading, limited muted color palette, sequential art panels, mike mignola influence, cinematic framing',
- negativePrompt: 'photorealistic, photograph, 3d render, soft watercolor, anime',
+ // Fast image models (FLUX.2 Klein, Schnell) render text as garbled
+ // gibberish. "sequential art panels" reliably summons word balloons and
+ // sound effects, so it's pulled out of the prompt and the negative
+ // prompt explicitly suppresses every form of text the model might add.
+ prompt: 'graphic novel illustration, bold ink outlines, halftone shading, limited muted color palette, mike mignola influence, cinematic framing, single full-bleed image, no text',
+ negativePrompt: 'photorealistic, photograph, 3d render, soft watercolor, anime, text, words, letters, lettering, typography, title, logo, word balloon, speech bubble, caption box, sound effect, comic book cover',
},
{
id: 'watercolor-storybook',
@@ -58,8 +62,10 @@ export const STYLE_PRESETS = [
id: 'comic-book',
label: 'Comic book',
description: 'American comic book art, ink and color, dynamic angles.',
- prompt: 'american comic book art, dynamic poses, bold ink and flat color, ben-day dots, dramatic angles, action-oriented composition, jim lee influence',
- negativePrompt: 'photorealistic, photograph, soft watercolor, anime, low contrast',
+ // Same text-suppression as graphic novel — fast models bake garbled
+ // word balloons and "POW" sound effects into the image otherwise.
+ prompt: 'american comic book art, dynamic poses, bold ink and flat color, ben-day dots, dramatic angles, action-oriented composition, jim lee influence, single full-bleed image, no text',
+ negativePrompt: 'photorealistic, photograph, soft watercolor, anime, low contrast, text, words, letters, lettering, typography, title, logo, word balloon, speech bubble, caption box, sound effect, onomatopoeia, comic book cover',
},
{
id: 'photorealistic',