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
feat(create): honest CPU-mode warning instead of a silent 20-min timeout
purplee0f9f2d04a0f
diff --git a/src-tauri/src/commands/process.rs b/src-tauri/src/commands/process.rsindex b8cbf8ff..34ff4b49 100644--- a/src-tauri/src/commands/process.rs+++ b/src-tauri/src/commands/process.rs@@ -1045,6 +1045,9 @@ pub fn start_comfyui(state: State<'_, AppState>) -> Result<serde_json::Value, St// except on macOS where PyTorch uses MPS and never calls cuda APIs.let gpu_mode = ComfyGpuMode::parse(&state.comfy_gpu_mode.lock().unwrap());let needs_cpu_fallback = comfy_needs_cpu(&python, gpu_mode, Some(&state.comfy_gpu_cache));+ // shd_scorpion (RX 7900 XTX): remember what we actually launched with so+ // the Create tab can warn instead of letting a CPU gen time out silently.+ *state.comfy_started_cpu.lock().unwrap() = Some(needs_cpu_fallback);let mut comfy_args: Vec<&str> = vec!["main.py","--listen", "127.0.0.1",@@ -1300,6 +1303,18 @@ pub fn set_comfy_gpu_mode(mode: String, state: State<'_, AppState>) -> Result<seOk(serde_json::json!({ "mode": normalized }))}+/// shd_scorpion (Discord 2026-07-03, RX 7900 XTX): a forced-CPU ComfyUI showed+/// "Ready to generate" and then died with "timed out after 20 minutes" — no+/// hint it never used the GPU. Lets the Create tab render an honest warning.+/// `startedCpu` is None until LU itself has (re)started ComfyUI this session+/// (an externally started ComfyUI is the user's own device choice).+#[tauri::command]+pub fn get_comfy_gpu_status(state: State<'_, AppState>) -> Result<serde_json::Value, String> {+ let mode = state.comfy_gpu_mode.lock().unwrap().clone();+ let started_cpu = *state.comfy_started_cpu.lock().unwrap();+ Ok(serde_json::json!({ "mode": mode, "startedCpu": started_cpu }))+}+#[tauri::command]pub fn set_comfyui_path(path: String, state: State<'_, AppState>) -> Result<serde_json::Value, String> {// Resolve the path the user gave us to a directory that actually contains@@ -1606,6 +1621,8 @@ pub fn auto_start_comfyui(state: &AppState) {// "Found no NVIDIA driver" crash loop on non-NVIDIA systems.let auto_gpu_mode = ComfyGpuMode::parse(&state.comfy_gpu_mode.lock().unwrap());let auto_needs_cpu = comfy_needs_cpu(&python, auto_gpu_mode, Some(&state.comfy_gpu_cache));+ // Mirror of start_comfyui: expose the real launch mode to the UI.+ *state.comfy_started_cpu.lock().unwrap() = Some(auto_needs_cpu);let mut comfy_args: Vec<&str> = vec!["main.py","--listen", "127.0.0.1",diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rsindex defcf16a..ba0fe783 100644--- a/src-tauri/src/main.rs+++ b/src-tauri/src/main.rs@@ -104,6 +104,7 @@ fn main() {commands::process::detect_all_comfyui_installs,commands::process::set_comfyui_path,commands::process::set_comfy_gpu_mode,+ commands::process::get_comfy_gpu_status,commands::process::set_comfyui_port,commands::process::set_comfyui_host,commands::process::set_ollama_host,diff --git a/src-tauri/src/state.rs b/src-tauri/src/state.rsindex 16485d6e..506437ba 100644--- a/src-tauri/src/state.rs+++ b/src-tauri/src/state.rs@@ -240,6 +240,11 @@ pub struct AppState {/// (settings.comfyGpuMode): "auto" (probe), "cpu" (force --cpu), "gpu"/// (never --cpu). Pushed via set_comfy_gpu_mode on boot + change.pub comfy_gpu_mode: Mutex<String>,+ /// Whether the LAST ComfyUI start actually passed `--cpu` (shd_scorpion,+ /// RX 7900 XTX: gen "timed out after 20 minutes" with zero hint that it+ /// ran on the CPU). None = LU hasn't started ComfyUI this session.+ /// Surfaced to the Create tab via `get_comfy_gpu_status`.+ pub comfy_started_cpu: Mutex<Option<bool>>,}impl AppState {@@ -308,6 +313,7 @@ impl AppState {flash_attn_cache: Mutex::new(HashMap::new()),comfy_gpu_cache: Mutex::new(HashMap::new()),comfy_gpu_mode: Mutex::new("auto".to_string()),+ comfy_started_cpu: Mutex::new(None),}}}diff --git a/src/components/create/experimental/CreateContext.tsx b/src/components/create/experimental/CreateContext.tsxindex 8de214df..1c3b1ac0 100644--- a/src/components/create/experimental/CreateContext.tsx+++ b/src/components/create/experimental/CreateContext.tsx@@ -6,6 +6,7 @@ import { useCreateStore, type GalleryItem } from '../../../stores/createStore'import { useUIStore } from '../../../stores/uiStore'import { getLoraModels, getVAEModels } from '../../../api/comfyui'import { getAllNodeInfo } from '../../../api/comfyui-nodes'+import { backendCall } from '../../../api/backend'import { ensureLocalFilename } from './loadImage'import type { CloudQuota } from '../../../lib/render/cloud-jobs'@@ -29,6 +30,10 @@ interface CreateExpValue {connected: boolean | nullmodelsLoaded: booleanmodelLoadError: string | null+ /** True while the ComfyUI that LU launched runs with --cpu (shd_scorpion,+ * RX 7900 XTX): surfaces the honest slow-mode warning instead of a silent+ * 20-minute timeout. */+ comfyOnCpu: boolean/** Route a missing capability (e.g. background-removal nodes) to the Model Manager. */installCapability: (cap: 'rmbg') => void/** Runtime backend axis: hosted rendering offered for this session? */@@ -58,6 +63,20 @@ export function CreateExpProvider({ children }: { children: ReactNode }) {const setCaps = useCreateStore((s) => s.setCaps)const [loraList, setLoraList] = useState<string[]>([])const [vaeList, setVaeList] = useState<string[]>(['auto'])+ const [comfyOnCpu, setComfyOnCpu] = useState(false)++ // Re-read the CPU/GPU launch flag whenever ComfyUI (re)connects: the Rust+ // side records it at every ComfyUI (re)start, so a Settings → Hardware+ // change + restart updates the banner. Fails silent (stays false) when no+ // Rust backend answers (web build).+ useEffect(() => {+ if (connected !== true) { setComfyOnCpu(false); return }+ let cancelled = false+ backendCall<{ mode?: string; startedCpu?: boolean | null }>('get_comfy_gpu_status')+ .then((s) => { if (!cancelled) setComfyOnCpu(s?.startedCpu === true) })+ .catch(() => { if (!cancelled) setComfyOnCpu(false) })+ return () => { cancelled = true }+ }, [connected])// Never strand the session on a dead axis: losing the license/logging out// while 'cloud' is selected falls back to local rendering.@@ -125,7 +144,7 @@ export function CreateExpProvider({ children }: { children: ReactNode }) {cancel: () => (hasActiveCloudRun() ? cloud.cancel() : cancel()),enhanceVideo: cloud.enhanceVideo,samplerList, schedulerList, loraList, vaeList,- connected, modelsLoaded, modelLoadError, installCapability,+ connected, modelsLoaded, modelLoadError, comfyOnCpu, installCapability,cloudAvailable, quota, refreshQuota,}return <Ctx.Provider value={value}>{children}</Ctx.Provider>diff --git a/src/components/create/experimental/CreateExperimental.tsx b/src/components/create/experimental/CreateExperimental.tsxindex bbd9ca02..eebd4055 100644--- a/src/components/create/experimental/CreateExperimental.tsx+++ b/src/components/create/experimental/CreateExperimental.tsx@@ -28,7 +28,8 @@ function CreateExperimentalInner() {const gallery = useCreateStore((s) => s.gallery)const error = useCreateStore((s) => s.error)const setError = useCreateStore((s) => s.setError)- const { modelLoadError } = useCreateExp()+ const backend = useCreateStore((s) => s.backend)+ const { modelLoadError, connected, comfyOnCpu } = useCreateExp()const [pinnedId, setPinnedId] = useState<string | null>(null)const [advancedOpen, setAdvancedOpen] = useState(false)@@ -111,6 +112,20 @@ function CreateExperimentalInner() {)}</AnimatePresence>+ {/* CPU-mode warning — persistent while LU's ComfyUI runs with --cpu.+ Without it an AMD/non-NVIDIA user sees "Ready to generate" and then+ a bare 20-minute timeout (shd_scorpion, RX 7900 XTX). Local renders+ only — cloud jobs never touch the local ComfyUI. */}+ {backend === 'local' && connected === true && comfyOnCpu && (+ <div className="flex items-center gap-2 px-4 py-2 bg-yellow-500/5 border-b border-yellow-500/10 text-yellow-300 text-xs shrink-0">+ <AlertTriangle size={12} className="shrink-0" />+ <span>+ ComfyUI is running on the CPU (no usable GPU detected) — generation will be extremely slow and may time out.+ AMD GPU? Point LU at a ROCm/ZLUDA ComfyUI and set Settings → Hardware → ComfyUI GPU to force GPU.+ </span>+ </div>+ )}+{/* Stage + Composer + right Advanced drawer share one relative container */}<div className="flex-1 min-h-0 relative flex flex-col"><Stage