AI media harness for planning, generating, and editing locally
TypeScript
Add model-specific image negative prompts
Bittiff1e4d8b18d8
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.mdindex 27b81fc..918a84e 100644--- a/RELEASE_NOTES.md+++ b/RELEASE_NOTES.md@@ -4,6 +4,8 @@ This alpha update adds Prompt video scenes, agent image drafts, Sol attention an## What's new+- **Image negative prompts.** MOSS exposes a Negative prompt field below the image root prompt, saved per model with drafts and generated images and applied during local or LAN generation. Fibo Turbo shows the field disabled because its single positive prediction does not support negative prompts. Visibility and support are controlled by model settings. Update LAN workers to protocol 15.+- **Fibo 2.0 image editing.** Added an Edit Turbo generator with transformer, Qwen3-VL encoder and Flux2 VAE downloads. Use whole-image, box or lasso edits, or cite up to four images in a new image prompt. Defaults to four steps on CUDA; unsupported video and H3-only controls are disabled.- **Lasso image edits.** Draw a freehand area beside the existing box tool, give it a prompt in the right panel, and select or move it from the canvas or Scene tree. Saved outlines become antialiased Slopfab masks for local and LAN generation, preserving pixels outside the selection. Bundled runtimes now use API 1.34; LAN workers require the matching update.diff --git a/docs/slopfab-compatibility.md b/docs/slopfab-compatibility.mdindex 82b3d30..b111c4f 100644--- a/docs/slopfab-compatibility.md+++ b/docs/slopfab-compatibility.md@@ -60,7 +60,7 @@ including an explicitly captured default. Native validation rejects unsupportedmodels, negative/non-finite values and values outside the float32 range.Slopus calls API 1.30's `slopfab_request_set_image_guidance` for planning and-generation, preserving MOSS's empty negative prompt and skip layer 22. CFG 1+generation, passing the image's saved negative prompt and preserving skip layer 22. CFG 1uses only the positive branch. Worker protocol 11 prevents an older workerfrom ignoring CFG. Tests verify the value in the bundled runtime's plan,project persistence, queue isolation and saved output settings.@@ -499,3 +499,16 @@ was relinked with `-Wl,-z,defs` andWithout that retention, the upstream static archive order leaves an unresolvedsymbol in the shared library. Linux plain instructions work; optional structured`text_render` glyph images still require Windows in this Slopfab version.++## Negative prompts++The image root stores `negativePrompts` by model ID. MOSS sends the selected+text with CFG through `slopfab_request_set_image_guidance`; CFG 1 bypasses the+negative branch. Drafts and generation snapshots retain the authored text.+Worker protocol 15 prevents older workers from silently discarding it.++The shared catalog's `negativePrompt` flag enables authoring and generation.+An optional `negativePromptDisabledReason` displays a disabled field with help;+Fibo Turbo uses this because it has no negative prediction branch. H3 hides the+field. Requests with nonempty negative prompts for unsupported models are+rejected at the native boundary.diff --git a/src-tauri/core/src/models.rs b/src-tauri/core/src/models.rsindex af3e833..3b3dc31 100644--- a/src-tauri/core/src/models.rs+++ b/src-tauri/core/src/models.rs@@ -4,6 +4,7 @@#[derive(Debug, serde::Deserialize)]#[serde(rename_all = "camelCase")]pub struct GeneratorFeatures {+ pub negative_prompt: bool,pub label: String,pub image_generation: bool,pub video_generation: bool,diff --git a/src-tauri/core/src/slopfab/config.rs b/src-tauri/core/src/slopfab/config.rsindex d3a8a17..7aa0c70 100644--- a/src-tauri/core/src/slopfab/config.rs+++ b/src-tauri/core/src/slopfab/config.rs@@ -122,6 +122,12 @@ impl Configuration {pub(super) fn validate_inputs(&self, request: &GenerationRequest) -> Result<(), String> {let features = crate::models::generator_features(&self.model_type);+ if let Some(negative) = &request.negative_prompt {+ if negative.contains('\0') { return Err("Negative prompt cannot contain null characters.".into()); }+ if !negative.is_empty() && (!features.negative_prompt || !request.still_image) {+ return Err(format!("{} does not support negative prompts for this generation.", features.label));+ }+ }if let Some(scale) = request.guidance_scale {crate::models::validate_cfg_scale(f64::from(scale))?;if features.cfg.is_none() || !request.still_image { return Err(format!("{} does not support configurable CFG for this generation.", features.label)); }diff --git a/src-tauri/core/src/slopfab/ffi/mod.rs b/src-tauri/core/src/slopfab/ffi/mod.rsindex 464d7e4..3a768f2 100644--- a/src-tauri/core/src/slopfab/ffi/mod.rs+++ b/src-tauri/core/src/slopfab/ffi/mod.rs@@ -233,9 +233,9 @@ impl Api {pub fn disable_image_guidance_for_test(&mut self) {Arc::get_mut(&mut self.inner).expect("configure API before creating handles").disable_image_guidance_for_test();}- pub fn set_image_guidance(&self, r: &RequestHandle, scale: f32) -> Result<(), String> {+ pub fn set_image_guidance(&self, r: &RequestHandle, scale: f32, negative_prompt: &str) -> Result<(), String> {self.check(r)?;- self.inner.set_image_guidance(r.pointer.as_ptr(), scale)+ self.inner.set_image_guidance(r.pointer.as_ptr(), scale, negative_prompt)}pub fn set_model_family(&self, r: &RequestHandle, family: &str) -> Result<(), String> {self.check(r)?;diff --git a/src-tauri/core/src/slopfab/ffi/raw/mod.rs b/src-tauri/core/src/slopfab/ffi/raw/mod.rsindex b5a9a01..e400f62 100644--- a/src-tauri/core/src/slopfab/ffi/raw/mod.rs+++ b/src-tauri/core/src/slopfab/ffi/raw/mod.rs@@ -594,10 +594,10 @@ impl Api {}#[cfg(test)]pub fn disable_image_guidance_for_test(&mut self) { self.set_image_guidance = None; }- pub fn set_image_guidance(&self, r: *mut Request, scale: f32) -> Result<(), String> {+ pub fn set_image_guidance(&self, r: *mut Request, scale: f32, negative_prompt: &str) -> Result<(), String> {let set = self.set_image_guidance.ok_or("Configurable CFG requires SlopFab API 1.30 or newer. Update the runtime on the machine running generation.")?;- // Keep MOSS's default empty negative prompt and negative-branch skip layer.- let negative = CString::new("").unwrap();+ // Preserve MOSS's default negative-branch skip layer.+ let negative = CString::new(negative_prompt).map_err(|_| "Negative prompt cannot contain null characters.")?;let skip_layers = [22_i32];self.error(unsafe { set(r, scale, negative.as_ptr(), skip_layers.as_ptr(), 1) })}diff --git a/src-tauri/core/src/slopfab/ffi/tests.rs b/src-tauri/core/src/slopfab/ffi/tests.rsindex 43a9ef3..e05bb9c 100644--- a/src-tauri/core/src/slopfab/ffi/tests.rs+++ b/src-tauri/core/src/slopfab/ffi/tests.rs@@ -130,9 +130,9 @@ fn older_runtimes_reject_cfg_and_cross_instance_guidance_is_refused() {let mut api = Api::load(&path).unwrap();api.disable_image_guidance_for_test();let request = RequestHandle::new(&api).unwrap();- assert!(api.set_image_guidance(&request, 3.0).unwrap_err().contains("API 1.30"));+ assert!(api.set_image_guidance(&request, 3.0, "watermark").unwrap_err().contains("API 1.30"));let other = Api::load(&path).unwrap();- assert!(other.set_image_guidance(&request, 3.0).unwrap_err().contains("different runtime"));+ assert!(other.set_image_guidance(&request, 3.0, "watermark").unwrap_err().contains("different runtime"));}#[test]diff --git a/src-tauri/core/src/slopfab/h3.rs b/src-tauri/core/src/slopfab/h3.rsindex 98104c4..f89dbcf 100644--- a/src-tauri/core/src/slopfab/h3.rs+++ b/src-tauri/core/src/slopfab/h3.rs@@ -74,7 +74,7 @@ pub(super) fn configure_request(// Sampling presets replace overrides, so apply the audio setting afterward.api.set_audio_steps(handle, request.audio_steps.unwrap_or(0))?;if let Some(cfg) = &crate::models::generator_features(&configuration.model_type).cfg {- api.set_image_guidance(handle, request.guidance_scale.unwrap_or(cfg.default))?;+ api.set_image_guidance(handle, request.guidance_scale.unwrap_or(cfg.default), request.negative_prompt.as_deref().unwrap_or(""))?;}api.set_seed(handle, generation_seed(request.seed)?)?;if let Some(edit) = &request.image_edit {diff --git a/src-tauri/core/src/slopfab/tests.rs b/src-tauri/core/src/slopfab/tests.rsindex d7e6095..e1a541d 100644--- a/src-tauri/core/src/slopfab/tests.rs+++ b/src-tauri/core/src/slopfab/tests.rs@@ -1662,3 +1662,23 @@ fn fibo_validates_image_inputs_and_rejects_unsupported_h3_controls() {request.image_edit.as_mut().unwrap().edits[0].invert_mask = true;assert!(configuration.validate_inputs(&request).unwrap_err().contains("outpainting"));}++#[test]+fn negative_prompts_reach_moss_and_are_rejected_for_other_models() {+ let mut configuration = Configuration::from_settings(&BTreeMap::new());+ configuration.model_type = "moss".into();+ configuration.attention = "flash2";+ let request = GenerationRequest { still_image: true, frames: 1, steps: 4, prompt: "A red apple".into(),+ negative_prompt: Some("watermark, blurry details".into()), canvas_width: 512, canvas_height: 512, ..Default::default() };+ let api = ffi::Api::load(&configuration.dll_path).unwrap();+ for purpose in [RequestPurpose::Plan, RequestPurpose::Generate] {+ let handle = RequestHandle::new(&api).unwrap();+ configure_request(&api, &handle, &request, &configuration, ComputePlatform::Cuda13, purpose, &ReferenceVideos::default()).unwrap();+ api.resolve(&handle).unwrap();+ assert!(api.set_image_guidance(&handle, 3.0, "invalid\0prompt").unwrap_err().contains("null characters"));+ }+ for model in ["fibo2", "minimax-h3"] {+ configuration.model_type = model.into();+ assert!(configuration.validate_inputs(&request).unwrap_err().contains("does not support negative prompts"));+ }+}diff --git a/src-tauri/core/src/slopfab/types.rs b/src-tauri/core/src/slopfab/types.rsindex d5765e5..7fe874e 100644--- a/src-tauri/core/src/slopfab/types.rs+++ b/src-tauri/core/src/slopfab/types.rs@@ -54,6 +54,8 @@ pub struct LatentBridgeRequest {#[derive(Debug, Clone, Default, Deserialize, Serialize)]#[serde(rename_all = "camelCase")]pub struct GenerationRequest {+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub negative_prompt: Option<String>,#[serde(default, skip_serializing_if = "Option::is_none")]pub guidance_scale: Option<f32>,#[serde(default, skip_serializing_if = "Option::is_none")]diff --git a/src-tauri/core/src/worker/protocol.rs b/src-tauri/core/src/worker/protocol.rsindex 295a879..af4d22e 100644--- a/src-tauri/core/src/worker/protocol.rs+++ b/src-tauri/core/src/worker/protocol.rs@@ -9,6 +9,7 @@ use std::collections::BTreeMap;pub const SERVICE_TYPE: &str = "_slopus-worker._tcp.local.";/// Bumped on any incompatible change to the routes or bodies below.+// v15 carries image negative prompts; older workers would silently discard them.// v14 adds Fibo model routing, validation and image-only weights.// v13 carries compound lasso masks; older workers would discard holes and splits.// v12 carries lasso image masks; older workers would silently edit the box.@@ -20,7 +21,7 @@ pub const SERVICE_TYPE: &str = "_slopus-worker._tcp.local.";// v6 added custom upscale weights.// v5 added overlap locking.// v4 added SeedVR2 export streams. v3 added inverted image masks.-pub const PROTOCOL_VERSION: u32 = 14;+pub const PROTOCOL_VERSION: u32 = 15;/// Streaming SeedVR2 restoration; model paths are resolved on the worker.#[derive(Debug, Clone, Serialize, Deserialize)]@@ -319,12 +320,13 @@ mod tests {#[test]fn generation_effects_roundtrip_without_machine_specific_paths() {let effects = serde_json::from_str(include_str!("../../../../fixtures/generation-effects.json")).unwrap();- let mut request = GenerationRequest { generation_effects: Some(effects), guidance_scale: Some(4.5), ..Default::default() };+ let mut request = GenerationRequest { negative_prompt: Some("watermark".into()), generation_effects: Some(effects), guidance_scale: Some(4.5), ..Default::default() };let mut settings = settings(&[]);visit_paths(&mut request, &mut settings, |_, _| panic!("Effects must not transfer calibration files")).unwrap();let restored: GenerationRequest = serde_json::from_slice(&serde_json::to_vec(&request).unwrap()).unwrap();assert_eq!(restored.generation_effects, request.generation_effects);assert_eq!(restored.guidance_scale, Some(4.5));+ assert_eq!(restored.negative_prompt.as_deref(), Some("watermark"));}#[test]diff --git a/src-tauri/src/project/commands/images.rs b/src-tauri/src/project/commands/images.rsindex f1ec319..ee86370 100644--- a/src-tauri/src/project/commands/images.rs+++ b/src-tauri/src/project/commands/images.rs@@ -25,6 +25,7 @@ pub(super) fn new_scene(prompt: &str) -> ImageScene {ImageScene {generation_effects: None,cfg_scales: None,+ negative_prompts: None,root_type: None,source_image: None,output_size: None,@@ -156,6 +157,7 @@ pub(super) fn apply(scene = ImageScene {generation_effects: scene.generation_effects,cfg_scales: scene.cfg_scales,+ negative_prompts: scene.negative_prompts,root_type: scene.root_type,source_image: scene.source_image,output_size: scene.output_size,diff --git a/src-tauri/src/project/image.rs b/src-tauri/src/project/image.rsindex 3f1526e..16be8c5 100644--- a/src-tauri/src/project/image.rs+++ b/src-tauri/src/project/image.rs@@ -65,6 +65,8 @@ impl ImageTemplateSnapshot {#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]#[serde(rename_all = "camelCase", deny_unknown_fields)]pub struct ImageScene {+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub negative_prompts: Option<std::collections::BTreeMap<String, String>>,#[serde(default, skip_serializing_if = "Option::is_none")]pub cfg_scales: Option<std::collections::BTreeMap<String, f64>>,#[serde(default, skip_serializing_if = "Option::is_none")]diff --git a/src-tauri/src/tests/images.rs b/src-tauri/src/tests/images.rsindex 4796289..46f9725 100644--- a/src-tauri/src/tests/images.rs+++ b/src-tauri/src/tests/images.rs@@ -82,6 +82,7 @@ fn image_root_survives_save_and_agent_hierarchy_replacement() {let mut config = image_fixture();let scene = config.image_scene.as_mut().unwrap();scene.style.mode = "none".into();+ scene.negative_prompts = Some(std::collections::BTreeMap::from([("moss".into(), "watermark".into())]));scene.cfg_scales = Some(std::collections::BTreeMap::from([("moss".into(), 4.5), ("future-model".into(), 2.0)]));scene.generation_effects = Some(serde_json::from_str(include_str!("../../../fixtures/generation-effects.json")).unwrap());scene.root_type = Some("image".into());@@ -92,7 +93,7 @@ fn image_root_survives_save_and_agent_hierarchy_replacement() {let reopened = read_project(Path::new(&created.folder_path)).unwrap();assert_eq!(reopened.config.image_scene, config.image_scene);let mut command = serde_json::to_value(config.image_scene.as_ref().unwrap()).unwrap();- for field in ["rootType", "sourceImage", "outputAssetId", "outputSize", "generationEffects", "cfgScales"] { command.as_object_mut().unwrap().remove(field); }+ for field in ["rootType", "sourceImage", "outputAssetId", "outputSize", "generationEffects", "cfgScales", "negativePrompts"] { command.as_object_mut().unwrap().remove(field); }command["op"] = serde_json::json!("image.set");let parsed: ProjectCommand = serde_json::from_value(command).unwrap();let changed = execute_commands_at(&config, &[parsed], &config.updated_at).unwrap();diff --git a/src/components/workspace/ImageEditor.test.tsx b/src/components/workspace/ImageEditor.test.tsxindex 48f4f23..2472b8e 100644--- a/src/components/workspace/ImageEditor.test.tsx+++ b/src/components/workspace/ImageEditor.test.tsx@@ -1325,3 +1325,22 @@ it("gates composition creation by model across menus, shortcuts and model switch}expect(current().imageScene!.nodes).toEqual(before);});++it("shows model-specific negative prompts, preserves them across model switches and explains Fibo", () => {+ const h3 = createGeneratorTemplate("H3"), moss = createGeneratorTemplate("MOSS", "moss"), fibo = createGeneratorTemplate("Fibo", "fibo2");+ saveGeneratorTemplateSettings({ templates: [h3, moss, fibo], defaultTemplateId: h3.id, catalogVersion: 14 });+ const latest = setup();+ expect(screen.queryByRole("textbox", { name: "Negative prompt" })).not.toBeInTheDocument();+ choose("Generator", "MOSS");+ const field = screen.getByRole("textbox", { name: "Negative prompt" });+ expect(field).toBeEnabled();+ fireEvent.change(field, { target: { value: "Watermarks, blurry details" } });+ expect(parseProjectConfig(JSON.parse(JSON.stringify(latest()))).imageScene?.negativePrompts?.moss).toBe("Watermarks, blurry details");+ expect(screen.getByRole("textbox", { name: "Negative prompt" }).compareDocumentPosition(screen.getByText("Image generation")) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();+ choose("Generator", "Fibo");+ expect(screen.getByRole("textbox", { name: "Negative prompt" })).toBeDisabled();+ expect(screen.getByText("Negative prompt")).toHaveAttribute("data-tooltip", expect.stringContaining("does not support negative prompts"));+ choose("Generator", "MOSS");+ expect(screen.getByRole("textbox", { name: "Negative prompt" })).toHaveValue("Watermarks, blurry details");+ expect(screen.queryByText("Background (environment)")).not.toBeInTheDocument();+});diff --git a/src/components/workspace/ImageEditor.tsx b/src/components/workspace/ImageEditor.tsxindex 657826a..610cd44 100644--- a/src/components/workspace/ImageEditor.tsx+++ b/src/components/workspace/ImageEditor.tsx@@ -820,6 +820,13 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene<div className="image-inspector__area"><span id={rootField("prompt-label")} tabIndex={selected.kind === "root" && imageRoot ? 0 : undefined} data-tooltip={selected.kind === "root" && imageRoot ? "Applies to the whole image before the individual edits." : undefined}>{promptLabel}</span><PromptTextField key={selected.id} aria-labelledby={rootField("prompt-label")} value={selected.description} references={promptReferences} missingLabel={missingReference} onChange={(description) => patchNode({ description })} /></div>{selected.kind === "text" && <PropRow label="Text to render" htmlFor={rootField("text")}><input id={rootField("text")} className="text-field" value={selected.text} onChange={(event) => patchNode({ text: event.target.value })} /></PropRow>}{selected.kind === "root" && <>+ {(model.negativePrompt || model.negativePromptDisabledReason) && <div className="image-inspector__area">+ <label htmlFor={rootField("negative-prompt")} tabIndex={0} data-tooltip={model.negativePromptDisabledReason ?? "Describe what to avoid. MOSS uses this with CFG; CFG 1 uses only the positive prompt."}>Negative prompt</label>+ <textarea id={rootField("negative-prompt")} className="text-field" rows={3} disabled={!model.negativePrompt}+ placeholder={model.negativePromptDisabledReason ? "Not supported by Fibo 2.0 Turbo" : undefined}+ value={scene.negativePrompts?.[template?.modelType ?? ""] ?? ""}+ onChange={(event) => { if (template) commit({ ...scene, negativePrompts: { ...scene.negativePrompts, [template.modelType]: event.target.value } }); }} />+ </div>}<PropSection title="Image generation" persistKey="image.generation" summary={`${generationStepsForTemplate(scene.steps, template)} steps`}><PropRow label="Steps" htmlFor={rootField("steps")}><input id={rootField("steps")} className="text-field" type="number" min="2" max="1000" value={scene.steps} onChange={(event) => { const value = Number(event.target.value); if (Number.isInteger(value) && value >= 2 && value <= 1000) commit({ ...scene, steps: value }); }} /></PropRow>{model.cfg && template && <PropRow label="CFG" htmlFor={rootField("cfg")} tooltip="Classifier-free guidance. 1 uses only the positive prompt; higher values strengthen guidance." value={scene.cfgScales?.[template.modelType] ?? model.cfg.default} defaultValue={model.cfg.default} onReset={active ? undefined : () => commit({ ...scene, cfgScales: { ...scene.cfgScales, [template.modelType]: model.cfg!.default } })}>diff --git a/src/lib/generatorModels.json b/src/lib/generatorModels.jsonindex 0fee9f5..6174d6d 100644--- a/src/lib/generatorModels.json+++ b/src/lib/generatorModels.json@@ -18,7 +18,9 @@"refmods": true,"sigmaShifts": true,"cudaOnly": false,- "imageCompositionCreation": false+ "imageCompositionCreation": false,+ "negativePrompt": false,+ "negativePromptDisabledReason": null},"moss": {"label": "MOSS Image",@@ -41,7 +43,9 @@"refmods": false,"sigmaShifts": true,"cudaOnly": true,- "imageCompositionCreation": true+ "imageCompositionCreation": true,+ "negativePrompt": true,+ "negativePromptDisabledReason": null},"fibo2": {"label": "Fibo 2.0",@@ -62,6 +66,8 @@"refmods": false,"sigmaShifts": false,"cudaOnly": true,- "imageCompositionCreation": true+ "imageCompositionCreation": true,+ "negativePrompt": false,+ "negativePromptDisabledReason": "Fibo 2.0 Turbo uses only the positive prompt. Slopfab does not support negative prompts for this model."}}diff --git a/src/lib/imageScene.ts b/src/lib/imageScene.tsindex f4fc1d8..2be19e1 100644--- a/src/lib/imageScene.ts+++ b/src/lib/imageScene.ts@@ -26,6 +26,7 @@ export const imageSourceSchema = z.object({export type ImageSource = z.infer<typeof imageSourceSchema>;export const imageSceneSchema = z.object({generationEffects: generationEffectsSchema.optional(),+ negativePrompts: z.record(z.string().min(1), z.string()).optional(),cfgScales: z.record(z.string().min(1), z.number().finite().min(0).max(3.4028234663852886e38)).optional(),rootType: z.enum(["prompt", "image"]).optional(),sourceImage: imageSourceSchema.nullish(),@@ -70,6 +71,7 @@ export function createImageScene(prompt = ""): ImageScene {}export function createImageEditScene(sourceImage: ImageSource | null, previous?: ImageScene): ImageScene {return { ...createImageScene(), rootType: "image", sourceImage,+ ...(previous?.negativePrompts ? { negativePrompts: { ...previous.negativePrompts } } : {}),...(previous?.cfgScales ? { cfgScales: { ...previous.cfgScales } } : {}),...(previous?.generationEffects ? { generationEffects: structuredClone(previous.generationEffects) } : {}),steps: previous?.steps ?? 20, seed: previous?.seed ?? -1, referenceIds: previous?.referenceIds ?? [] };diff --git a/src/lib/runtime.ts b/src/lib/runtime.tsindex 74f2b7a..ba6c43e 100644--- a/src/lib/runtime.ts+++ b/src/lib/runtime.ts@@ -106,6 +106,7 @@ export interface SlopfabGenerationRequest {steps: number;audioSteps?: number;guidanceScale?: number;+ negativePrompt?: string;generationEffects?: import("./generationEffects").GenerationEffects;videoSigmaShift?: number;audioSigmaShift?: number;diff --git a/src/lib/workQueue.test.ts b/src/lib/workQueue.test.tsindex aabf46b..9749ee8 100644--- a/src/lib/workQueue.test.ts+++ b/src/lib/workQueue.test.ts@@ -480,7 +480,7 @@ describe("image generation work", () => {it("captures the selected model CFG for generation and image history", async () => {const { queue } = setup();const session = queue.project(imageProject());- session.update((current) => ({ ...current, imageScene: { ...current.imageScene!, cfgScales: { moss: 4.5, "minimax-h3": 9 } } }));+ session.update((current) => ({ ...current, imageScene: { ...current.imageScene!, cfgScales: { moss: 4.5, "minimax-h3": 9 }, negativePrompts: { moss: "blurry, watermark", "minimax-h3": "ignored" } } }));const moss = { ...mossImageTemplate(), sources: {}, paths: { transformer: "moss", textEncoder: "qwen", videoVae: "flux", tokenizer: "tokenizer.json", audioVae: "" } };vi.mocked(invoke).mockResolvedValue({ relativePath: "media/generated/moss.jpg", width: 768, height: 768 });queue.enqueueImage(session, moss);@@ -488,12 +488,15 @@ describe("image generation work", () => {await waitFor(() => expect(enqueueSlopfabGeneration).toHaveBeenCalledOnce());const request = vi.mocked(enqueueSlopfabGeneration).mock.calls[0][0];expect(request.guidanceScale).toBe(4.5);+ expect(request.negativePrompt).toBe("blurry, watermark");await finish(queue, request.jobId);const result = session.getSnapshot().config.assets.find((asset) => asset.relativePath === "media/generated/moss.jpg");expect(result?.imageGeneration?.scene.cfgScales?.moss).toBe(4.5);+ expect(result?.imageGeneration?.scene.negativePrompts?.moss).toBe("blurry, watermark");queue.enqueueImage(session, template);await waitFor(() => expect(enqueueSlopfabGeneration).toHaveBeenCalledTimes(2));expect(vi.mocked(enqueueSlopfabGeneration).mock.calls[1][0].guidanceScale).toBeUndefined();+ expect(vi.mocked(enqueueSlopfabGeneration).mock.calls[1][0].negativePrompt).toBeUndefined();});it("captures image effects, shows calibration progress and refuses active effects on MOSS", async () => {const { queue } = setup();diff --git a/src/lib/workQueue.ts b/src/lib/workQueue.tsindex e61f52a..fd8a69c 100644--- a/src/lib/workQueue.ts+++ b/src/lib/workQueue.ts@@ -284,6 +284,7 @@ export class WorkQueue {const { prompt, references } = edit ? edit.edits[0] : compileImagePrompt(current, { modelType: template.modelType });const { width, height } = edit ? imageEditOutputSize(scene) : outputDimensions(imageSettings(current).resolution, imageSettings(current).aspectRatio);const id = `image-${crypto.randomUUID()}`;+ const negativePrompt = generatorModel(template.modelType).negativePrompt ? scene.negativePrompts?.[template.modelType] : undefined;const guidanceScale = imageCfgScale(template.modelType, scene.cfgScales);// Publish and select the job's own entry before generation starts. The// finished source stays untouched, and an existing empty draft is reused.@@ -314,7 +315,7 @@ export class WorkQueue {slopfab: engineProviderSetting(template.paths, current.providerSettings.slopfab, template.attention, template.loras, "prompt", template.additionalSafetensors, false, template.sources, template) } });let finish!: () => void;const done = new Promise<void>((resolve) => { finish = resolve; });- const request: SlopfabGenerationRequest = { ...(guidanceScale !== undefined ? { guidanceScale } : {}), generationEffects: activeGenerationEffects(scene.generationEffects), jobId: entry.id, stillImage: true, frames: 1, prompt: edit ? edit.edits[0].prompt : prompt,+ const request: SlopfabGenerationRequest = { ...(negativePrompt ? { negativePrompt } : {}), ...(guidanceScale !== undefined ? { guidanceScale } : {}), generationEffects: activeGenerationEffects(scene.generationEffects), jobId: entry.id, stillImage: true, frames: 1, prompt: edit ? edit.edits[0].prompt : prompt,...(edit ? { imageEdit: { sourceRelativePath: edit.source.relativePath, edits: edit.edits.map(({ references, ...step }) => ({...step, referencePaths: referencePaths(references), refmods: referenceRefmodInputs(session.record.folderPath, references),})) } } : {}),