Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Originals O13: Video tools → Evolution, references, the change intensity, a direction written for you, the price before it runs

Claude0219ed1f15d5
diff --git a/src/components/evolution/evolution-tool.tsx b/src/components/evolution/evolution-tool.tsx
new file mode 100644
index 00000000..f99e61f0
--- /dev/null
+++ b/src/components/evolution/evolution-tool.tsx
@@ -0,0 +1,368 @@
+"use client";
+
+import { Download, ImagePlus, Loader2, RotateCcw, Sparkles, Wand2, X } from "lucide-react";
+import { useMemo, useRef, useState } from "react";
+import { nanoid } from "nanoid";
+import { toast } from "sonner";
+import { Button } from "@/components/ui/button";
+import { Textarea } from "@/components/ui/textarea";
+import { StepList, type StepRow } from "@/components/av/step-list";
+import { Panel, ToolHero, ToolShell } from "@/components/av/tool-shell";
+import { useGenerationList } from "@/components/av/use-generation";
+import { VideoCompare } from "@/components/remove-object/video-compare";
+import { useSubmitGuard } from "@/components/shorts/hooks";
+import { ClipBar, ClipDrop, costText, Field, Segmented } from "@/components/shorts/ui";
+import { clipDuration, clipSize, useSourceClip } from "@/components/shorts/use-source-clip";
+import { Feed } from "@/components/studio/feed";
+import { fileToList, MediaSlot, type SlotValue } from "@/components/studio/media-slot";
+import { VideoTrimmer, type TrimRange, type VideoTrimmerHandle } from "@/components/studio/video-trimmer";
+import { useEngine, useGenerations } from "@/lib/api";
+import { EVOLUTION, EVOLUTION_DEFAULT_RESOLUTION, EVOLUTION_RESOLUTIONS, INTENSITIES, type Intensity } from "@/lib/catalog/evolution";
+import { chainState } from "@/lib/catalog/shorts";
+import { downloadHref, downloadName } from "@/lib/library";
+import { cn } from "@/lib/utils";
+import { useEvolutionActions, useEvolutionEstimate, type EvolutionBody } from "./hooks";
+
+const LIMITS = `MP4, MOV or WebM · ${EVOLUTION.minSeconds}–${EVOLUTION.maxSeconds} s · ${EVOLUTION.maxBytes / 1024 / 1024} MB`;
+const BY: Record<string, string> = { claude: "Written by Claude", ollama: "Written by Ollama on your computer", offline: "Written by Fuobe's offline writer", you: "Your direction" };
+
+interface Run {
+ final: string;
+ ids: string[];
+ before: string;
+ start: number;
+ ratio?: number;
+ direction: string;
+ by: string;
+}
+
+/** A frame of the clip as a small JPEG data URL, for the direction writer to see. */
+async function frameDataUrl(blob: Blob | null | undefined): Promise<string | undefined> {
+ if (!blob) return undefined;
+ return await new Promise<string | undefined>((resolve) => {
+ const r = new FileReader();
+ r.onload = () => resolve(typeof r.result === "string" && r.result.length < 1_900_000 ? r.result : undefined);
+ r.onerror = () => resolve(undefined);
+ r.readAsDataURL(blob);
+ });
+}
+
+/**
+ * Video tools → Evolution (Fuobe Evolution, build plan O13): one clip and up to 40 references, how much should change,
+ * and a creative direction you write or an LLM writes from the references; priced before it runs ("Free" on your
+ * GPU); the result with a before / after wipe.
+ */
+export function EvolutionTool({ tabs }: { tabs?: React.ReactNode }) {
+ const [engine] = useEngine();
+ const source = useSourceClip(EVOLUTION.maxBytes);
+ const clip = source.clip;
+ const trimmer = useRef<VideoTrimmerHandle>(null);
+ const many = useRef<HTMLInputElement>(null);
+ const [range, setRange] = useState<TrimRange | null>(null);
+ const [intensity, setIntensity] = useState<Intensity>("medium");
+ const [direction, setDirection] = useState("");
+ const [by, setBy] = useState<string | null>(null);
+ const [refs, setRefs] = useState<SlotValue[]>([]);
+ const [picked, setPicked] = useState<Record<string, string>>({});
+ const [run, setRun] = useState<Run | null>(null);
+ const actions = useEvolutionActions();
+ const runGuard = useSubmitGuard();
+ const history = useGenerations({ features: [EVOLUTION.feature], limit: 24 });
+
+ const resolutions = EVOLUTION_RESOLUTIONS[engine];
+ const resolution = picked[engine] && resolutions.includes(picked[engine]) ? picked[engine] : EVOLUTION_DEFAULT_RESOLUTION[engine];
+ const duration = clipDuration(clip);
+ const size = clipSize(clip);
+ const uploaded = refs.filter((r) => r.ref && !r.uploading).map((r) => r.ref!);
+ const ready = !!clip?.url && !clip.uploading && !clip.error && !!duration && !!range;
+ const body: EvolutionBody | null = ready
+ ? {
+ engine,
+ intensity,
+ ...(direction.trim() ? { direction: direction.trim() } : {}),
+ references: uploaded,
+ resolution,
+ source: { url: clip.url!, name: clip.name, duration, fps: clip.info?.fps, width: size.width, height: size.height, hasAudio: clip.info?.hasAudio },
+ range: { start: range.startTime, end: range.endTime },
+ }
+ : null;
+ const estimate = useEvolutionEstimate(body);
+ const est = estimate.data && !estimate.isError ? estimate.data : undefined;
+
+ const blocker = !clip
+ ? "Add a clip"
+ : clip.error
+ ? clip.error
+ : clip.uploading
+ ? clip.progress < 1
+ ? `Uploading… ${Math.round(clip.progress * 100)}%`
+ : "Reading the clip…"
+ : !range || !duration
+ ? "Reading the clip…"
+ : refs.some((r) => r.uploading)
+ ? "Uploading references…"
+ : estimate.isError
+ ? (estimate.error as Error).message
+ : null;
+
+ const reset = () => {
+ source.clear();
+ setRange(null);
+ };
+
+ const write = async () => {
+ const frame = await frameDataUrl(await trimmer.current?.grabFrame(range?.startTime, 768).catch(() => null));
+ actions.direction.mutate(
+ { engine, intensity, idea: direction.trim() || undefined, references: uploaded, frame, seconds: range ? range.endTime - range.startTime : duration },
+ {
+ onSuccess: (d) => {
+ setDirection(d.direction);
+ setBy(d.by);
+ if (d.by === "offline" && d.why) toast("Written offline", { description: `Fuobe's own writer wrote it: ${d.why}. Edit it as you like.` });
+ },
+ onError: (e) => toast.error((e as Error).message),
+ },
+ );
+ };
+
+ const start = () => {
+ if (blocker || !body) return void toast(blocker ?? "Not ready yet", { id: "evolution-blocker" });
+ void runGuard(JSON.stringify(body), (requestId) => actions.run.mutateAsync({ ...body, requestId }))
+ .then((r) => {
+ if (!r) return;
+ const ratio = size.width && size.height ? size.width / size.height : undefined;
+ setRun({ final: r.final.id, ids: r.items.map((g) => g.id), before: clip!.preview, start: range!.startTime, ratio, direction: r.direction, by: r.by });
+ if (!direction.trim()) {
+ setDirection(r.direction);
+ setBy(r.by);
+ }
+ toast("Evolving your clip", { description: "Follow it below — it lands in your Library too." });
+ })
+ .catch((e: Error) => toast.error(e.message));
+ };
+
+ const addMany = (files: FileList | null) => {
+ const room = EVOLUTION.maxReferences - refs.length;
+ const list = [...(files ?? [])].filter((f) => f.type.startsWith("image/")).slice(0, room);
+ if ((files?.length ?? 0) > room) toast(`Up to ${EVOLUTION.maxReferences} references — ${list.length} added`);
+ list.forEach((f) => fileToList(f, setRefs, "image"));
+ };
+
+ return (
+ <ToolShell title="Video tools" tabs={tabs} wide>
+ {!clip && (
+ <ToolHero
+ title="Take a clip further"
+ subtitle="Evolution keeps your clip's motion and timing and takes the rest where your references and words point. Priced before it runs; free on your own ComfyUI."
+ />
+ )}
+ <div className={cn("mx-auto", clip ? "pt-4" : "mt-8 max-w-[640px]")}>
+ {!clip ? (
+ <ClipDrop
+ accept={EVOLUTION.accept}
+ limits={LIMITS}
+ onFile={(f) => {
+ const err = source.pick(f);
+ if (err) toast.error(err);
+ else setRange(null);
+ }}
+ onLibrary={(url, name) => {
+ source.adopt(url, name);
+ setRange(null);
+ }}
+ />
+ ) : (
+ <div className="grid grid-cols-1 items-start gap-4 lg:grid-cols-[minmax(0,1fr)_380px]">
+ <div className="min-w-0 space-y-4">
+ <Panel>
+ <div className="space-y-3">
+ <ClipBar clip={clip} onRemove={reset} />
+ <VideoTrimmer
+ ref={trimmer}
+ src={clip.preview}
+ value={range}
+ onChange={setRange}
+ min={EVOLUTION.minSeconds}
+ max={EVOLUTION.maxSeconds}
+ duration={clip.info?.duration}
+ label="Part of the clip to evolve"
+ hint={duration && duration > EVOLUTION.maxSeconds ? `Pick up to ${EVOLUTION.maxSeconds} s — only that part comes out` : "The whole clip, or just the part you need"}
+ onMeta={source.setBrowserMeta}
+ />
+ </div>
+ </Panel>
+ <Panel title="References" aside={<span className="text-[12px] text-muted-foreground tabular-nums">{refs.length}/{EVOLUTION.maxReferences}</span>}>
+ <div className="flex flex-wrap gap-2">
+ {refs.map((r) => (
+ <div key={r.id} className="relative">
+ <MediaSlot label="Reference" kind="image" value={r} onChange={(v) => setRefs((xs) => (v ? xs.map((x) => (x.id === r.id ? { ...v, id: r.id } : x)) : xs.filter((x) => x.id !== r.id)))} size="lg" />
+ </div>
+ ))}
+ {refs.length < EVOLUTION.maxReferences && (
+ <MediaSlot
+ label={refs.length ? "Add another" : "Add a reference"}
+ kind="image"
+ value={null}
+ onChange={(v) => v && setRefs((xs) => [...xs, { ...v, id: v.id ?? nanoid(8) }])}
+ onFile={(f) => fileToList(f, setRefs, "image")}
+ size="lg"
+ />
+ )}
+ </div>
+ <div className="mt-2 flex flex-wrap items-center gap-2">
+ <input ref={many} type="file" accept="image/*" multiple className="sr-only" tabIndex={-1} aria-hidden onChange={(e) => (addMany(e.target.files), (e.target.value = ""))} />
+ {refs.length < EVOLUTION.maxReferences && (
+ <Button size="sm" variant="outline" className="rounded-full" onClick={() => many.current?.click()}>
+ <ImagePlus className="size-3.5" /> Add several
+ </Button>
+ )}
+ {refs.length > 0 && (
+ <Button size="sm" variant="ghost" className="rounded-full" onClick={() => setRefs([])}>
+ <X className="size-3.5" /> Clear
+ </Button>
+ )}
+ <p className="min-w-0 flex-1 basis-60 text-[12px] text-muted-foreground">
+ Characters, objects, places or a style.{" "}
+ {engine === "open"
+ ? `On your GPU the first ${EVOLUTION.openReferences} also go into each segment's direction frame; all of them shape the direction.`
+ : "In the cloud they shape the direction (LTX-2.3 takes no pictures)."}
+ </p>
+ </div>
+ </Panel>
+ </div>
+
+ <Panel className="space-y-4 lg:sticky lg:top-[112px]">
+ <Field label="How much should change?" hint={INTENSITIES.find((i) => i.id === intensity)?.hint}>
+ <Segmented label="How much should change?" value={intensity} onChange={setIntensity} options={INTENSITIES.map((i) => ({ value: i.id, label: i.label }))} />
+ </Field>
+
+ <Field label="Creative direction" htmlFor="evolution-direction" hint={by ? BY[by] : "Optional: left empty, it's written for you when you start"}>
+ <Textarea
+ id="evolution-direction"
+ value={direction}
+ onChange={(e) => {
+ setDirection(e.target.value);
+ setBy(e.target.value.trim() ? "you" : null);
+ }}
+ maxLength={EVOLUTION.maxDirectionChars}
+ rows={5}
+ placeholder="e.g. “the same walk through a neon-lit night market in the rain” — or a few words, then Write it for me"
+ className="max-h-64 resize-y"
+ />
+ <div className="flex flex-wrap items-center gap-2">
+ <Button size="sm" variant="outline" className="rounded-full" onClick={() => void write()} disabled={actions.direction.isPending || !clip || refs.some((r) => r.uploading)}>
+ {actions.direction.isPending ? <Loader2 className="size-3.5 animate-spin" /> : <Sparkles className="size-3.5" />} Write it for me
+ </Button>
+ <span className="text-[12px] text-muted-foreground">
+ {engine === "open" ? "Ollama with a vision model, else Fuobe's offline writer" : "Claude reads your references, else Fuobe's offline writer"} · never starts a run
+ </span>
+ </div>
+ </Field>
+
+ <Field label="Resolution">
+ <Segmented label="Resolution" value={resolution} onChange={(v) => setPicked((p) => ({ ...p, [engine]: v }))} options={resolutions.map((r) => ({ value: r, label: r }))} />
+ </Field>
+
+ <div className="space-y-3 border-t pt-3">
+ <div className="flex items-center gap-2">
+ <div className="min-w-0 flex-1" aria-live="polite">
+ {blocker ? (
+ <p className="text-[13px] text-muted-foreground">{blocker}</p>
+ ) : (
+ <>
+ <p className="flex items-center gap-1.5 text-[15px] font-semibold tabular-nums">
+ {costText(est, engine)}
+ {estimate.isFetching && <Loader2 className="size-3 animate-spin text-muted-foreground" aria-label="Updating the price" />}
+ </p>
+ {est && (
+ <p className="text-[12px] leading-snug text-muted-foreground">
+ {est.modelName} · {est.seconds} s · {est.resolution}
+ {est.pieces > 1 ? ` in ${est.pieces} ${engine === "open" ? "segments" : "pieces"}` : ""}
+ </p>
+ )}
+ </>
+ )}
+ </div>
+ <Button className="rounded-full" onClick={start} disabled={!!blocker || actions.run.isPending}>
+ {actions.run.isPending ? <Loader2 className="size-4 animate-spin" /> : <Wand2 className="size-4" />} Evolve
+ </Button>
+ </div>
+ {est && est.notes.length > 0 && !blocker && (
+ <ul className="space-y-1 text-[12px] leading-snug text-muted-foreground">
+ {est.notes.map((n) => (
+ <li key={n} className="flex gap-1.5">
+ <Sparkles className="mt-0.5 size-3 shrink-0 text-brand-text" />
+ <span>{n}.</span>
+ </li>
+ ))}
+ </ul>
+ )}
+ </div>
+ </Panel>
+ </div>
+ )}
+ </div>
+
+ {run && <RunPanel run={run} onAgain={start} />}
+
+ {(history.data?.length ?? 0) > 0 && (
+ <section className="mt-10" aria-labelledby="evolutions">
+ <h3 id="evolutions" className="mb-3 font-heading text-[22px]">
+ Your evolutions
+ </h3>
+ <Feed items={history.data!} />
+ </section>
+ )}
+ </ToolShell>
+ );
+}
+
+/** What a run's steps are doing, then the result with a before / after wipe and the direction it ran with. */
+function RunPanel({ run, onAgain }: { run: Run; onAgain: () => void }) {
+ const list = useGenerationList(run.ids).data;
+ const byId = useMemo(() => new Map((list ?? []).map((g) => [g.id, g])), [list]);
+ const final = byId.get(run.final);
+ const rows: StepRow[] = run.ids.map((id) => {
+ const g = byId.get(id);
+ return { key: id, label: g?.request.step?.label ?? "A step", g };
+ });
+ const state = chainState(rows.map((r) => ({ g: r.g, label: r.label })).sort((a, b) => (a.g?.id === run.final ? 1 : b.g?.id === run.final ? -1 : 0)));
+ const out = final?.status === "succeeded" ? final.outputs.find((o) => o.kind === "video") : undefined;
+ return (
+ <section className="mt-6" aria-labelledby="run-title">
+ <Panel
+ title={<span id="run-title">{final?.request.title ?? "Your evolution"}</span>}
+ aside={
+ out && final ? (
+ <Button asChild size="sm" variant="outline" className="rounded-full">
+ <a href={downloadHref(out.url, downloadName(final, out, 0))}>
+ <Download className="size-3.5" /> Download
+ </a>
+ </Button>
+ ) : state.status === "failed" ? (
+ <Button size="sm" variant="outline" className="rounded-full" onClick={onAgain}>
+ <RotateCcw className="size-3.5" /> Try again
+ </Button>
+ ) : null
+ }
+ >
+ {out ? (
+ <VideoCompare before={run.before} after={out.url} start={run.start} ratio={run.ratio} />
+ ) : (
+ <div className="space-y-3">
+ <div className="h-1.5 overflow-hidden rounded-full bg-muted" role="progressbar" aria-valuemin={0} aria-valuemax={100} aria-valuenow={Math.round(state.progress * 100)} aria-label="Progress">
+ <div className={cn("h-full transition-[width]", state.status === "failed" ? "bg-destructive" : "bg-primary")} style={{ width: `${Math.max(4, state.progress * 100)}%` }} />
+ </div>
+ <p className={cn("text-[13px]", state.status === "failed" ? "text-destructive" : "text-muted-foreground")} aria-live="polite">
+ {state.status === "failed" ? `${state.label}: ${state.error}` : state.label}
+ </p>
+ {rows.length > 1 && <StepList steps={rows} />}
+ </div>
+ )}
+ <p className="mt-3 text-[12px] leading-relaxed break-words text-muted-foreground">
+ <span className="font-medium text-foreground">{BY[run.by] ?? "Direction"}:</span> {run.direction}
+ </p>
+ </Panel>
+ </section>
+ );
+}
diff --git a/src/components/evolution/hooks.ts b/src/components/evolution/hooks.ts
new file mode 100644
index 00000000..5024a063
--- /dev/null
+++ b/src/components/evolution/hooks.ts
@@ -0,0 +1,70 @@
+"use client";
+
+import { keepPreviousData, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
+import type { Intensity } from "@/lib/catalog/evolution";
+import type { Engine, Generation } from "@/lib/catalog/types";
+import { useDebounced } from "@/components/faceless/hooks";
+import { send } from "@/components/shorts/hooks";
+
+/** React Query hooks for /api/evolution/** (the Evolution tab of Video tools). */
+
+export interface EvolutionBody {
+ engine: Engine;
+ intensity: Intensity;
+ direction?: string;
+ idea?: string;
+ references: string[];
+ source: { url: string; name?: string; duration?: number; fps?: number; width?: number; height?: number; hasAudio?: boolean };
+ range?: { start: number; end: number };
+ resolution?: string;
+ /** Client nonce: a repeat of it gets the first answer (see useSubmitGuard). */
+ requestId?: string;
+}
+
+export interface EvolutionEstimate {
+ costUsd: number | null;
+ demo: boolean;
+ modelName: string;
+ engine: Engine;
+ resolution: string;
+ pieces: number;
+ seconds: number;
+ steps: number;
+ notes: string[];
+}
+
+export interface DirectionAnswer {
+ direction: string;
+ by: "claude" | "ollama" | "offline";
+ why?: string;
+}
+
+/** The price and shape of a run for the current settings, asked for once typing pauses (300 ms). */
+export function useEvolutionEstimate(body: EvolutionBody | null) {
+ // The words don't change the price: they stay out of the key, so typing doesn't ask again.
+ const key = useDebounced(body ? JSON.stringify({ ...body, direction: undefined, idea: undefined }) : null, 300);
+ return useQuery({
+ queryKey: ["evolution", "estimate", key],
+ queryFn: async () => send<EvolutionEstimate>("/api/evolution/estimate", "POST", JSON.parse(key!)),
+ enabled: !!key,
+ placeholderData: keepPreviousData,
+ retry: false,
+ staleTime: 30_000,
+ });
+}
+
+export function useEvolutionActions() {
+ const qc = useQueryClient();
+ return {
+ run: useMutation({
+ mutationFn: (b: EvolutionBody) => send<{ final: Generation; items: Generation[]; direction: string; by: DirectionAnswer["by"] | "you" }>("/api/evolution", "POST", b),
+ onSuccess: (r) => {
+ r.items.forEach((g) => qc.setQueryData(["generation", g.id], g));
+ void qc.invalidateQueries({ queryKey: ["generations"] });
+ },
+ }),
+ direction: useMutation({
+ mutationFn: (b: { engine: Engine; intensity: Intensity; idea?: string; references: string[]; frame?: string; seconds?: number }) => send<DirectionAnswer>("/api/evolution/direction", "POST", b),
+ }),
+ };
+}
diff --git a/src/components/nav-items.ts b/src/components/nav-items.ts
index 11f9dcc8..2f68afdf 100644
--- a/src/components/nav-items.ts
+++ b/src/components/nav-items.ts
@@ -119,7 +119,7 @@ export const NAV: NavGroupDef[] = [
{ href: "/video-edit", label: "Edit video", icon: Scissors, keywords: "video edit restyle" },
{ href: "/extend", label: "Extend video", icon: FastForward, keywords: "longer continue" },
{ href: "/reframe", label: "Reframe", icon: Crop, keywords: "aspect ratio outpaint" },
- { href: "/video-tools", label: "Video tools", icon: Layers, keywords: "join trim matte depth captions" },
+ { href: "/video-tools", label: "Video tools", icon: Layers, keywords: "join trim matte depth captions evolution remove object" },
{ href: "/elements", label: "Elements", icon: AtSign, keywords: "characters places props" },
{ href: "/upscale", label: "Upscale", icon: ZoomIn, keywords: "enhance resolution 4k" },
{ href: "/audio", label: "Audio", icon: AudioLines, keywords: "voice tts music sfx dub transcribe" },
diff --git a/src/components/studio/mode-switch-studio.tsx b/src/components/studio/mode-switch-studio.tsx
index e824e036..8ffbef80 100644
--- a/src/components/studio/mode-switch-studio.tsx
+++ b/src/components/studio/mode-switch-studio.tsx
@@ -27,6 +27,7 @@ import { CaptionsStudio } from "@/components/captions/captions-studio";
import { DubStudio } from "@/components/dub/dub-studio";
import { TrimTool } from "@/components/av/trim-tool";
import { RemoveObjectTool } from "@/components/remove-object/remove-object-tool";
+import { EvolutionTool } from "@/components/evolution/evolution-tool";
import { AudioJoinTool, AudioLoopTool } from "@/components/audio-tools/audio-tools";
import { ModeStudio, ModeTabs } from "./mode-studio";
import type { StudioConfig } from "./studio-context";
@@ -52,7 +53,7 @@ const CONFIGS: Record<HubKind, Record<string, StudioConfig>> = {
},
};
-/** Modes that are their own tool rather than a composer studio (Translate & dub, Loop / extend, Join, Remove object, Captions, Trim). */
+/** Modes that are their own tool rather than a composer studio (Translate & dub, Loop / extend, Join, Remove object, Evolution, Captions, Trim). */
const TOOLS: Partial<Record<HubKind, Record<string, (p: { tabs: React.ReactNode }) => React.ReactNode>>> = {
audio: {
translate: ({ tabs }) => <DubStudio tabs={tabs} />,
@@ -61,6 +62,7 @@ const TOOLS: Partial<Record<HubKind, Record<string, (p: { tabs: React.ReactNode
},
"video-tools": {
"remove-object": ({ tabs }) => <RemoveObjectTool tabs={tabs} />,
+ evolution: ({ tabs }) => <EvolutionTool tabs={tabs} />,
captions: ({ tabs }) => <CaptionsStudio tabs={tabs} />,
trim: ({ tabs }) => <TrimTool tabs={tabs} />,
},
diff --git a/src/lib/hubs.ts b/src/lib/hubs.ts
index fb785a4a..e983a067 100644
--- a/src/lib/hubs.ts
+++ b/src/lib/hubs.ts
@@ -28,6 +28,7 @@ export const HUB_MODES: Record<HubKind, { id: string; label: string }[]> = {
"video-tools": [
{ id: "matte", label: "Remove background" },
{ id: "remove-object", label: "Remove object" },
+ { id: "evolution", label: "Evolution" },
{ id: "relight", label: "Relight" },
{ id: "depth", label: "Depth map" },
{ id: "captions", label: "Captions" },
diff --git a/tests/evolution-api.test.ts b/tests/evolution-api.test.ts
index 3bad7493..bb39b89b 100644
--- a/tests/evolution-api.test.ts
+++ b/tests/evolution-api.test.ts
@@ -128,7 +128,7 @@ describe("Evolution: runs (demo)", () => {
expect(evolve.request).toMatchObject({ engine: "cloud", params: { extra: { video_strength: 0.35 } } });
expect(evolve.request.prompt).toBe(direction);
const done = await settle(final.id);
- expect(done.status, done.error).toBe("succeeded");
+ expect(done.status, done.error ?? undefined).toBe("succeeded");
expect(done.outputs[0].kind).toBe("video");
});
@@ -142,7 +142,7 @@ describe("Evolution: runs (demo)", () => {
const evolve = gens.getGeneration(rows.find((r) => r.model_id === "fuobe-evolution")!.id)!;
expect(evolve.request).toMatchObject({ engine: "open", params: { extra: { denoise: 0.85 } } });
const done = await settle(final.id);
- expect(done.status, done.error).toBe("succeeded");
+ expect(done.status, done.error ?? undefined).toBe("succeeded");
expect(done.feature).toBe("evolution");
});
});