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.

feat(preise): die Preiskarte des Desktops kennt den LoRA-Satz

purplede87ea80edeb
diff --git a/src/lib/render/__tests__/katalog-paritaet-web.test.ts b/src/lib/render/__tests__/katalog-paritaet-web.test.ts
index e9d70b5a..d2059500 100644
--- a/src/lib/render/__tests__/katalog-paritaet-web.test.ts
+++ b/src/lib/render/__tests__/katalog-paritaet-web.test.ts
@@ -164,6 +164,24 @@ describe.skipIf(!WEB)('Katalogparitaet Desktop gegen Web', () => {
}
})
+ it('rechnet den LoRA-Satz mit denselben Zahlen wie das Web, und nur dort', () => {
+ const preise = webPreise()
+ const webMitLora = Object.entries(preise).filter(([, p]) => p.lora !== undefined)
+ expect(webMitLora.length).toBeGreaterThan(0)
+ for (const [id, p] of webMitLora) {
+ const s = CLOUD_MODEL_SEED.find((m) => m.id === id)
+ expect(s, id).toBeDefined()
+ expect(s!.credits?.base, id).toBe(credits(p.base))
+ expect(s!.credits?.lora, id).toBe(credits(p.lora!))
+ }
+ // Und in die andere Richtung: kein erfundener Satz im Seed.
+ for (const m of CLOUD_MODEL_SEED) {
+ if (m.credits?.lora === undefined) continue
+ expect(preise[m.id]?.lora, m.id).toBeDefined()
+ expect(m.credits.lora, m.id).toBe(credits(preise[m.id].lora!))
+ }
+ })
+
it('kennt dieselben offenen Bildmodelle wie das Web', () => {
// Der Desktop traegt die Marke nicht selbst (die Katalogroute liefert das
// Feld nicht). Welche Bildmodelle offen sind, sagt also das Web, und der
diff --git a/src/lib/render/__tests__/offene-videomodelle.test.ts b/src/lib/render/__tests__/offene-videomodelle.test.ts
index 6702ca0a..178d9aa1 100644
--- a/src/lib/render/__tests__/offene-videomodelle.test.ts
+++ b/src/lib/render/__tests__/offene-videomodelle.test.ts
@@ -64,6 +64,23 @@ describe('offene Videomodelle im Seed', () => {
}
})
+ it('fuehrt den LoRA-Satz nur dort, wo er wirklich hoeher liegt', () => {
+ // Ein Lauf mit eigener Figur geht beim Anbieter auf die `-lora`-Route,
+ // einen anderen Endpunkt zu einem anderen Preis. Der Satz ersetzt den
+ // Grundsatz, er addiert sich nicht, und er steht nur da, wo der Grundsatz
+ // die teurere Route nicht deckt.
+ const mitLora = CLOUD_MODEL_SEED.filter((m) => m.credits?.lora !== undefined)
+ // Positivkontrolle: ohne einen einzigen Satz pruefte die Schleife nichts.
+ expect(mitLora.length).toBeGreaterThan(0)
+ for (const m of mitLora) {
+ expect(m.credits!.lora!, m.id).toBeGreaterThan(m.credits!.base)
+ // Ein Modell mit langem Satz UND LoRA-Satz braeuchte eine dritte Zahl
+ // fuer den langen LoRA-Lauf. Die gibt es nicht, also gibt es die
+ // Kombination auch nicht.
+ expect(m.credits!.long, m.id).toBeUndefined()
+ }
+ })
+
it('steht im Animate-Waehler und in keinem anderen', () => {
useCloudCatalogStore.setState({ models: CLOUD_MODEL_SEED })
const animate = i2vModels().map((m) => m.id)
diff --git a/src/lib/render/cloud-models.ts b/src/lib/render/cloud-models.ts
index 65c80c89..f93138e5 100644
--- a/src/lib/render/cloud-models.ts
+++ b/src/lib/render/cloud-models.ts
@@ -37,8 +37,15 @@ export interface CloudModel {
/** Video: clip lengths the model books (5s short / 8s long). */
clip?: { short: number; long?: number }
/** Per-run credit cost (base = image or 5s clip, long = 8s clip; music
- * models additionally quote per_s for the duration slider). */
- credits?: { base: number; long?: number; per_s?: number }
+ * models additionally quote per_s for the duration slider).
+ *
+ * `lora` is what one run costs when it carries a trained character: the
+ * worker then books the provider's `-lora` twin, a different endpoint at a
+ * different price. It REPLACES the base rate, it does not add to it, and it
+ * is set only where the twin really costs more than our base rate covers.
+ * /api/jobs/catalog emits it on exactly the same terms, so the client never
+ * needs a second price table. */
+ credits?: { base: number; long?: number; per_s?: number; lora?: number }
}
const CLIP = { short: 5, long: 8 }
@@ -70,8 +77,8 @@ export const CLOUD_MODEL_SEED: CloudModel[] = [
// first, then one of these. CLIP does not fit here, the provider quotes only
// a 5 s rate for them, so there is no 8s button to offer.
// 2026-09-10:
- { id: 'wan-2.2-spicy', label: 'Wan 2.2 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 15000 } },
- { id: 'ltx-2.3-spicy', label: 'LTX 2.3 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 10000 } },
+ { id: 'wan-2.2-spicy', label: 'Wan 2.2 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 15000, lora: 20000 } },
+ { id: 'ltx-2.3-spicy', label: 'LTX 2.3 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 10000, lora: 15000 } },
{ id: 'wan-2.6-spicy', label: 'Wan 2.6 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 50000 } },
{ id: 'wan-2.7-spicy', label: 'Wan 2.7 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 50000 } },
{ id: 'minimax-h3-spicy', label: 'MiniMax H3 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 20000 } },
@@ -103,7 +110,7 @@ export const CLOUD_MODEL_SEED: CloudModel[] = [
{ id: 'ace-step', label: 'ACE-Step (fast)', kind: 'audio', ops: ['music'], credits: { base: 1200, per_s: 20 } },
{ id: 'ace-step-1.5', label: 'ACE-Step 1.5', kind: 'audio', ops: ['music'], lyrics: true, credits: { base: 1800, per_s: 30 } },
{ id: 'sonilo-music', label: 'Sonilo Music', kind: 'audio', ops: ['music'], credits: { base: 15000, per_s: 250 } },
- { id: 'wan-2.2-spicy-extend', label: 'Wan 2.2 Open Extend', kind: 'video', ops: ['extend'], t2v: false, i2v: false },
+ { id: 'wan-2.2-spicy-extend', label: 'Wan 2.2 Open Extend', kind: 'video', ops: ['extend'], t2v: false, i2v: false, credits: { base: 15000, lora: 20000 } },
{ id: 'ltx-2-extend', label: 'LTX-2 Extend', kind: 'video', ops: ['extend'], t2v: false, i2v: false },
{ id: 'pixverse-extend', label: 'Pixverse Extend (fast)', kind: 'video', ops: ['extend'], t2v: false, i2v: false },
{ id: 'wan-2.2-animate', label: 'Wan 2.2 Animate', kind: 'video', ops: ['motion'], t2v: false, i2v: false },