The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(create): C71/C78 follow-ups from the full test run
purplef5384e0d2dc1
diff --git a/src-tauri/src/commands/mlx.rs b/src-tauri/src/commands/mlx.rsindex 726b8017..187b56da 100644--- a/src-tauri/src/commands/mlx.rs+++ b/src-tauri/src/commands/mlx.rs@@ -2409,6 +2409,12 @@ fn parse_sidecar_progress(answer: &str) -> Option<SidecarProgress> {serde_json::from_str(body).ok()}+/// The last answer of the sidecar, `since` later with no new one: nothing+/// has moved in between.+fn still_quiet(p: &SidecarProgress, since: std::time::Duration) -> SidecarProgress {+ SidecarProgress { quiet_seconds: p.quiet_seconds + since.as_secs_f64(), ..p.clone() }+}+/// "1 minute", "20 minutes", "90 seconds".fn human_span(d: std::time::Duration) -> String {let s = d.as_secs();@@ -2661,9 +2667,19 @@ pub async fn mlx_generate(_state: &AppState, args: &Value) -> CmdResult {let started = std::time::Instant::now();let model = entry.name;let watch = async move {+ // The last answer and when it came: a sidecar that stops answering+ // (frozen, swapping) is as quiet as one that answers "no new step".+ let mut last: Option<(SidecarProgress, std::time::Instant)> = None;loop {tokio::time::sleep(SIDECAR_WATCH_EVERY).await;- let progress = tokio::task::spawn_blocking(sidecar_progress).await.ok().flatten();+ let answer = tokio::task::spawn_blocking(sidecar_progress).await.ok().flatten();+ let progress = match answer {+ Some(p) => {+ last = Some((p.clone(), std::time::Instant::now()));+ Some(p)+ }+ None => last.as_ref().map(|(p, at)| still_quiet(p, at.elapsed())),+ };if let Some(why) = sidecar_stall_verdict(model, progress.as_ref(), started.elapsed(), limit) {break why;}@@ -3573,6 +3589,16 @@ mod tests {assert_eq!(sidecar_stall_verdict("X", Some(&p("idle", 0, 99_999.0)), long, limit), None);}+ #[test]+ fn a_sidecar_that_stops_answering_is_quiet_from_its_last_answer() {+ use std::time::Duration;+ let at_step = SidecarProgress { phase: "steps".into(), step: 7, steps: 40, step_hook: true, quiet_seconds: 3.0 };+ let later = still_quiet(&at_step, Duration::from_secs(60));+ assert_eq!((later.step, later.quiet_seconds), (7, 63.0));+ let why = sidecar_stall_verdict("SD Turbo", Some(&later), Duration::from_secs(90), sidecar_stall_limit(Some(60))).expect("a minute of silence");+ assert!(why.starts_with("SD Turbo timed out at step 7 of 40: no new step for 1 minute."), "{why}");+ }+#[test]fn the_stall_limit_stays_in_the_range_settings_allows() {use std::time::Duration;diff --git a/src-tauri/src/commands/real_run_mac.rs b/src-tauri/src/commands/real_run_mac.rsindex 2f7f7ce0..ac43f88a 100644--- a/src-tauri/src/commands/real_run_mac.rs+++ b/src-tauri/src/commands/real_run_mac.rs@@ -35,7 +35,7 @@//!//! The steps are steered by variables so that one binary serves every run://! `LU_REAL_MODEL`, `LU_REAL_PROMPT`, `LU_REAL_NEGATIVE`, `LU_REAL_LORAS` (`name:strength|...`), `LU_REAL_STEPS`,-//! `LU_REAL_GUIDANCE`, `LU_REAL_SEED`, `LU_REAL_WIDTH`, `LU_REAL_HEIGHT`,+//! `LU_REAL_GUIDANCE`, `LU_REAL_SEED`, `LU_REAL_WIDTH`, `LU_REAL_HEIGHT`, `LU_REAL_STALL_SECS`,//! `LU_REAL_IMAGES` (paths, separated by `|`), `LU_REAL_MOTION` (the motion//! video of a Motion Control run), `LU_REAL_RESOLUTION` (the side//! an edit scales its images to), `LU_REAL_SECONDS`, `LU_REAL_AUDIO` (the voice@@ -707,6 +707,10 @@ fn image() {if let Some(negative) = var("LU_REAL_NEGATIVE") {args["negative_prompt"] = json!(negative);}+ // `LU_REAL_STALL_SECS`: Settings' Image timeout for a sidecar model (C71).+ if let Some(stall) = number::<u64>("LU_REAL_STALL_SECS") {+ args["stall_timeout_secs"] = json!(stall);+ }// `LU_REAL_LORAS`: names in LU's LoRA folder, each with its strength// after a colon, separated by `|`, as the stack of Create sends them.if let Some(stack) = var("LU_REAL_LORAS") {diff --git a/src/api/dynamic-workflow.ts b/src/api/dynamic-workflow.tsindex b3ec5801..bec5750b 100644--- a/src/api/dynamic-workflow.ts+++ b/src/api/dynamic-workflow.ts@@ -124,9 +124,9 @@ interface StrategyResult {export const LTX25_NEEDS_UPDATE = 'LTX 2.5 needs ComfyUI 0.32.0 or newer. Update ComfyUI in Settings.'/** C78: what Create says for MiniMax H3 Image, a still model on the H3- * layout that LU has no graph for yet. */+ * layout that LU has no graph of its own for. */export const MINIMAX_H3_IMAGE_NO_BUILDER =- 'MiniMax H3 Image has no workflow built into LU yet. Save the ComfyUI template "MiniMax-H3-Image: Text to Image", '+ 'LU has no built-in workflow for MiniMax H3 Image. Save the ComfyUI template "MiniMax-H3-Image: Text to Image", '+ 'import it under Workflows and assign it to this model. Create then runs it with your prompt, size and LoRAs.'/** A step distillation LoRA names its step count (minimax_h3_fl2v_turbo_8step_...). */const H3_STEP_LORA = /turbo\D*?(\d+)\s*_?steps?/i@@ -139,7 +139,7 @@ export function determineStrategy(nodes: CategorizedNodes,models: AvailableModels,): StrategyResult {- // C78: MiniMax H3 Image has no graph of LU's own yet. Its workflow is the+ // C78: MiniMax H3 Image has no graph of LU's own. Its workflow is the// official template; imported under Workflows and assigned to the model,// Create runs it with the prompt, size and LoRAs (workflows.ts).if (modelType === 'minimaxh3image') {diff --git a/src/components/settings/SettingsPage.tsx b/src/components/settings/SettingsPage.tsxindex 6e0deddf..d313965b 100644--- a/src/components/settings/SettingsPage.tsx+++ b/src/components/settings/SettingsPage.tsx@@ -1826,7 +1826,8 @@ export function SettingsPage() {comfyui: !isMlxImageHost(),agentMode: FEATURE_FLAGS.AGENT_MODE,agentWorkflows: FEATURE_FLAGS.AGENT_WORKFLOWS,- mediaTimeouts: settings.appMode !== 'cloud' && !isMlxImageHost(),+ // C71: the Mac's image engine goes by the Image timeout too.+ mediaTimeouts: settings.appMode !== 'cloud',chatTimeout: settings.appMode !== 'cloud',}diff --git a/src/lib/param-hints.ts b/src/lib/param-hints.tsindex 9cf8257a..14a076b0 100644--- a/src/lib/param-hints.ts+++ b/src/lib/param-hints.ts@@ -11,7 +11,7 @@ import type { ModelType } from '../api/comfyui'* so the rule needs no import of the ComfyUI module. SD 1.5 and SDXL (7) are* made for a high CFG and are not in it. */export const LOW_CFG_FAMILIES: Partial<Record<ModelType, number>> = {- flux: 1, flux2: 1, krea2: 1, qwenimage: 1, hidream: 1, ernie_image: 1,+ flux: 1, flux2: 1, krea2: 1, qwenimage: 1, hidream: 1, ernie_image: 1, minimaxh3image: 1,zimage: 3.5, chroma: 3.5, qwenimage1: 4, sd3: 4, lumina2: 4,}