Skip to content

Add seed, negative prompt and sampling controls for local SDXL images - #443

Open
smshagor-dev wants to merge 12 commits into
mainfrom
feature/image-generation-controls-20261020
Open

smshagor-dev wants to merge 12 commits into
mainfrom
feature/image-generation-controls-20261020

Conversation

@smshagor-dev

Copy link
Copy Markdown
Owner

Image generation currently uses fixed hardware-based sampling steps and gives people no way to specify a seed or negative prompt.

This change adds an Image settings disclosure to the chat composer for image requests. It accepts an optional integer seed, 1–50 sampling steps, and a negative prompt. The selected values are passed through the regular chat or Work chat view, the frontend API wrapper, the Tauri command and the pinned stable-diffusion.cpp CLI (--seed, --steps, --negative-prompt). The same currently selected options are used when retrying an image, including CPU retry.

Leaving seed and steps empty preserves the existing renderer defaults. Backend validation rejects invalid seed/step values and overly long negative prompts before creating an image artifact. The UI limits its fields and uses the existing theme variables in light and dark modes. The SDXL smoke example remains on defaults.

Rust tests cover defaults and invalid settings. Resolution, aspect ratio and saved per-artifact settings are still separate follow-up work; an existing image's Retry action currently uses the user's current image settings, not a snapshot of its original parameters. Real SDXL hardware inference also remains unverified. Part of #319. Merge only after platform and frontend checks are green.

Copy link
Copy Markdown
Owner Author

The three Rust checks stopped at the same formatting difference in src-tauri/src/diffusion_runtime.rs. The new seed-validation expression needed to be split across lines to match rustfmt. I pushed that correction in 174c9e2. Frontend and Windows application build passed in the previous run. Fresh CI checks are queued, so I’m keeping this PR open until they pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant