Skip to content

v1.4.25: Actionable generation errors and per-image generation time#384

Merged
Mooshieblob1 merged 2 commits into
mainfrom
release/v1.4.25
Jun 22, 2026
Merged

v1.4.25: Actionable generation errors and per-image generation time#384
Mooshieblob1 merged 2 commits into
mainfrom
release/v1.4.25

Conversation

@Mooshieblob1

Copy link
Copy Markdown
Owner

What's New in v1.4.25

Clearer error messages

  • Generation failures are now classified into specific, actionable causes instead of a generic "Generation failed". Covered: out-of-memory, incompatible VAE, checkpoint/model not in list, missing custom node, component/shape mismatch.
  • Desktop-mode errors no longer go blank: the raw ComfyUI execution_error payload has no top-level message field, so the classifier reads exception_message / exception_type / node_type / traceback instead.
  • Actionable error toasts dwell longer (8s) before dismissing.

Generation time

  • Total generation time now shows in the top-left corner of the result preview.
  • Hovering a session-gallery thumbnail shows that image's generation time in the top-left corner.

Implementation notes

  • New centralized classifier src/lib/utils/generationErrors.ts (pure, testable) used by both the execution_error listener in App.svelte and the catch path in GenerateButton.svelte.
  • Per-prompt timing captured on QueuedPrompt (startedAt set in setActivePrompt, durationMs computed in completePrompt), threaded through finalizeOutputImages onto each OutputImage.generationTimeMs.
  • New formatGenerationTime helper in localeFormat.ts ("12.3s" / "1m 05s").
  • Added generation.gen_time_label plus 6 error keys; verified key + placeholder parity across all 11 locales (2057 keys each).

Validation

  • npm run build: pass
  • cargo check: pass (compiles as v1.4.25)
  • i18n parity: 11/11 locales

Bot triage (steps 1-2)

- Classify generation failures into specific, fixable causes (OOM,
  incompatible VAE, model not in list, missing node, component mismatch)
  via a centralized classifier; read desktop ComfyUI exception fields so
  errors no longer surface blank
- Longer toast dwell for actionable error messages
- Show total generation time in the result preview top-left corner
- Show per-image generation time on hover in the session gallery
- Add generation.gen_time_label and 6 error keys across all 11 locales

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

Copy link
Copy Markdown

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 MooshieUI to version 1.4.25, introducing structured generation error classification with actionable feedback and adding a per-image generation-time readout. Key changes include a new error classification utility, localization updates across multiple languages, and state tracking for generation duration. The code review feedback suggests improving TypeScript type safety by passing undefined instead of false to gallery.showToast, utilizing Svelte 5's deep reactivity to directly mutate $state arrays instead of shallow-copying, and making the model filename extraction regex more robust for internationalization and special characters.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/App.svelte
} catch { /* ignore parse errors */ }
}
gallery.showToast(toastMsg, "error");
gallery.showToast(toastMsg, "error", classified.durationMs ? { durationMs: classified.durationMs } : false);

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

Passing false as the third argument to gallery.showToast violates TypeScript type safety, as the options parameter expects a ToastOptions object or undefined. It should be changed to undefined to ensure type safety and avoid potential compilation or runtime issues.

        gallery.showToast(toastMsg, "error", classified.durationMs ? { durationMs: classified.durationMs } : undefined);

Comment on lines +309 to +311
const next = [...this.pendingPrompts];
next[idx] = { ...next[idx], startedAt: now };
this.pendingPrompts = next;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

In Svelte 5, $state arrays are deeply reactive by default. Instead of shallow-copying the array and the object to trigger reactivity, you can directly mutate the property of the object in the array. This is more idiomatic, cleaner, and avoids unnecessary object allocations.

Suggested change
const next = [...this.pendingPrompts];
next[idx] = { ...next[idx], startedAt: now };
this.pendingPrompts = next;
this.pendingPrompts[idx].startedAt = now;

Comment thread src/lib/utils/generationErrors.ts Outdated
const m = raw.match(/(\w+):\s*'([^']+)'\s+not in/i);
if (m) return m[2];
// Also handle the node_errors JSON `details` form without quotes.
const m2 = raw.match(/(?:ckpt_name|vae_name|lora_name|control_net_name|unet_name|clip_name|model_name|upscale_model)[^A-Za-z0-9]+([\w.\- ]+\.(?:safetensors|ckpt|pt|pth|bin|gguf))/i);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The regex character class [\w.\- ] does not match non-ASCII characters (such as Chinese, Japanese, or Cyrillic characters) or special characters like parentheses () and brackets [], which are very common in AI model filenames (e.g., downloaded from Civitai). Changing the character class to exclude quotes, newlines, and commas/semicolons ([^'"\r\n,;]+?) makes the filename extraction much more robust and internationalization-friendly.

Suggested change
const m2 = raw.match(/(?:ckpt_name|vae_name|lora_name|control_net_name|unet_name|clip_name|model_name|upscale_model)[^A-Za-z0-9]+([\w.\- ]+\.(?:safetensors|ckpt|pt|pth|bin|gguf))/i);
const m2 = raw.match(/(?:ckpt_name|vae_name|lora_name|control_net_name|unet_name|clip_name|model_name|upscale_model)[^A-Za-z0-9]+([^'\"\\r\\n,;]+?\\.(?:safetensors|ckpt|pt|pth|bin|gguf))/i);

@Mooshieblob1

Copy link
Copy Markdown
Owner Author

Triage of the review feedback:

  • generationErrors.ts model-name regex: fixed. Broadened the character class so model filenames with parentheses, brackets, or non-Latin characters (common on Civitai downloads) are captured instead of truncated.
  • App.svelte showToast(..., false): keeping as-is. The signature is options: boolean | ToastOptions = false, so a boolean is type-valid and false is the documented default (no special toast options). It is not a type-safety issue.
  • progress.svelte.ts startedAt assignment: keeping the array reassignment with spread. That matches the project convention for $state arrays, and there is no behavioral difference from in-place mutation here.

@Mooshieblob1 Mooshieblob1 merged commit eccd5b9 into main Jun 22, 2026
3 checks passed
@Mooshieblob1 Mooshieblob1 deleted the release/v1.4.25 branch June 22, 2026 19:54
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