Skip to content

v1.1.0: Refine button fix, model selection consistency, terminal log panel#134

Merged
Mooshieblob1 merged 1 commit intomainfrom
release/v1.1.0
May 2, 2026
Merged

v1.1.0: Refine button fix, model selection consistency, terminal log panel#134
Mooshieblob1 merged 1 commit intomainfrom
release/v1.1.0

Conversation

@Mooshieblob1
Copy link
Copy Markdown
Owner

What's New in v1.1.0

Refine Button (SwarmUI-style)

  • One-click image refinement — the Refine button now runs a SwarmUI-style second pass over the generated image without regenerating it from scratch. The output is uploaded to ComfyUI, fed directly into the upscale chain, and processed at low denoise — sharpening detail and adding texture while preserving the original composition.
  • No redundant sampling — new refine_only mode skips the main img2img KSampler/VAE round-trip; only the upscale chain (VAEEncodeTiled → optional TiledDiffusion / SoftGuidance → KSampler at upscale_denoise → VAEDecodeTiled) runs.
  • Reliable image sourcing — previously the button passed a blob/preview URL directly as LoadImage input, causing a value_not_in_list validation error ("a model or VAE may not be configured correctly"). It now fetches bytes from the displayed preview and uploads to ComfyUI's input/ folder before queuing.
  • Respects Refiner settings — scale, denoise, steps, tiling, SoftGuidance, and quality-only prompts all come from the Refiner panel.
  • ControlNet suppressed — re-conditioning a refine pass against the original control input is disabled automatically.

Model Selection Consistency Fix

  • Displayed model = loaded model — switching from a split-model (Anima Preview 3 etc.) to a regular checkpoint in the Checkpoint Gallery now clears useSplitModel, diffusionModel, clipModel, and clipType. Previously those fields stayed set, so the workflow loaded the old split model files while the UI showed the new checkpoint name.

Terminal Log Panel (Developer Mode)

  • Live log viewer in Settings → Developer Mode — streams Rust log lines via get_log_buffer + log:line events, with copy-to-clipboard. Gated behind developer mode (10 taps on version number).

i18n

  • Added preview.refine_failed key across all 11 supported locales. Error toast on Refine failure is now localized.

Copilot AI review requested due to automatic review settings May 2, 2026 02:07
@Mooshieblob1 Mooshieblob1 merged commit a26394e into main May 2, 2026
5 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the application to v1.1.0, introducing a "Refine" feature that performs a single-pass upscale/refinement by skipping the main sampling stage. It also fixes a bug where split-model settings persisted after switching checkpoints and resolves an issue where preview URLs were incorrectly passed to ComfyUI. Feedback focuses on optimizing image data handling by using Uint8Array instead of standard number arrays to improve performance and reduce memory overhead during Tauri IPC transfers.

params.mode = "img2img";

try {
let bytes: number[];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Declaring bytes as number[] and later converting the Uint8Array to a standard array is inefficient for image data. In Tauri, passing a Uint8Array to an invoke command allows for much faster binary transfer via the IPC bridge, avoiding the overhead of JSON-serializing a large array of integers. This is especially important for high-resolution images to prevent performance bottlenecks or memory issues.

      let bytes: Uint8Array;

const resp = await fetch(sourceUrl);
if (!resp.ok) throw new Error(`fetch failed: ${resp.status}`);
const buf = await resp.arrayBuffer();
bytes = Array.from(new Uint8Array(buf));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Avoid using Array.from on the Uint8Array. Keeping the data as a Uint8Array is significantly more memory-efficient and allows Tauri to handle the data as a binary buffer during the invoke call to uploadImageBytes. This prevents the browser from having to serialize a massive array of numbers into a JSON string, which can be extremely slow for large images.

        bytes = new Uint8Array(buf);

@Mooshieblob1 Mooshieblob1 deleted the release/v1.1.0 branch May 2, 2026 02:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps the app to v1.1.0 and adds a SwarmUI-style “Refine” flow that re-processes the latest output through the upscale chain (via a new refine_only workflow mode), plus a fix to keep split-model selection state consistent when switching checkpoints, and localized refine-failure messaging.

Changes:

  • Add refine_only generation param and backend img2img template support to skip the main img2img sampler and feed the loaded image directly into the upscale chain.
  • Update Preview “Refine” button flow to upload image bytes to ComfyUI before queuing, and add localized preview.refine_failed strings across locales.
  • Clear split-model fields when selecting a regular checkpoint from the checkpoint gallery; bump versions + update changelog/release notes.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/lib/types/index.ts Adds optional refine_only param to the frontend generation payload type.
src/lib/components/progress/PreviewImage.svelte Refine button now uploads bytes before queueing and forces refine_only; shows localized error toast on failure.
src/lib/components/generation/CheckpointGallery.svelte Clears split-model fields when selecting a checkpoint and reapplies presets.
src-tauri/src/comfyui/types.rs Adds refine_only to backend GenerationParams with a default.
src-tauri/src/templates/img2img.rs Implements refine-only early return to skip the main img2img sampler path.
src/lib/locales/en.ts Adds preview.refine_failed translation.
src/lib/locales/de.ts Adds preview.refine_failed translation.
src/lib/locales/es.ts Adds preview.refine_failed translation.
src/lib/locales/fr.ts Adds preview.refine_failed translation.
src/lib/locales/it.ts Adds preview.refine_failed translation.
src/lib/locales/ja.ts Adds preview.refine_failed translation.
src/lib/locales/ko.ts Adds preview.refine_failed translation.
src/lib/locales/pt.ts Adds preview.refine_failed translation.
src/lib/locales/ru.ts Adds preview.refine_failed translation.
src/lib/locales/zh.ts Adds preview.refine_failed translation.
src/lib/locales/zh-tw.ts Adds preview.refine_failed translation.
package.json Bumps version to 1.1.0.
src-tauri/Cargo.toml Bumps backend crate version to 1.1.0.
src-tauri/Cargo.lock Updates lockfile to reflect version bump.
src-tauri/tauri.conf.json Bumps Tauri app version to 1.1.0.
RELEASE_NOTES.md Adds v1.1.0 release notes.
CHANGELOG.md Adds v1.1.0 changelog section.

Comment on lines +127 to +144
if (savedImage?.gallery_filename) {
bytes = await loadGalleryImage(savedImage.gallery_filename);
uploadFilename = savedImage.filename || `refine_${Date.now()}.png`;
} else {
const sourceUrl = previewSrc ?? progress.lastOutputImage;
if (!sourceUrl) {
gallery.showToast(locale.t("preview.not_available"), "info");
return;
}
const resp = await fetch(sourceUrl);
if (!resp.ok) throw new Error(`fetch failed: ${resp.status}`);
const buf = await resp.arrayBuffer();
bytes = Array.from(new Uint8Array(buf));
uploadFilename = savedImage?.filename || `refine_${Date.now()}.png`;
}

const upload = await uploadImageBytes(bytes, uploadFilename);

} catch (e) {
console.error("Upscale failed:", e);
console.error("Refine failed:", e);
gallery.showToast(`${locale.t("preview.refine_failed")}: ${e}`, "error");
Comment on lines +81 to +86
// leave `useSplitModel = true` and the workflow would still load the
// old diffusion_model / clip_model / vae instead of `filename`.
generation.useSplitModel = false;
generation.diffusionModel = null;
generation.clipModel = null;
generation.clipType = null;
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.

2 participants