Skip to content

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.

3.0.8 fixes: a phone build never asks for ComfyUI, refusal-removal time estimate has a floor per trial, e2e follows the catalogue

purple762cc712f9ae
diff --git a/e2e/cloud-sales-panel.spec.ts b/e2e/cloud-sales-panel.spec.ts
index 159ace88..fa51a0ec 100644
--- a/e2e/cloud-sales-panel.spec.ts
+++ b/e2e/cloud-sales-panel.spec.ts
@@ -51,8 +51,8 @@ test('without a session one click opens the sales panel, not a login form', asyn
// Die drei gezaehlten Zeilen.
const lines = page.getByTestId('cloud-sales-lines')
await expect(lines).toContainText('19 No Filter chat models')
- await expect(lines).toContainText('14 uncensored video models')
- await expect(lines).toContainText('7 uncensored image models')
+ await expect(lines).toContainText('17 uncensored video models')
+ await expect(lines).toContainText('9 uncensored image models')
// Der Abo-Satz unter dem Knopf.
await expect(panel(page)).toContainText(
diff --git a/e2e/mac-model-manager-latency.spec.ts b/e2e/mac-model-manager-latency.spec.ts
index ba8b30ef..6cf969be 100644
--- a/e2e/mac-model-manager-latency.spec.ts
+++ b/e2e/mac-model-manager-latency.spec.ts
@@ -236,9 +236,17 @@ const trayRow = (page: Page, kind: string) => page.locator(`[data-mlx-install="$
const NOTHING_RUNNING = '[data-downloads-active="0"]'
async function openTray(page: Page, kind: string) {
- // The tray opens itself when a download starts. A click would close it.
- if (!(await trayRow(page, kind).isVisible().catch(() => false))) await tray(page).click()
- await expect(trayRow(page, kind)).toBeVisible()
+ // The tray opens itself when a download starts, and a click on an open tray
+ // closes it. Looked at once, a tray still opening read as closed and the
+ // click shut it (red on the Linux runner, 3.0.8 release run), so look again
+ // after every click until the row is there.
+ await expect(async () => {
+ if (!(await trayRow(page, kind).isVisible().catch(() => false))) {
+ await tray(page).click()
+ await page.waitForTimeout(300)
+ }
+ await expect(trayRow(page, kind)).toBeVisible({ timeout: 1000 })
+ }).toPass({ timeout: 15_000 })
}
test('the download tray has a Stop for a running model download: the row is gone with the click, without an error', async ({ page }) => {
diff --git a/src-tauri/src/commands/abliterate/plan.rs b/src-tauri/src/commands/abliterate/plan.rs
index 507b3b2b..b436220f 100644
--- a/src-tauri/src/commands/abliterate/plan.rs
+++ b/src-tauri/src/commands/abliterate/plan.rs
@@ -385,6 +385,16 @@ fn secs_per_trial_per_b(kind: DeviceKind, q: Quantization) -> f64 {
if q == Quantization::Bnb4bit { base * 1.3 } else { base }
}
+/// Small models do not get faster below a point: every trial still answers
+/// the same prompts. The box (RTX 3060, 0.5B) took about 25 s per trial.
+fn min_secs_per_trial(kind: DeviceKind) -> f64 {
+ match kind {
+ DeviceKind::Apple => 12.0,
+ DeviceKind::Nvidia => 20.0,
+ DeviceKind::Amd => 25.0,
+ }
+}
+
pub fn estimate(input: &EstimateInput<'_>) -> Estimate {
let p_b = input.params as f64 / GB;
let device = input.device;
@@ -418,7 +428,7 @@ pub fn estimate(input: &EstimateInput<'_>) -> Estimate {
};
let disk_needed = (3.0 * d + output_bytes as f64 + env + 1.5 * GB) as u64;
- let per_trial = secs_per_trial_per_b(device.kind, quantization) * p_b.max(0.3);
+ let per_trial = (secs_per_trial_per_b(device.kind, quantization) * p_b).max(min_secs_per_trial(device.kind));
let search = per_trial * input.trials as f64;
// Loading, the refusal directions, the shard merge, conversion and the
// two checks of 150 short prompts each.
@@ -661,6 +671,16 @@ mod tests {
assert!(e.disk_after_bytes < 3_000_000_000);
}
+ #[test]
+ fn a_half_b_model_on_the_box_lands_near_the_measured_time() {
+ let d = nvidia(12);
+ let mut i = input(494_000_000, &d, None);
+ i.trials = 100;
+ let e = estimate(&i);
+ // RTX 3060: 53 min search, about 58 min with merge, conversion and checks.
+ assert!(e.minutes_low <= 58 && 58 <= e.minutes_high, "{}..{}", e.minutes_low, e.minutes_high);
+ }
+
#[test]
fn a_small_card_falls_back_to_4_bit_and_a_too_small_one_says_so() {
let d = nvidia(12);
diff --git a/src/lib/__tests__/telefonbau-hat-kein-comfy.test.ts b/src/lib/__tests__/telefonbau-hat-kein-comfy.test.ts
new file mode 100644
index 00000000..9d625b59
--- /dev/null
+++ b/src/lib/__tests__/telefonbau-hat-kein-comfy.test.ts
@@ -0,0 +1,39 @@
+/**
+ * A phone build never has a ComfyUI, also when it runs in a desktop browser.
+ *
+ * The Playwright project mobile serves the phone build to desktop Chrome at
+ * phone size. On a Mac that browser said "Mac" and the ComfyUI probe stayed
+ * off; on the Linux CI runner it said "Linux", the model list asked
+ * /comfyui/system_stats, the proxy answered 502, and every mobile spec that
+ * counts console errors went red (3.0.8 release run, 183 tests).
+ *
+ * Run: npx vitest run src/lib/__tests__/telefonbau-hat-kein-comfy.test.ts
+ */
+import { afterEach, describe, expect, it, vi } from 'vitest'
+import { standOn } from '../../test-support/devices'
+
+afterEach(() => {
+ vi.unstubAllEnvs()
+ vi.unstubAllGlobals()
+ vi.resetModules()
+})
+
+async function capabilities() {
+ vi.resetModules()
+ return import('../capabilities')
+}
+
+describe('hasComfy in a phone build', () => {
+ it('a phone build in a Linux desktop browser asks no ComfyUI', async () => {
+ vi.stubEnv('VITE_LU_BUILD_TARGET', 'mobile')
+ standOn('linux')
+ const { hasComfy } = await capabilities()
+ expect(hasComfy()).toBe(false)
+ })
+
+ it('COUNTER-CHECK: the desktop build on Linux still has ComfyUI', async () => {
+ standOn('linux')
+ const { hasComfy } = await capabilities()
+ expect(hasComfy()).toBe(true)
+ })
+})
diff --git a/src/lib/capabilities.ts b/src/lib/capabilities.ts
index f554b3d3..70d000cf 100644
--- a/src/lib/capabilities.ts
+++ b/src/lib/capabilities.ts
@@ -17,11 +17,15 @@
import { isLinux, isMacOS } from '../api/backend'
import { isAndroid, isIOS, isMobile } from './device-kind'
+import { MOBILE_BUILD } from './mobile-host'
/** A local ComfyUI can exist on this device. Desktop: everywhere but the Mac,
- * where local media is MLX only. Never on a phone. */
+ * where local media is MLX only. Never on a phone, and never in a phone
+ * build: a phone build in a desktop browser (the Playwright project mobile on
+ * a Linux runner) reports no phone and used to ask a ComfyUI that cannot be
+ * there. */
export function hasComfy(): boolean {
- return !isMobile() && !isMacOS()
+ return !MOBILE_BUILD && !isMobile() && !isMacOS()
}
/** The Apple MLX image and video runtime can exist here. Mac only. An iPhone