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.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Wan 2.2 A14B and Fuobe DoP: the cloud runs on Replicate's fast Wan 2.2
Adarshd4702ed7ea40
diff --git a/scripts/fetch-hosted-schemas.py b/scripts/fetch-hosted-schemas.pyindex 9ed78a36..4cb6e41b 100644--- a/scripts/fetch-hosted-schemas.py+++ b/scripts/fetch-hosted-schemas.py@@ -64,11 +64,12 @@ LORA = {# Restore IC-LoRA, gated on Hugging Face, sent through Fuobe's LoRA mirror). The archive clip is the reference video;# image_url, the optional first frame, takes the previous piece's last restored frame."fal-ai/ltx-2.3-22b/reference-video-to-video/lora": {**LTX, "video": "video_url", "image": "image_url"},- "fal-ai/wan/v2.2-a14b/image-to-video/lora": {"prompt": "prompt", "image": "image_url", "endImage": "end_image_url", "negativePrompt": "negative_prompt",- "aspectRatio": "aspect_ratio", "resolution": "resolution", "numFrames": "num_frames", "seed": "seed", "loras": "loras"},- "fal-ai/wan/v2.2-a14b/text-to-video/lora": {"prompt": "prompt", "negativePrompt": "negative_prompt", "aspectRatio": "aspect_ratio", "resolution": "resolution",- "numFrames": "num_frames", "seed": "seed", "loras": "loras"},- "fal-ai/wan/v2.2-a14b/text-to-image/lora": {"prompt": "prompt", "negativePrompt": "negative_prompt", "aspectRatio": "image_size", "seed": "seed", "loras": "loras"},+ # Wan 2.2 A14B with LoRAs (Fuobe DoP, Fuobe Animation, Wan 2.2 A14B hosted): Replicate's fast Wan 2.2, one LoRA per+ # expert (lora_weights_transformer for high noise, _2 for low noise), since fal removes its Wan 2.2 line on 2027-01-04.+ "wan-video/wan-2.2-i2v-fast": {"prompt": "prompt", "image": "image", "endImage": "last_image", "resolution": "resolution", "numFrames": "num_frames",+ "seed": "seed", "loras": "lora_weights_transformer"},+ "wan-video/wan-2.2-t2v-fast": {"prompt": "prompt", "aspectRatio": "aspect_ratio", "resolution": "resolution", "numFrames": "num_frames",+ "seed": "seed", "loras": "lora_weights_transformer"},"fal-ai/z-image/turbo/lora": {k: v for k, v in T2I.items() if k != "negativePrompt"},# Fuobe Soul's edit route (O2): image-to-image with the look's LoRAs; image_size "auto" keeps the picture's shape."fal-ai/z-image/turbo/image-to-image/lora": {**{k: v for k, v in T2I.items() if k not in ("negativePrompt", "aspectRatio")}, "image": "image_url"},@@ -140,8 +141,8 @@ ANIMATE = {"video": "video_url", "image": "image_url", "seed": "seed", "resolutiVACE14 = {"prompt": "prompt", "negativePrompt": "negative_prompt", "video": "video_url", "images": "ref_image_urls", "seed": "seed","resolution": "resolution", "aspectRatio": "aspect_ratio", "fps": "frames_per_second"}GENJUTSU = {- "fal-ai/wan/v2.2-14b/animate/move": ("motion-transfer", ANIMATE),- "fal-ai/wan/v2.2-14b/animate/replace": ("video-swap", ANIMATE),+ # Wan 2.2 Animate move / replace left with fal's Wan 2.2 line (2027-01-04): Genjutsu's motion and person swaps run on+ # MiniMax H3 Max Recast (minimax/h3-max/recast, researched in paid-model-apis-3.json)."fal-ai/scail-2": ("motion-transfer", {"prompt": "prompt", **ANIMATE}),"fal-ai/wan-motion": ("motion-transfer", {"prompt": "prompt", "video": "video_url", "image": "image_url", "seed": "seed"}),"fal-ai/wan-vace-14b/inpainting": ("video-swap", {**VACE14, "mask": "mask_video_url"}),diff --git a/scripts/gen-cloud-models.py b/scripts/gen-cloud-models.pyindex 9f277b64..e7ce4829 100644--- a/scripts/gen-cloud-models.py+++ b/scripts/gen-cloud-models.py@@ -752,19 +752,18 @@ model("flux-3-video", "FLUX.3 Video", "Black Forest Labs", "flux", "video", "BFL("flf2v", "blackforestlabs/flux-3/first-last-frame-to-video"), ("v2v", "blackforestlabs/flux-3/edit-video"),("extend", "blackforestlabs/flux-3/extend-video")],badges=["new"], defaults={"aspectRatio": "16:9"})-# Originals (O1): Wan 2.2 A14B and LTX-2.3 22B open weights on fal / Replicate, with camera and effect LoRAs.-# fal's Wan 2.2 interpolates to 32 fps by default (doubled frames): interpolator_model none keeps 16 fps (research §3.1).-WAN22_FAL = {"interpolator_model": "none"}+# Originals (O1): Wan 2.2 A14B and LTX-2.3 22B open weights hosted, with camera and effect LoRAs. fal removes its Wan 2.2+# line on 2027-01-04: Wan 2.2 A14B runs on Replicate's fast Wan 2.2, which takes one LoRA per expert+# (lora_weights_transformer = high noise, _2 = low noise; a Mix's extra LoRAs run on your GPU) and makes 81-121 frames.+# Replicate's t2v interpolates to 30 fps by default (interpolate_output true): off, so both stay at 16 fps. Replicate bills+# each clip: 480p $0.05, 720p $0.11 from a picture and $0.10 from words (model pages, 2026-11-07).WAN22_REPLICATE = {"interpolate_output": False}+WAN22_REPLICATE_PRICE = ("video", 0.11, "per clip of 81 frames at 720p on Replicate ($0.10 from words); 480p $0.05",+ {"byResolution": {"720p": 0.11, "480p": 0.05}})model("wan-2-2-a14b-cloud", "Wan 2.2 A14B (hosted)", "Alibaba Wan", "wan", "video", "Open-weights Wan 2.2 that takes camera and effect LoRAs",- [("t2v", "fal-ai/wan/v2.2-a14b/text-to-video", "fal", {"loraEndpoint": "fal-ai/wan/v2.2-a14b/text-to-video/lora", "defaults": WAN22_FAL}),- ("i2v", "fal-ai/wan/v2.2-a14b/image-to-video", "fal", {"loraEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora", "defaults": WAN22_FAL}),- # One LoRA per expert (lora_weights_transformer = high noise, _2 = low noise): a Mix runs on fal.- # Replicate's t2v interpolates to 30 fps by default (interpolate_output true): off, so both stay at 16 fps.- ("t2v", "wan-video/wan-2.2-t2v-fast", "replicate", {"defaults": WAN22_REPLICATE}),- ("i2v", "wan-video/wan-2.2-i2v-fast", "replicate", {"defaults": WAN22_REPLICATE})],- pricing=("second", 0.08, "720p on fal; 580p $0.06/s, 480p $0.04/s; with LoRAs $0.10/s",- {"byResolution": {"720p": 0.08, "580p": 0.06, "480p": 0.04}, "withLoras": 0.1}),+ [("t2v", "wan-video/wan-2.2-t2v-fast", "replicate", {"defaults": WAN22_REPLICATE}),+ ("i2v", "wan-video/wan-2.2-i2v-fast", "replicate", {"defaults": WAN22_REPLICATE, "flf2v": True})],+ pricing=WAN22_REPLICATE_PRICE,# Replicate takes 480p / 720p only and t2v only 16:9 / 9:16: each route lists what it takes (fit_values).defaults={"aspectRatio": "16:9", "duration": 5, "resolution": "720p"}, frame_step=4, fit_values=True)# LTX-2.3 22B (LTX-2 Community licence: free under US$10M annual revenue). Prompt expansion is on by default and would@@ -778,17 +777,14 @@ model("ltx-2-3-22b-cloud", "LTX-2.3 22B (hosted)", "Lightricks", "ltx", "video",pricing=("second", 0.036, "$0.001605 per megapixel of video: about $0.18 for 5 s at 720p ($0.20 with LoRAs)", {"withLoras": 0.04}),defaults={"aspectRatio": "16:9", "duration": 5}, frame_step=8)# ----- Originals (O4): Fuobe DoP's cloud halves, camera motions and effects on hosted open weights (research §3.1, §7.5).-# DoP clips are 49 or 81 frames at 16 fps (3 or 5 s): fal's Wan 2.2 interpolates to 32 fps by default, so-# interpolator_model none, at 20 steps. Each LoRA goes to its expert (transformer high / low / both per file); a Mix-# sends both presets' LoRAs. Replicate's fast Wan takes one LoRA per expert (a Mix runs on fal) and makes 81–121 frames.-DOP_FAL = {"interpolator_model": "none", "frames_per_second": 16, "num_inference_steps": 20}+# fal removes its Wan 2.2 line on 2027-01-04: DoP's Wan half runs on Replicate's fast Wan 2.2 (a start frame, and+# last_image for a transition), 16 fps. Each LoRA goes to its expert, one per expert: a Mix's extra LoRAs run on your GPU+# (the composer says so, with "Use it on your GPU"). Replicate makes 81-121 frames, so a 3 s clip is made as 5 s.model("fuobe-dop", "Fuobe DoP", "Fuobe Original", "fuobe-dop", "video","Camera motions and effects with their LoRAs on Wan 2.2: 3 or 5 s at 16 fps",- [("i2v", "fal-ai/wan/v2.2-a14b/image-to-video", "fal", {"loraEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora", "fixed": DOP_FAL, "flf2v": True}),- ("i2v", "wan-video/wan-2.2-i2v-fast", "replicate", {"fixed": WAN22_REPLICATE})],+ [("i2v", "wan-video/wan-2.2-i2v-fast", "replicate", {"fixed": WAN22_REPLICATE, "flf2v": True})],original=True,- pricing=("second", 0.08, "720p on fal; 580p $0.06/s, 480p $0.04/s; with LoRAs $0.10/s",- {"byResolution": {"720p": 0.08, "580p": 0.06, "480p": 0.04}, "withLoras": 0.1}),+ pricing=WAN22_REPLICATE_PRICE,options={"durations": [3, 5]}, defaults={"aspectRatio": "auto", "duration": 5, "resolution": "720p"}, frame_step=4, fit_values=True)# The LTX-2.3 presets (FPV Drone, Wind to Face, the transitions with an end frame) and LTX-2.3's built-in camera LoRA# (camera_lora: dolly, jib, static) for the moves it covers. Prompt expansion off; sound off unless asked.diff --git a/scripts/gen-lora-library.py b/scripts/gen-lora-library.pyindex 5154778c..6abbd3bb 100644--- a/scripts/gen-lora-library.py+++ b/scripts/gen-lora-library.py@@ -57,6 +57,29 @@ DEFAULT_STATUSES = {"add-lora", "replace", "relight-route", "weak-candidate", "lerrors = []notes = []+# The hosted routes the research checked LoRAs on, as they run now: fal removes its Wan 2.1 / 2.2 line on 2027-01-04+# (the Wan 2.2 LoRAs run on Replicate's fast Wan 2.2, one per expert; motion transfer on fal's named successor). Exact+# texts of the research, longest first; the research itself stays as it was read.+HOSTED_NOW = [+ ("fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high, end_image_url, num_frames 17-161)",+ "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, last_image; 81 frames brought to each gap's length)"),+ ("fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast",+ "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"),+ ("fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast",+ "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"),+ ("fal-ai/wan/v2.2-a14b/image-to-video/lora", "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"),+ ("fal-ai/wan/v2.2-14b/animate/move", "minimax/h3-max/recast"),+ ("fal-ai/wan-t2v-lora (T2V only)", "none: your GPU runs it (fal's Wan 2.1 LoRA route leaves with the line)"),+]+++def hosted_now(text):+ """A research hostedEndpoint text with each retired fal Wan route replaced by the one that runs it now."""+ for old, new in HOSTED_NOW:+ if old in text:+ return text.replace(old, new)+ return text+def slug(s):return re.sub(r"^-|-$", "", re.sub(r"[^a-z0-9]+", "-", s.lower()))@@ -127,7 +150,7 @@ def entry(raw, key, group, checked=None, spare=False):out["licence"] = licencefor k in ("released", "hostedEndpoint"):if raw.get(k):- out[k] = raw[k]+ out[k] = hosted_now(raw[k]) if k == "hostedEndpoint" else raw[k]if spare:out["spare"] = True@@ -199,7 +222,7 @@ for m in DATA["motionsEffects"]:"bothEnginesToday": bool(m.get("bothEnginesToday")), "newSinceMid2026": bool(m.get("newSinceMid2026"))}hosted = (m.get("hosted") or {}).get("endpoint")if hosted:- row["hostedEndpoint"] = hosted+ row["hostedEndpoint"] = hosted_now(hosted)motions.append(row)# Adapters: a LoRA an Original's recipe always loads (Fuobe Try-On's try-on LoRA, build plan O10). Its licence is said@@ -289,5 +312,6 @@ ts = ("/** Fuobe Mixed Media's looks (research studios[mixed-media].original.looks): preset id → the LORA_LIBRARY keys its frames are drawn with. */\n"f"export const MIXED_MEDIA_LOOK_LORAS: Record<string, {{ key: string; strength: number }}[]> = {json.dumps(mixed, indent=2, ensure_ascii=False)};\n")-(ROOT / "src/lib/catalog/lora-library.generated.ts").write_text(ts, encoding="utf-8")+# LF on every platform, so a second run leaves the file as it is.+(ROOT / "src/lib/catalog/lora-library.generated.ts").write_text(ts, encoding="utf-8", newline="\n")print(f"wrote {len(library)} LoRAs ({sum(1 for e in library if e['group'] == 'look')} looks), {len(motions)} motion / effect rows, {len(mixed)} Mixed Media looks and {len(planned)} planned own LoRAs")diff --git a/src/components/studio/composer.tsx b/src/components/studio/composer.tsxindex abdaab1c..75853291 100644--- a/src/components/studio/composer.tsx+++ b/src/components/studio/composer.tsx@@ -12,7 +12,7 @@ import { Button } from "@/components/ui/button";import { Kbd } from "@/components/ui/kbd";import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";import { useToday } from "@/hooks/use-today";-import { estimateCost, imageLimit, layoutCanvas, planGeneration, routesFor, type Plan } from "@/lib/catalog/plan";+import { estimateCost, imageLimit, layoutCanvas, mixLimit, planGeneration, routesFor, type Plan } from "@/lib/catalog/plan";import type { Engine, InputSlot, MediaKind, ModelDef, Operation, Preset, PresetRoute, VideoFormat } from "@/lib/catalog/types";import { LYRICS_PARAM, SONG_ID_PARAM, songFormat, songToolProblem, withSongId } from "@/lib/lyrics";import { murekaSongRule, SONG_FIT_OPS } from "@/lib/av/song-fit";@@ -22,7 +22,8 @@ import { FitCropNote, useCropFit } from "@/components/av/fit-crop";import { fitStill, stillEndpoint } from "@/components/av/fit-still";import { portraitRatio } from "@/lib/catalog/clip-windows";import { sampleFitRule, shortName, voiceFitRule } from "@/lib/av/voice-fit";-import { dualEngine, onEngine } from "@/lib/catalog/engines";+import { dualEngine, onEngine, runsOn } from "@/lib/catalog/engines";+import type { Unavailable } from "@/lib/unavailable";import { locksByDefault } from "@/lib/catalog/palettes";import { DEFAULT_LOOK, lookCard } from "@/lib/catalog/soul-cards";import { formatsOf } from "@/lib/av/formats";@@ -1564,6 +1565,17 @@ export function Composer({ docked }: { docked: boolean }) {const own = engine === "open" ? preset.open : preset.cloud;return { here: false, on: scaled(own) && own!.modelId !== model.id ? catalog.getModel(own!.modelId)?.name : undefined };}, [preset, model, engine, has, catalog]);+ // A Mix in the cloud on a model that takes one LoRA per expert (Fuobe DoP and Wan 2.2 A14B on Replicate): a second preset+ // with no LoRA slot left stays in view as unavailable, with the way to run it (mixLimit, src/lib/catalog/plan.ts).+ const mixFits = useMemo(() => {+ if (!preset || !model || engine !== "cloud" || (preset.type !== "motion" && preset.type !== "effect")) return undefined;+ const op = effectiveOp ?? "i2v";+ const gpu = runsOn(model, "open");+ return (second: Preset): Unavailable | undefined => {+ const why = mixLimit(model, engine, op, preset, second);+ return why ? { why, ...(gpu && { fix: { label: "Use it on your GPU", run: () => setEngine("open") } }) } : undefined;+ };+ }, [preset, model, engine, effectiveOp, setEngine]);const styleChips = (<>{(config.presetPicker || (preset && (preset.type === "motion" || preset.type === "effect"))) && (@@ -1578,6 +1590,7 @@ export function Composer({ docked }: { docked: boolean }) {onPreset={pickPreset}onMix={(patch) => setDraft(patch)}engine={engine}+ mixFits={mixFits}/>)}{config.signature && (diff --git a/src/components/studio/preset-chips.tsx b/src/components/studio/preset-chips.tsxindex c61e3004..5ffbdb12 100644--- a/src/components/studio/preset-chips.tsx+++ b/src/components/studio/preset-chips.tsx@@ -9,6 +9,8 @@ import { presetCover } from "@/lib/preset-covers";import { featuredAll } from "@/lib/preset-featured";import { cn } from "@/lib/utils";import { onAttr, TAB_PILL, TabRow } from "@/components/ui/tab-row";+import { UNAVAILABLE_OPTION, UnavailableNote, useUnavailableNote } from "@/components/ui/unavailable";+import type { Unavailable } from "@/lib/unavailable";import { CoverScrollBox, CoverTile, usePickerPlayback } from "@/components/cover-tile";import { PRESET_ICONS } from "@/components/preset-icons";import { usePoolRules } from "@/hooks/use-pool-rules";@@ -28,11 +30,26 @@ import { Chip, ClearableChip } from "./chip";const tileClass = "group flex flex-col items-start gap-1 overflow-hidden rounded-lg p-1 text-left ring-primary transition hover:bg-accent";-function PresetTile({ preset: p, picked, onPick, setup }: { preset: Preset; picked: boolean; onPick: () => void; setup?: OwnSetup | null }) {+function PresetTile({+ preset: p,+ picked,+ onPick,+ setup,+ muted,+ aria,+}: {+ preset: Preset;+ picked: boolean;+ onPick: () => void;+ setup?: OwnSetup | null;+ /** It can't be picked here (the shared unavailable look); pressing it says why. */+ muted?: boolean;+ aria?: Record<string, unknown>;+}) {const { playing, handlers } = usePickerPlayback(p.id, { picked });const PI = PRESET_ICONS[p.look.icon] ?? Film;return (- <button type="button" aria-pressed={picked} onClick={onPick} {...handlers} className={cn(tileClass, picked && "ring-2")}>+ <button type="button" aria-pressed={picked} onClick={onPick} {...handlers} {...aria} className={cn(tileClass, picked && "ring-2", muted && UNAVAILABLE_OPTION)}><CoverTilecover={presetCover(p.id)}playing={playing}@@ -61,6 +78,7 @@ export function PresetGrid({noneLabel,rules,engine,+ unavailable,}: {list: Preset[] | null;value?: string;@@ -68,10 +86,14 @@ export function PresetGrid({noneLabel: string;rules?: PoolRules;engine?: "open" | "cloud";+ /** Why a preset can't be picked here (a Mix that has no LoRA slot left in the cloud), with the way to get it. */+ unavailable?: (p: Preset) => Unavailable | undefined;}) {const [cat, setCat] = useState<string>("All");const box = useRef<HTMLDivElement>(null);const ordered = useMemo(() => (list ? featuredAll(list) : null), [list]);+ const options = useMemo(() => (ordered ?? []).map((p) => ({ value: p.id, unavailable: unavailable?.(p) })), [ordered, unavailable]);+ const note = useUnavailableNote(options);if (!list || !ordered)return (<div className="grid h-40 place-items-center" role="status" aria-label="Loading presets">@@ -109,12 +131,24 @@ export function PresetGrid({)}{ordered.filter((p) => cat === "All" || p.category === cat)- .map((p) => (- <PresetTile key={p.id} preset={p} picked={value === p.id} onPick={() => onPick(p.id)} setup={presetOwnSetup(rules, p, engine)} />- ))}+ .map((p) => {+ const o = options.find((x) => x.value === p.id) ?? { value: p.id };+ return (+ <PresetTile+ key={p.id}+ preset={p}+ picked={value === p.id && !note.isUnavailable(o)}+ onPick={() => note.press(o, (id) => onPick(id))}+ setup={presetOwnSetup(rules, p, engine)}+ muted={note.isUnavailable(o)}+ aria={note.optionProps(o)}+ />+ );+ })}</div></div></CoverScrollBox>+ <UnavailableNote {...note.noteProps} /></>);}@@ -201,6 +235,7 @@ export function MixChip({mix,onChange,engine,+ mixFits,}: {primary: Preset;strength: number;@@ -210,6 +245,8 @@ export function MixChip({onChange: (patch: { presetStrength?: number; mix?: { presetId: string; strength: number } | undefined }) => void;/** The composer's engine: a preset with a cloud route stays on the cloud engine whatever this studio's GPUs run. */engine?: "open" | "cloud";+ /** Why a second preset can't join the first on this model here (one LoRA per expert in the cloud), with the fix. */+ mixFits?: (second: Preset) => Unavailable | undefined;}) {const [open, setOpen] = useState(false);const { chip, side, measure } = usePickerSide();@@ -255,6 +292,7 @@ export function MixChip({<span className="font-medium text-foreground">{primary.name}</span> runs at full strength{strengthOn ? `; its strength can be set on ${strengthOn}` : ""}.</p>)}+ {second && mix && mixFits?.(second) && <UnavailableNote reason={mixFits(second)} onClose={() => undefined} className="mt-0" />}{second && mix && (<div className="space-y-1.5"><div className="flex items-center justify-between text-[12px]">@@ -272,6 +310,7 @@ export function MixChip({rules={rules}engine={engine}noneLabel="No mix"+ unavailable={mixFits}onPick={(id) => onChange({ mix: id ? { presetId: id, strength: mix?.strength ?? 0.6 } : undefined })}/></PopoverContent>@@ -292,6 +331,7 @@ export default function PresetChips({onPreset,onMix,engine,+ mixFits,}: {picker?: "motion" | "effect";preset?: Preset;@@ -305,11 +345,13 @@ export default function PresetChips({onMix: (patch: { presetStrength?: number; mix?: { presetId: string; strength: number } | undefined }) => void;/** The composer's engine (the pickers keep a preset with a cloud route off the open engine only). */engine?: "open" | "cloud";+ /** Why a second preset can't join the first here, with the way to get it (MixChip). */+ mixFits?: (second: Preset) => Unavailable | undefined;}) {return (<>{picker && <PresetChip type={picker} value={presetId} onChange={onPreset} engine={engine} />}- {preset && (preset.type === "motion" || preset.type === "effect") && <MixChip primary={preset} strength={strength} takesStrength={takesStrength} strengthOn={strengthOn} mix={mix} onChange={onMix} engine={engine} />}+ {preset && (preset.type === "motion" || preset.type === "effect") && <MixChip primary={preset} strength={strength} takesStrength={takesStrength} strengthOn={strengthOn} mix={mix} onChange={onMix} engine={engine} mixFits={mixFits} />}</>);}diff --git a/src/lib/catalog/cloud-models.generated.ts b/src/lib/catalog/cloud-models.generated.tsindex 6f7e3113..e3c2990c 100644--- a/src/lib/catalog/cloud-models.generated.ts+++ b/src/lib/catalog/cloud-models.generated.ts@@ -10658,104 +10658,54 @@ export const CLOUD_MODELS: ModelDef[] = ["routes": [{"op": "t2v",- "provider": "fal",- "endpoint": "fal-ai/wan/v2.2-a14b/text-to-video",+ "provider": "replicate",+ "endpoint": "wan-video/wan-2.2-t2v-fast","map": {- "negativePrompt": "negative_prompt","seed": "seed","numFrames": {"key": "num_frames","fps": 16,- "min": 17,- "max": 161,+ "min": 81,+ "max": 121,"step": 4},"aspectRatio": {"key": "aspect_ratio","accepts": ["16:9",- "9:16",- "1:1"+ "9:16"]},"resolution": {"key": "resolution","accepts": ["480p",- "580p","720p"]},"defaults": {- "interpolator_model": "none"+ "interpolate_output": false},"loras": {- "shape": "items",- "key": "loras",- "range": {- "min": 0,- "max": 4+ "shape": "experts",+ "high": {+ "weights": "lora_weights_transformer",+ "scale": "lora_scale_transformer"},- "transformer": "high",- "weightName": true+ "low": {+ "weights": "lora_weights_transformer_2",+ "scale": "lora_scale_transformer_2"+ }}- },- "loraEndpoint": "fal-ai/wan/v2.2-a14b/text-to-video/lora"+ }},{"op": "i2v",- "provider": "fal",- "endpoint": "fal-ai/wan/v2.2-a14b/image-to-video",- "map": {- "negativePrompt": "negative_prompt",- "image": "image_url",- "endImage": "end_image_url",- "seed": "seed",- "numFrames": {- "key": "num_frames",- "fps": 16,- "min": 17,- "max": 161,- "step": 4- },- "aspectRatio": {- "key": "aspect_ratio",- "accepts": [- "auto",- "16:9",- "9:16",- "1:1"- ]- },- "resolution": {- "key": "resolution",- "accepts": [- "480p",- "580p",- "720p"- ]- },- "defaults": {- "interpolator_model": "none"- },- "loras": {- "shape": "items",- "key": "loras",- "range": {- "min": 0,- "max": 4- },- "transformer": "high",- "weightName": true- }- },- "loraEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"- },- {- "op": "t2v","provider": "replicate",- "endpoint": "wan-video/wan-2.2-t2v-fast",+ "endpoint": "wan-video/wan-2.2-i2v-fast","map": {+ "image": "image",+ "endImage": "last_image","seed": "seed","numFrames": {"key": "num_frames",@@ -10764,13 +10714,6 @@ export const CLOUD_MODELS: ModelDef[] = ["max": 121,"step": 4},- "aspectRatio": {- "key": "aspect_ratio",- "accepts": [- "16:9",- "9:16"- ]- },"resolution": {"key": "resolution","accepts": [@@ -10795,7 +10738,7 @@ export const CLOUD_MODELS: ModelDef[] = [}},{- "op": "i2v",+ "op": "flf2v","provider": "replicate","endpoint": "wan-video/wan-2.2-i2v-fast","map": {@@ -10835,24 +10778,15 @@ export const CLOUD_MODELS: ModelDef[] = [],"options": {"durations": [- 3,- 4,- 5,- 6,- 8,- 10+ 6],- "negativePrompt": true,"seed": true,"aspectRatios": ["16:9",- "9:16",- "1:1",- "auto"+ "9:16"],"resolutions": ["480p",- "580p","720p"],"endFrame": true,@@ -10866,19 +10800,17 @@ export const CLOUD_MODELS: ModelDef[] = [},"defaults": {"aspectRatio": "16:9",- "duration": 5,+ "duration": 6,"resolution": "720p"},"pricing": {- "unit": "second",- "usd": 0.08,- "note": "720p on fal; 580p $0.06/s, 480p $0.04/s; with LoRAs $0.10/s",+ "unit": "video",+ "usd": 0.11,+ "note": "per clip of 81 frames at 720p on Replicate ($0.10 from words); 480p $0.05","byResolution": {- "720p": 0.08,- "580p": 0.06,- "480p": 0.04- },- "withLoras": 0.1+ "720p": 0.11,+ "480p": 0.05+ }}},{@@ -23884,108 +23816,44 @@ export const ORIGINAL_CLOUD: ModelDef[] = ["routes": [{"op": "i2v",- "provider": "fal",- "endpoint": "fal-ai/wan/v2.2-a14b/image-to-video",+ "provider": "replicate",+ "endpoint": "wan-video/wan-2.2-i2v-fast","map": {- "negativePrompt": "negative_prompt",- "image": "image_url",- "endImage": "end_image_url",+ "image": "image",+ "endImage": "last_image","seed": "seed","numFrames": {"key": "num_frames","fps": 16,- "min": 17,- "max": 161,+ "min": 81,+ "max": 121,"step": 4},- "aspectRatio": {- "key": "aspect_ratio",- "accepts": [- "auto",- "16:9",- "9:16",- "1:1"- ]- },"resolution": {"key": "resolution","accepts": ["480p",- "580p","720p"]},"fixed": {- "interpolator_model": "none",- "frames_per_second": 16,- "num_inference_steps": 20+ "interpolate_output": false},"loras": {- "shape": "items",- "key": "loras",- "range": {- "min": 0,- "max": 4+ "shape": "experts",+ "high": {+ "weights": "lora_weights_transformer",+ "scale": "lora_scale_transformer"},- "transformer": "high",- "weightName": true+ "low": {+ "weights": "lora_weights_transformer_2",+ "scale": "lora_scale_transformer_2"+ }}- },- "loraEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ }},{"op": "flf2v",- "provider": "fal",- "endpoint": "fal-ai/wan/v2.2-a14b/image-to-video",- "map": {- "negativePrompt": "negative_prompt",- "image": "image_url",- "endImage": "end_image_url",- "seed": "seed",- "numFrames": {- "key": "num_frames",- "fps": 16,- "min": 17,- "max": 161,- "step": 4- },- "aspectRatio": {- "key": "aspect_ratio",- "accepts": [- "auto",- "16:9",- "9:16",- "1:1"- ]- },- "resolution": {- "key": "resolution",- "accepts": [- "480p",- "580p",- "720p"- ]- },- "fixed": {- "interpolator_model": "none",- "frames_per_second": 16,- "num_inference_steps": 20- },- "loras": {- "shape": "items",- "key": "loras",- "range": {- "min": 0,- "max": 4- },- "transformer": "high",- "weightName": true- }- },- "loraEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"- },- {- "op": "i2v","provider": "replicate","endpoint": "wan-video/wan-2.2-i2v-fast","map": {@@ -24028,18 +23896,10 @@ export const ORIGINAL_CLOUD: ModelDef[] = [3,5],- "negativePrompt": true,"seed": true,"endFrame": true,- "aspectRatios": [- "auto",- "16:9",- "9:16",- "1:1"- ],"resolutions": ["480p",- "580p","720p"],"maxImages": 1@@ -24056,15 +23916,13 @@ export const ORIGINAL_CLOUD: ModelDef[] = ["resolution": "720p"},"pricing": {- "unit": "second",- "usd": 0.08,- "note": "720p on fal; 580p $0.06/s, 480p $0.04/s; with LoRAs $0.10/s",+ "unit": "video",+ "usd": 0.11,+ "note": "per clip of 81 frames at 720p on Replicate ($0.10 from words); 480p $0.05","byResolution": {- "720p": 0.08,- "580p": 0.06,- "480p": 0.04- },- "withLoras": 0.1+ "720p": 0.11,+ "480p": 0.05+ }}},{diff --git a/src/lib/catalog/lora-library.generated.ts b/src/lib/catalog/lora-library.generated.tsindex df413b16..365c5e2e 100644--- a/src/lib/catalog/lora-library.generated.ts+++ b/src/lib/catalog/lora-library.generated.ts@@ -1792,7 +1792,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-08-18",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2126538-camera-tilt-up-overhead",@@ -1822,7 +1822,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-08-18",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2151623-camera-tilt-down-undershot-v2",@@ -1852,7 +1852,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-08-26",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2151680-camera-tilt-down-undershot-v2",@@ -1882,7 +1882,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-08-26",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2912574-shaky-handheld-camera",@@ -1912,7 +1912,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2026-05-02",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2379256-luisap-extreme-handheld-camera",@@ -1942,7 +1942,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-05",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-3203908-headmounted-camera-headbob",@@ -1971,7 +1971,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2026-08-06",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2382055-luisap-extreme-bodycam",@@ -2001,7 +2001,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-06",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2382131-luisap-extreme-bodycam",@@ -2031,7 +2031,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-06",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2425167-first-person-pov-parkour",@@ -2060,7 +2060,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-21",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2425177-first-person-pov-parkour",@@ -2089,7 +2089,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-21",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2338590-luisap-driving-crazy",@@ -2119,7 +2119,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-10-22",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2155019-flow-camera",@@ -2148,7 +2148,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-08-27",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2180985-circular-shooting",@@ -2177,7 +2177,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-09-04",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "wan22-14b-i2v-orbit-high-noise",@@ -2201,7 +2201,7 @@ export const LORA_LIBRARY: LoraEntry[] = ["name": "Apache-2.0"},"released": "2025-08-20",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "wan22-14b-i2v-orbit-low-noise",@@ -2225,7 +2225,7 @@ export const LORA_LIBRARY: LoraEntry[] = ["name": "Apache-2.0"},"released": "2025-08-20",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "ltx2-3-fpv-motion",@@ -2373,7 +2373,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-12-10",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2490837-wiggle-redmond",@@ -2402,7 +2402,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-12-10",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2376012-explosion-redmond",@@ -2431,7 +2431,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-04",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2376017-explosion-redmond",@@ -2460,7 +2460,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-04",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2350486-luisap-nuke",@@ -2490,7 +2490,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-10-26",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2269611-wan-video-burst-effect",@@ -2519,7 +2519,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-10-01",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2269626-wan-video-burst-effect",@@ -2548,7 +2548,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-10-01",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2124764-wan-2-2-low-frozen-effects",@@ -2576,7 +2576,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-08-18",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2481353-metalcification-redmond",@@ -2605,7 +2605,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-12-07",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2481351-metalcification-redmond",@@ -2634,7 +2634,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-12-07",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2341106-luisap-glitch-and-argue-soft",@@ -2664,7 +2664,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-10-23",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2341111-luisap-glitch-and-argue-soft",@@ -2694,7 +2694,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-10-23",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2368440-luisap-fly-away",@@ -2724,7 +2724,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-02",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2368441-luisap-fly-away",@@ -2754,7 +2754,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-02",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-2154508-item-decomposition",@@ -2783,7 +2783,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-08-27",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "ltx-2-5-xpldv-v5-lora",@@ -2835,7 +2835,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-19",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2421166-wan2-2-coin-fountain",@@ -2864,7 +2864,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-19",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "civitai-3156988-lana-wind-motion-ltx-2-3",@@ -2952,7 +2952,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-11-14",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2483698-thunderhero-redmond",@@ -2981,7 +2981,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-12-08",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, the high-noise expert)"},{"key": "civitai-2483693-thunderhero-redmond",@@ -3010,7 +3010,7 @@ export const LORA_LIBRARY: LoraEntry[] = []},"released": "2025-12-08",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=low); Replicate wan-video/wan-2.2-i2v-fast"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer_2, the low-noise expert)"},{"key": "fire-12-epochs",@@ -3034,7 +3034,7 @@ export const LORA_LIBRARY: LoraEntry[] = ["name": "Apache-2.0"},"released": "2025",- "hostedEndpoint": "fal-ai/wan-t2v-lora (T2V only)"+ "hostedEndpoint": "none: your GPU runs it (fal's Wan 2.1 LoRA route leaves with the line)"},{"key": "qwen-image-edit-2509-relight",@@ -3365,7 +3365,7 @@ export const LORA_LIBRARY: LoraEntry[] = ["name": "Apache-2.0 (bilibili's Index-AniSora weights: GitHub bilibili/Index-anisora LICENSE and the HF card IndexTeam/Index-anisora, V3.2 released 2025-09-23); Kijai's rank-64 extraction repository states no licence of its own"},"released": "2025-09-27",- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora (transformer=high, end_image_url, num_frames 17-161)"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (lora_weights_transformer, last_image; 81 frames brought to each gap's length)"},{"key": "wan22-i2v-lightx2v-4step-low",@@ -3405,7 +3405,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3419,7 +3419,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3434,7 +3434,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": true,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3447,7 +3447,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3461,7 +3461,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": true,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3476,7 +3476,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3490,7 +3490,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3504,7 +3504,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3519,7 +3519,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3533,7 +3533,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3548,7 +3548,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "motion",@@ -3795,7 +3795,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = ["loras": [],"bothEnginesToday": false,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-14b/animate/move or fal-ai/scail-2 (mode=animation)"+ "hostedEndpoint": "minimax/h3-max/recast or fal-ai/scail-2 (mode=animation)"},{"kind": "effect",@@ -3810,7 +3810,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -3823,7 +3823,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -3838,7 +3838,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -3851,7 +3851,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -3865,7 +3865,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -3880,7 +3880,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -3896,7 +3896,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -3910,7 +3910,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": true,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -3924,7 +3924,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -3989,7 +3989,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -4023,7 +4023,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": false,- "hostedEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",@@ -4073,7 +4073,7 @@ export const MOTION_EFFECT_LORAS: MotionEffectLoras[] = [],"bothEnginesToday": true,"newSinceMid2026": true,- "hostedEndpoint": "fal-ai/qwen-image-edit-plus-lora (relight the start frame) then fal-ai/wan/v2.2-a14b/image-to-video/lora"+ "hostedEndpoint": "fal-ai/qwen-image-edit-plus-lora (relight the start frame) then Replicate wan-video/wan-2.2-i2v-fast (one LoRA per expert)"},{"kind": "effect",diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.tsindex 9b8fbb97..76eef3be 100644--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@ -2954,7 +2954,7 @@ const originals: ModelDef[] = [// Frames mode: one start/end-frame clip per pair of frames, the motion's LoRAs on each, then joined.KEYFRAME_FILM,],- tagline: "Camera motions and effects with their LoRAs on Wan 2.2 · free on your GPU (24 GB), or hosted on fal",+ tagline: "Camera motions and effects with their LoRAs on Wan 2.2 · free on your GPU (24 GB), or hosted on Replicate",options: DOP_OPTIONS,}),// 480p on the user's GPU (720p takes about three times as long); 720p in the cloud, where a run with LoRAs costs the same.diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.tsindex 13ce6146..3b798ce0 100644--- a/src/lib/catalog/plan.ts+++ b/src/lib/catalog/plan.ts@@ -18,7 +18,7 @@ import type {import { billedClipSeconds, editClipsProblem, insertRangeProblem, sourceSeconds } from "./clip-windows";import { chainGapProblem, chainTiming, FIRST_AT_ZERO, frameTimes, keyframeChain, MAX_KEYFRAMES, spread } from "./keyframes";import { requestTiming } from "@/lib/inbetween";-import { cloudPath, fitLoras, gated, localOnly, loraCapacity, needsToken, routeLoraField, triggerOf } from "./loras";+import { cloudPath, fitLoras, gated, localOnly, loraCapacity, lorasFit, needsToken, routeLoraField, triggerOf } from "./loras";import { anglesPrompt, anglesWords, ANGLES_ORIGINAL } from "./open-tools";import { qmaRunPrompt } from "@/lib/qma";import { askedSize, clipWords, fitLength, fitValue, numFramesValue, sizeValue } from "./payload";@@ -341,6 +341,22 @@ export function mixLoras(second: Preset, modelId: string, engine: Engine, strengreturn { loras: loras.map((l) => ({ ...l, strength: round2((l.strength ?? 1) * k) })), trigger: triggerOf(loras) };}+/**+ * Why a Mix's second preset can't join the first on this model in the cloud, or undefined when it can: a route that takes+ * one LoRA per expert (Replicate's fast Wan 2.2, where Fuobe DoP and Wan 2.2 A14B run in the cloud) has no slot left for+ * the second preset's LoRA when the first's already holds that expert. On the GPU every LoRA loads.+ */+export function mixLimit(model: ModelDef, engine: Engine, op: Operation, primary: Preset, second: Preset): string | undefined {+ if (engine !== "cloud") return undefined;+ const route = (model.routes ?? []).find((r) => r.op === op && r.provider !== "comfyui" && r.provider !== "mock");+ if (!route || routeLoraField(route)?.shape !== "experts") return undefined;+ const own = presetRoute(primary, "cloud");+ const first = own?.modelId === model.id ? (own.loras ?? []) : [];+ const extra = mixLoras(second, model.id, "cloud", 1).loras;+ if (!extra.length || lorasFit(route, [...first, ...extra])) return undefined;+ return `${model.name} in the cloud takes one LoRA per expert (high and low noise), so ${second.name} can't join ${primary.name} there`;+}+export interface Plan {model: ModelDef;op: Operation;diff --git a/tests/cinema.test.ts b/tests/cinema.test.tsindex 6f62acad..13b40ae4 100644--- a/tests/cinema.test.ts+++ b/tests/cinema.test.ts@@ -323,8 +323,8 @@ describe("planCinema", () => {expect(arc.steps[0].request.prompt).toMatch(/^orbit 360\. /);expect(arc.notes.join(" ")).toMatch(/made for Wan 2.2, so this take runs on Fuobe DoP/);expect(arc.steps[0].request.params!.duration).toBe(5);- // Wan 2.2 A14B with LoRAs: $0.10/s.- expect(arc.costUsd).toBeCloseTo(2 * 5 * 0.1, 3);+ // Replicate's fast Wan 2.2 with the move's LoRA: $0.11 a clip at 720p, two takes.+ expect(arc.costUsd).toBeCloseTo(2 * 0.11, 3);const t2v = planCinema(base({ moves: ["arc-left"] }), ctx);expect(t2v.model.id).toBe("fuobe-cinema");expect(t2v.notes.join(" ")).toMatch(/add a start frame to drive it with its camera LoRA$/);diff --git a/tests/dop-originals.test.ts b/tests/dop-originals.test.tsindex 92e8837c..d9d4b29c 100644--- a/tests/dop-originals.test.ts+++ b/tests/dop-originals.test.ts@@ -14,9 +14,10 @@ const { setSetting } = await import("@/server/settings");const { createGenerations, previewGeneration } = await import("@/server/generations");const { prepareWorkflow } = await import("@/server/providers/comfyui");const { falProvider } = await import("@/server/providers/fal");+const { replicateProvider } = await import("@/server/providers/replicate");const { EFFECTS, getModel, getPreset, modelsFor, MOTIONS } = await import("@/lib/catalog");const { onEngine } = await import("@/lib/catalog/engines");-const { estimateCost, planGeneration, routesFor } = await import("@/lib/catalog/plan");+const { estimateCost, mixLimit, planGeneration, routesFor } = await import("@/lib/catalog/plan");const { engineSwitchModel, followEngineParams, presetModel, presetOriginal, presetParams, prestepCost } = await import("@/lib/composer");const { gradeOf, nextSteps } = await import("@/lib/output-actions");const { lorasFit } = await import("@/lib/catalog/loras");@@ -33,6 +34,24 @@ const plan = (engine: "open" | "cloud", req: Partial<GenerationRequest> & { pres};const falRoute = (m: ModelDef, op = "i2v") => m.routes.find((r) => r.provider === "fal" && r.op === op)!;+const replicateRoute = (m: ModelDef, op = "i2v") => m.routes.find((r) => r.provider === "replicate" && r.op === op)!;++/** Submit through the Replicate adapter and return the URL and the prediction's input. */+async function submitReplicate(model: ModelDef, route: ModelRoute, input: GenInput): Promise<{ url: string; input: Record<string, unknown> }> {+ const real = globalThis.fetch;+ let seen: { url: string; input: Record<string, unknown> } | undefined;+ globalThis.fetch = (async (url: string, init?: RequestInit) => {+ seen = { url: String(url), input: JSON.parse(String(init?.body ?? "{}")).input ?? {} };+ return new Response(JSON.stringify({ id: "p1" }), { status: 201 });+ }) as typeof fetch;+ try {+ await replicateProvider.submit({ generationId: "g", model, route, input });+ } finally {+ globalThis.fetch = real;+ }+ return seen!;+}+/** Submit through the fal adapter and return the URL and JSON body it posted. */async function submit(model: ModelDef, route: ModelRoute, input: GenInput): Promise<{ url: string; body: Record<string, unknown> }> {const real = globalThis.fetch;@@ -62,7 +81,8 @@ describe("Fuobe DoP on both engines", () => {const m = getModel("fuobe-dop")!;expect(m.engines).toEqual(["open", "cloud"]);expect(view("fuobe-dop", "open").routes.map((r) => [r.op, r.endpoint])).toEqual([["i2v", "wan22-i2v-14b"], ["flf2v", "wan22-flf2v-14b"], ["keyframes", "wan22-flf2v-14b"]]);- expect(new Set(view("fuobe-dop", "cloud").routes.map((r) => r.provider))).toEqual(new Set(["fal", "replicate"]));+ // fal removes its Wan 2.2 A14B line on 2027-01-04: the cloud half is Replicate's fast Wan 2.2 alone.+ expect(new Set(view("fuobe-dop", "cloud").routes.map((r) => r.provider))).toEqual(new Set(["replicate"]));expect(view("fuobe-dop", "open").defaults).toMatchObject({ resolution: "480p", duration: 5, aspectRatio: "auto" });expect(view("fuobe-dop", "cloud").defaults).toMatchObject({ resolution: "720p", duration: 5 });expect(view("fuobe-dop-ltx", "open").routes.map((r) => [r.op, r.endpoint])).toEqual([["i2v", "ltx23-i2v-lora"], ["flf2v", "ltx23-flf2v-lora"]]);@@ -73,28 +93,30 @@ describe("Fuobe DoP on both engines", () => {expect(() => plan("open", { inputs: undefined, prompt: "a slow push in" })).toThrow(/start frame/);});- it("sends 49 or 81 frames at 16 fps with interpolation off and 20 steps, each LoRA on its expert", async () => {+ it("sends 81 frames at 16 fps with interpolation off, each LoRA on its expert, on Replicate's fast Wan 2.2", async () => {const m = view("fuobe-dop", "cloud");const p = plan("cloud", { presetId: "motion-overhead" });expect(p.loras.map((l) => l.target)).toEqual(["high", "low"]);const loras = p.loras.map((l) => ({ ...l, hostedUrl: `https://v3.fal.media/files/${l.version}.safetensors` }));- for (const [duration, frames] of [[5, 81], [3, 49]] as const) {- const { url, body } = await submit(m, falRoute(m), { ...p.params, duration, prompt: p.prompt, images: ["https://fal.media/a.png"], loras });- expect(url).toContain("fal-ai/wan/v2.2-a14b/image-to-video/lora");- expect(body).toMatchObject({ num_frames: frames, frames_per_second: 16, interpolator_model: "none", num_inference_steps: 20, resolution: "720p" });- expect((body.loras as { transformer: string }[]).map((l) => l.transformer)).toEqual(["high", "low"]);+ // Replicate makes 81-121 frames: a 3 s clip is made as 5 s.+ for (const duration of [5, 3]) {+ const { url, input } = await submitReplicate(m, replicateRoute(m), { ...p.params, duration, prompt: p.prompt, images: ["https://fal.media/a.png"], loras });+ expect(url).toContain("wan-video/wan-2.2-i2v-fast");+ expect(input).toMatchObject({ num_frames: 81, interpolate_output: false, resolution: "720p" });+ expect(input.lora_weights_transformer).toBe(loras[0].hostedUrl);+ expect(input.lora_weights_transformer_2).toBe(loras[1].hostedUrl);}- // Without a LoRA (a move on its words, Fuobe DoP picked) the plain endpoint, at the same frame rate.+ // Without a LoRA (a move on its words, Fuobe DoP picked): no LoRA fields.const words = plan("cloud", { presetId: "motion-whip-pan" }, "fuobe-dop");- const plain = await submit(m, falRoute(m), { ...words.params, prompt: words.prompt, images: ["https://fal.media/a.png"] });- expect(plain.url).toMatch(/fal-ai\/wan\/v2\.2-a14b\/image-to-video$/);- expect(plain.body).toMatchObject({ num_frames: 81, frames_per_second: 16, interpolator_model: "none" });+ const plain = await submitReplicate(m, replicateRoute(m), { ...words.params, prompt: words.prompt, images: ["https://fal.media/a.png"] });+ expect(plain.input).toMatchObject({ num_frames: 81, interpolate_output: false });+ expect(plain.input).not.toHaveProperty("lora_weights_transformer");});- it("prices the clip: free on the GPU, the LoRA endpoint's $0.10/s in the cloud", () => {+ it("prices the clip: free on the GPU, Replicate's price per clip in the cloud", () => {const p = plan("cloud", { presetId: "motion-overhead" });- expect(estimateCost(view("fuobe-dop", "cloud"), p.params, 1, "i2v", true)).toBeCloseTo(0.5);- expect(estimateCost(view("fuobe-dop", "cloud"), { ...p.params, duration: 3 }, 1, "i2v", true)).toBeCloseTo(0.3);+ expect(estimateCost(view("fuobe-dop", "cloud"), p.params, 1, "i2v", true)).toBeCloseTo(0.11);+ expect(estimateCost(view("fuobe-dop", "cloud"), { ...p.params, duration: 3, resolution: "480p" }, 1, "i2v", true)).toBeCloseTo(0.05);expect(estimateCost(view("fuobe-dop", "open"), p.params, 1, "i2v")).toBe(0);});});@@ -107,11 +129,14 @@ describe("Mix on both engines", () => {expect(p.loras.slice(2).every((l) => /explosion-redmond/.test(l.file))).toBe(true);expect(p.prompt).toMatch(/Also, more subtly: explosion, /);}- // Two Wan 2.2 pairs fit fal's list, not Replicate's one LoRA per expert: the run goes to fal.+ // Two Wan 2.2 pairs don't fit Replicate's one LoRA per expert: in the cloud the Mix's second preset is unavailable,+ // with the reason (the composer adds "Use it on your GPU"); on the GPU both load.const both = plan("cloud", { presetId: "motion-overhead", mix: { presetId: "effect-building-explosion", strength: 0.5 } });const m = view("fuobe-dop", "cloud");- expect(lorasFit(falRoute(m), both.loras)).toBe(true);- expect(lorasFit(m.routes.find((r) => r.provider === "replicate")!, both.loras)).toBe(false);+ expect(lorasFit(replicateRoute(m), both.loras)).toBe(false);+ const dop = getModel("fuobe-dop")!;+ expect(mixLimit(dop, "cloud", "i2v", getPreset("motion-overhead")!, getPreset("effect-building-explosion")!)).toMatch(/one LoRA per expert/);+ expect(mixLimit(dop, "open", "i2v", getPreset("motion-overhead")!, getPreset("effect-building-explosion")!)).toBeUndefined();});it("joins a preset whose LoRA is for another base as words, and says so", () => {@@ -340,7 +365,7 @@ describe("review fixes", () => {const p = plan("cloud", { presetId: "motion-wiggle" }, "fuobe-dop");expect(p.loras).toEqual([]);expect(p.prompt.startsWith("Wiggle. ")).toBe(false);- expect(estimateCost(view("fuobe-dop", "cloud"), p.params, 1, "i2v", false)).toBeCloseTo(0.4);+ expect(estimateCost(view("fuobe-dop", "cloud"), p.params, 1, "i2v", false)).toBeCloseTo(0.11);});it("leads with a LoRA's trigger once, without its full stop or brackets", () => {@@ -360,7 +385,7 @@ describe("review fixes", () => {const p = previewGeneration(req);expect(p.route).toMatchObject({ provider: "replicate" });expect(p.notes?.join(" ")).toMatch(/about 5 s, not 3 s/);- expect(p.costUsd).toBeCloseTo(0.4);+ expect(p.costUsd).toBeCloseTo(0.11);} finally {setSetting("replicateToken", "");}diff --git a/tests/eval-harness.test.ts b/tests/eval-harness.test.tsindex da40b1c8..7ab2fcac 100644--- a/tests/eval-harness.test.ts+++ b/tests/eval-harness.test.ts@@ -348,6 +348,8 @@ describe("the runner on the demo provider", () => {type Plan = { jobs: { case: string; variant: string; model: string; skip?: string; costUsd?: number | null }[] };const dry = async (args: string[]) => JSON.parse((await cli(["run", ...args, "--dry-run", "--json"])).stdout) as Plan;setSetting("falKey", "fal-test-key");+ // Fuobe DoP's cloud half runs on Replicate's fast Wan 2.2.+ setSetting("replicateToken", "rep-test-token");// Group swap, Scene edit, From picture and Finish run on your GPU only: on the cloud their jobs say so and skip.const cloud = (p: Plan) => {const gpu = p.jobs.filter((j) => j.skip === "runs on open only");@@ -446,6 +448,7 @@ describe("the runner on the demo provider", () => {expect(open.jobs.every((j) => j.skip === "the partner variant runs on cloud only")).toBe(true);} finally {setSetting("falKey", "");+ setSetting("replicateToken", "");}});@@ -548,6 +551,8 @@ describe("the runner on the demo provider", () => {expect(rows.every((x) => (x.request as { modelId: string }).modelId === "fuobe-cinema")).toBe(true);type Plan = { jobs: { case: string; variant: string; model: string; skip?: string }[] };setSetting("falKey", "fal-test-key");+ // The wan variant's Wan 2.2 A14B runs on Replicate.+ setSetting("replicateToken", "rep-test-token");try {const plan = JSON.parse((await cli(["run", "--suite", "cinema", "--engine", "cloud", "--cases", "cinema/move-dolly-in", "--variants", "original,words,expansion,wan", "--dry-run", "--json"])).stdout) as Plan;const by = Object.fromEntries(plan.jobs.map((j) => [j.variant, j]));@@ -559,6 +564,7 @@ describe("the runner on the demo provider", () => {expect(open.jobs.every((j) => !!j.skip)).toBe(true);} finally {setSetting("falKey", "");+ setSetting("replicateToken", "");}});diff --git a/tests/fal-lora.test.ts b/tests/fal-lora.test.tsindex e15265f6..e024d409 100644--- a/tests/fal-lora.test.ts+++ b/tests/fal-lora.test.ts@@ -27,7 +27,47 @@ async function submit(route: ModelRoute, input: GenInput): Promise<{ url: stringreturn seen!;}+/**+ * fal's Wan 2.2 A14B routes as the catalog generated them until fal removed its Wan 2.2 line (2027-01-04; Wan 2.2 A14B runs+ * on Replicate now): the payload code's items-with-transformer LoRA shape, kept under test on them.+ */+const FAL_WAN22: Record<string, ModelRoute> = {+ t2v: {+ op: "t2v",+ provider: "fal",+ endpoint: "fal-ai/wan/v2.2-a14b/text-to-video",+ loraEndpoint: "fal-ai/wan/v2.2-a14b/text-to-video/lora",+ map: {+ negativePrompt: "negative_prompt",+ seed: "seed",+ numFrames: { key: "num_frames", fps: 16, min: 17, max: 161, step: 4 },+ aspectRatio: { key: "aspect_ratio", accepts: ["16:9", "9:16", "1:1"] },+ resolution: { key: "resolution", accepts: ["480p", "580p", "720p"] },+ defaults: { interpolator_model: "none" },+ loras: { shape: "items", key: "loras", range: { min: 0, max: 4 }, transformer: "high", weightName: true },+ },+ },+ i2v: {+ op: "i2v",+ provider: "fal",+ endpoint: "fal-ai/wan/v2.2-a14b/image-to-video",+ loraEndpoint: "fal-ai/wan/v2.2-a14b/image-to-video/lora",+ map: {+ negativePrompt: "negative_prompt",+ image: "image_url",+ endImage: "end_image_url",+ seed: "seed",+ numFrames: { key: "num_frames", fps: 16, min: 17, max: 161, step: 4 },+ aspectRatio: { key: "aspect_ratio", accepts: ["auto", "16:9", "9:16", "1:1"] },+ resolution: { key: "resolution", accepts: ["480p", "580p", "720p"] },+ defaults: { interpolator_model: "none" },+ loras: { shape: "items", key: "loras", range: { min: 0, max: 4 }, transformer: "high", weightName: true },+ },+ },+};+const route = (modelId: string, op: string, provider = "fal") => {+ if (modelId === "wan-2-2-a14b-cloud" && provider === "fal") return FAL_WAN22[op];const r = getModel(modelId)?.routes.find((x) => x.op === op && x.provider === provider);if (!r) throw new Error(`${modelId} has no ${provider} ${op} route`);return r;@@ -137,9 +177,10 @@ describe("fal LoRA payloads (generated FieldMap.loras)", () => {expect(z.pricing).toMatchObject({ unit: "megapixel", usd: 0.005, withLoras: 0.0085 });expect(estimateCost(z, {}, 1, "t2i")).toBe(0.005);expect(estimateCost(z, {}, 1, "t2i", true)).toBe(0.009);+ // Replicate's fast Wan 2.2 bills the clip, LoRAs or not.const wan = getModel("wan-2-2-a14b-cloud")!;- expect(estimateCost(wan, { duration: 5, resolution: "480p" }, 1, "i2v")).toBe(0.2);- expect(estimateCost(wan, { duration: 5, resolution: "480p" }, 1, "i2v", true)).toBe(0.5);+ expect(estimateCost(wan, { duration: 5, resolution: "480p" }, 1, "i2v")).toBe(0.05);+ expect(estimateCost(wan, { duration: 5, resolution: "480p" }, 1, "i2v", true)).toBe(0.05);});it("keeps frame counts in the 4n+1 / 8n+1 form inside the API's limits", () => {diff --git a/tests/oss-loras.test.ts b/tests/oss-loras.test.tsindex 327d158a..e98e27be 100644--- a/tests/oss-loras.test.ts+++ b/tests/oss-loras.test.ts@@ -163,13 +163,13 @@ describe("every motion and effect on Fuobe DoP", () => {expect(wiggle.cloud!.loras).toBeUndefined();expect(wiggle.cloud!.promptTemplate).toBeUndefined();expect(wiggle.parity).toBe("On your GPU, Fuobe DoP uses a style trained for this move.");- // Sent to fal (a Mix, a hand-made request), it goes (its licence is on Thanks & licences)...- const fal = getModel(DOP_MODEL)!.routes.find((r) => r.provider === "fal" && r.op === "i2v")!;- const sent = fitLoras(wiggle.open!.loras ?? [], fal);+ // Sent to the cloud (a hand-made request; Replicate's fast Wan 2.2, one per expert), it goes (its licence is on Thanks & licences)...+ const cloud = getModel(DOP_MODEL)!.routes.find((r) => r.provider === "replicate" && r.op === "i2v")!;+ const sent = fitLoras(wiggle.open!.loras ?? [], cloud);expect(sent.loras).toHaveLength(2);expect(sent.notes).toEqual([]);// ...unless Settings → Models & licences keeps such LoRAs on the GPU.- const kept = fitLoras((wiggle.open!.loras ?? []).map((l) => ({ ...l, keepOnGpu: true as const })), fal);+ const kept = fitLoras((wiggle.open!.loras ?? []).map((l) => ({ ...l, keepOnGpu: true as const })), cloud);expect(kept.loras).toEqual([]);expect(kept.notes.join(" ")).toMatch(/keeps such LoRAs off the cloud/);});diff --git a/tests/replicate-lora.test.ts b/tests/replicate-lora.test.tsindex 83367eaa..162240a7 100644--- a/tests/replicate-lora.test.ts+++ b/tests/replicate-lora.test.ts@@ -82,21 +82,21 @@ describe("Replicate LoRA payloads", () => {expect(body.input).toMatchObject({ image: ["https://x/a.png"], lora_weights: expect.stringContaining("relight"), lora_scale: 0.9 });});- it("runs a Mix on fal when Replicate's one-per-expert model can't carry it, even with Replicate preferred", () => {+ it("runs a Mix on Replicate's one-per-expert model, the LoRA with no expert left out with the reason", () => {setSetting("falKey", "id:secret");setSetting("replicateToken", "r8_test");- setSetting("cloudProvider", "replicate");setSetting("demoMode", "auto");+ // fal's Wan 2.2 A14B is gone (2027-01-04): Replicate's fast Wan 2.2 is the only cloud route, whatever the LoRAs.const routes = getModel("wan-2-2-a14b-cloud")!.routes.filter((r) => r.op === "i2v");const one = [hf("motion_high.safetensors", { target: "high" })];const mix = [...one, hf("effect_high.safetensors", { target: "high" })];expect(chooseRoute(routes, 1, one).route.provider).toBe("replicate");- expect(chooseRoute(routes, 1, mix).route.provider).toBe("fal");- // A LoRA licensed for the GPU only goes to the cloud like any other (licences are information)...- const wiggle = loraRef(loraEntry("civitai-2490836-wiggle-redmond")!);- expect(chooseRoute(routes, 1, [...one, wiggle]).route.provider).toBe("fal");- // ...and doesn't count while Settings → Models & licences keeps such LoRAs on the GPU (the run marks them).- expect(chooseRoute(routes, 1, [...one, { ...wiggle, keepOnGpu: true }]).route.provider).toBe("replicate");+ expect(chooseRoute(routes, 1, mix).route.provider).toBe("replicate");+ const fit = fitLoras(mix, routes[0]);+ expect(fit.loras.map((l) => l.file)).toEqual(["motion_high.safetensors"]);+ expect(fit.notes.join(" "), fit.notes.join(" ")).toMatch(/one LoRA per expert/);+ // A high and a low one fit side by side.+ expect(fitLoras([...one, hf("effect_low.safetensors", { target: "low" })], routes[0]).loras).toHaveLength(2);});it("wan-2.2 t2v fast: stays at 16 fps (interpolate_output off) and gets only values it takes", async () => {@@ -107,8 +107,9 @@ describe("Replicate LoRA payloads", () => {expect(body.input).toMatchObject({ interpolate_output: false, aspect_ratio: "16:9", resolution: "480p", num_frames: 81 });const i2v = await submit(route("wan-2-2-a14b-cloud", "i2v"), { prompt: "go", images: ["https://x/a.png"], resolution: "720p", duration: 5 });expect(i2v.body.input).toMatchObject({ interpolate_output: false, resolution: "720p" });- // fal's routes take every value the model offers.- expect(route("wan-2-2-a14b-cloud", "t2v", "fal").map?.resolution).toEqual({ key: "resolution", accepts: ["480p", "580p", "720p"] });+ // Replicate is its only route now: the model offers what Replicate makes.+ expect(getModel("wan-2-2-a14b-cloud")!.routes.every((r) => r.provider === "replicate")).toBe(true);+ expect(getModel("wan-2-2-a14b-cloud")!.options.resolutions).toEqual(["480p", "720p"]);});it("qwen-image-edit-2511: an aspect ratio Replicate lacks goes as the nearest one it takes", async () => {@@ -117,18 +118,14 @@ describe("Replicate LoRA payloads", () => {expect((body.input as Record<string, unknown>).aspect_ratio).toBe("16:9");});- it("prefers a route that makes the length asked, and says what a route that can't makes", () => {- setSetting("falKey", "id:secret");+ it("says what Replicate's fast Wan 2.2 makes when the length asked is outside its 81–121 frames", () => {+ setSetting("falKey", "");setSetting("replicateToken", "r8_test");setSetting("cloudProvider", "replicate");setSetting("demoMode", "auto");const routes = getModel("wan-2-2-a14b-cloud")!.routes.filter((r) => r.op === "i2v");- // Replicate's fast model renders 81–121 frames (5–7.5 s at 16 fps); fal's 17–161.- expect(chooseRoute(routes, 1, [], 5).route.provider).toBe("replicate");- expect(chooseRoute(routes, 1, [], 10).route.provider).toBe("fal");- expect(chooseRoute(routes, 1, [], 3).route.provider).toBe("fal");- // Only Replicate connected: it runs, and the plan says the clip is shorter than asked.- setSetting("falKey", "");+ // Replicate's fast model renders 81–121 frames (5–7.5 s at 16 fps), its only route.+ for (const s of [3, 5, 10]) expect(chooseRoute(routes, 1, [], s).route.provider).toBe("replicate");const req = { feature: "video", modelId: "wan-2-2-a14b-cloud", prompt: "a wave", inputs: { images: ["https://x/a.png"] }, params: { duration: 10 } };const p = previewGeneration(req);expect(p.providerId).toBe("replicate");diff --git a/tests/route-drops-note.test.ts b/tests/route-drops-note.test.tsindex 5998fef0..41710475 100644--- a/tests/route-drops-note.test.ts+++ b/tests/route-drops-note.test.ts@@ -66,24 +66,25 @@ describe("a setting the chosen route has no field for", () => {});});-/** Wan 2.2 t2v: Replicate takes 16:9/9:16 and no negative prompt; fal takes 1:1 and one. */+/** Qwen-Image-Edit 2511: Replicate makes 1:1, 16:9, 9:16, 4:3 or 3:4 and takes no negative prompt; fal takes 3:2 and one. */describe("a run whose route can't honour a setting", () => {- const wan = { feature: "video" as const, modelId: "wan-2-2-a14b-cloud", engine: "cloud" as const, prompt: "a slow dolly past a quiet harbour", negativePrompt: "blur", params: { aspectRatio: "1:1" } };- const sent = (log: { method: string; path: string; body: string }[]) => log.filter((r) => r.method === "POST" && /predictions|wan/.test(r.path)).map((r) => JSON.parse(r.body || "{}"));+ const PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";+ const qwen = { feature: "image" as const, modelId: "qwen-image-edit-2511-cloud", engine: "cloud" as const, prompt: "the harbour at dusk", negativePrompt: "blur", inputs: { images: [PNG] }, params: { aspectRatio: "3:2" } };+ const sent = (log: { method: string; path: string; body: string }[]) => log.filter((r) => r.method === "POST" && /predictions|qwen-image-edit/.test(r.path)).map((r) => JSON.parse(r.body || "{}"));it("runs anyway on the only route ready: the closest shape, no negative prompt, and a note it keeps", async () => {setSetting("falKey", "");rep.log.length = 0;- const [g] = gens.createGenerations(wan);+ const [g] = gens.createGenerations(qwen);expect(g.provider).toBe("replicate");expect(g.notes).toEqual(- expect.arrayContaining(["Wan 2.2 A14B (hosted) on Replicate doesn't take a negative prompt: this run goes without", "Wan 2.2 A14B (hosted) on Replicate doesn't make 1:1: this run is made at 16:9"]),+ expect.arrayContaining(["Qwen-Image-Edit 2511 (hosted) on Replicate doesn't take a negative prompt: this run goes without", "Qwen-Image-Edit 2511 (hosted) on Replicate doesn't make 3:2: this run is made at 4:3"]),);const done = await settle(g.id);expect(done.status).toBe("succeeded");- expect(done.request.notice).toBe("Replicate's Wan 2.2 A14B made this at 16:9 in place of 1:1 and without the negative prompt.");+ expect(done.request.notice).toBe("Replicate's Qwen-Image-Edit 2511 made this at 4:3 in place of 3:2 and without the negative prompt.");const input = sent(rep.log).at(-1)?.input ?? {};- expect(input.aspect_ratio).toBe("16:9");+ expect(input.aspect_ratio).toBe("4:3");expect(input).not.toHaveProperty("negative_prompt");});@@ -92,19 +93,19 @@ describe("a run whose route can't honour a setting", () => {setSetting("cloudProvider", "replicate");try {fal.log.length = 0;- const [g] = gens.createGenerations({ ...wan, prefer: "fal" });+ const [g] = gens.createGenerations({ ...qwen, prefer: "fal" });expect(g.provider).toBe("fal");expect((g.notes ?? []).join(" ")).not.toMatch(/doesn't (take|make)/);const done = await settle(g.id);expect(done.status).toBe("succeeded");expect(done.request.notice).toBeUndefined();const body = sent(fal.log).at(-1) ?? {};- expect(body.aspect_ratio).toBe("1:1");+ expect(body.image_size).toBe("landscape_4_3");expect(body.negative_prompt).toBe("blur");- // Named Replicate ("Run anyway" on it), it stays there although fal.ai is ready and makes 1:1.- const [r] = gens.createGenerations({ ...wan, prefer: "replicate" });+ // Named Replicate ("Run anyway" on it), it stays there although fal.ai is ready and makes 3:2.+ const [r] = gens.createGenerations({ ...qwen, prefer: "replicate" });expect(r.provider).toBe("replicate");- expect((await settle(r.id)).request.notice).toMatch(/^Replicate's Wan 2.2 A14B made this at 16:9/);+ expect((await settle(r.id)).request.notice).toMatch(/^Replicate's Qwen-Image-Edit 2511 made this at 4:3/);} finally {setSetting("cloudProvider", "auto");setSetting("falKey", "");@@ -112,7 +113,7 @@ describe("a run whose route can't honour a setting", () => {});it("says nothing on a shape and settings the route takes", async () => {- const [g] = gens.createGenerations({ ...wan, negativePrompt: undefined, params: { aspectRatio: "9:16" } });+ const [g] = gens.createGenerations({ ...qwen, negativePrompt: undefined, params: { aspectRatio: "16:9" } });expect(g.provider).toBe("replicate");expect((g.notes ?? []).join(" ")).not.toMatch(/doesn't (take|make)/);expect((await settle(g.id)).request.notice).toBeUndefined();diff --git a/tests/route-notice.test.ts b/tests/route-notice.test.tsindex 721dd275..19d48d8a 100644--- a/tests/route-notice.test.ts+++ b/tests/route-notice.test.ts@@ -1,7 +1,7 @@import { describe, expect, it } from "vitest";import { getModel } from "@/lib/catalog";import { anywayKeys, anywaySaid, likelyProvider, pickRoute, routeNotice, routeShortfalls, shortfallNote } from "@/lib/catalog/route-notice";-import type { ModelDef, ProviderId } from "@/lib/catalog/types";+import type { ModelDef, ModelRoute, ProviderId } from "@/lib/catalog/types";import { slimModel } from "@/lib/studio-catalog";/** Route notice from the server catalog and the browser's slim catalog. */@@ -10,45 +10,68 @@ const model = (id: string): ModelDef => {if (!m) throw new Error(`no ${id}`);return m;};-const wan = model("wan-2-2-a14b-cloud");-const slim = slimModel(wan);-const asked = { params: { aspectRatio: "1:1" }, negativePrompt: "blur" };+// Qwen-Image-Edit 2511: fal.ai takes every shape and a negative prompt; Replicate makes five shapes and takes none.+const qwen = model("qwen-image-edit-2511-cloud");+const slim = slimModel(qwen);+const asked = { params: { aspectRatio: "3:2" }, negativePrompt: "blur" };const only = (...ps: ProviderId[]) => (p: ProviderId) => ps.includes(p);+/**+ * A video model with a fal.ai route that makes any 4n + 1 frames and Replicate's fast Wan 2.2, which makes 81–121: the+ * length cases (Wan 2.2 A14B had both routes until fal removed its Wan 2.2 line; it runs on Replicate alone now).+ */+const wanReplicate = model("wan-2-2-a14b-cloud");+const t2vReplicate = wanReplicate.routes.find((r) => r.op === "t2v" && r.provider === "replicate")!;+const t2vFal: ModelRoute = {+ op: "t2v",+ provider: "fal",+ endpoint: "fal/any-length-t2v",+ map: { numFrames: { key: "num_frames", fps: 16, min: 17, max: 161, step: 4 }, aspectRatio: { key: "aspect_ratio", accepts: ["16:9", "9:16", "1:1"] } },+};+const lengths: ModelDef = { ...wanReplicate, id: "two-length-routes", name: "Two routes", routes: [t2vFal, t2vReplicate] };+describe("before a run on a route that can't honour a setting", () => {- it("names what Replicate's Wan 2.2 can't do, in plain words, and offers fal.ai only when fal.ai runs", () => {- for (const m of [wan, slim]) {- const n = routeNotice(m, "t2v", "replicate", asked, only("replicate"));- expect(n?.words).toBe("Replicate's Wan 2.2 A14B makes 16:9 or 9:16 clips only and ignores a negative prompt.");+ it("names what Replicate's Qwen-Image-Edit 2511 can't do, in plain words, and offers fal.ai only when fal.ai runs", () => {+ for (const m of [qwen, slim]) {+ const n = routeNotice(m, "edit", "replicate", asked, only("replicate"));+ expect(n?.words).toBe("Replicate's Qwen-Image-Edit 2511 makes 1:1, 16:9, 9:16, 4:3 or 3:4 pictures only and ignores a negative prompt.");+ // Run anyway only: fal.ai isn't connected, so it isn't offered.expect(n?.instead).toBeUndefined();- expect(routeNotice(m, "t2v", "replicate", asked, only("replicate", "fal"))?.instead).toBe("fal");+ expect(routeNotice(m, "edit", "replicate", asked, only("replicate", "fal"))?.instead).toBe("fal");+ }+ });++ it("a model on Replicate alone has nothing else to offer: no notice and never Use fal.ai", () => {+ const wan = slimModel(wanReplicate);+ expect(wanReplicate.routes.every((r) => r.provider === "replicate")).toBe(true);+ for (const ready of [only("replicate"), () => true]) {+ expect(routeNotice(wan, "t2v", "replicate", { params: { aspectRatio: "1:1" }, negativePrompt: "blur" }, ready)?.instead).toBeUndefined();}+ expect(likelyProvider(wan, "t2v", { params: { aspectRatio: "16:9" } }, { ready: () => true })).toBe("replicate");});it("says one thing when only one is asked", () => {- expect(routeNotice(slim, "t2v", "replicate", { params: { aspectRatio: "1:1" } }, () => true)?.words).toBe("Replicate's Wan 2.2 A14B makes 16:9 or 9:16 clips only.");- expect(routeNotice(slim, "t2v", "replicate", { params: { aspectRatio: "9:16" }, negativePrompt: "blur" }, () => true)?.words).toBe(- "Replicate's Wan 2.2 A14B ignores a negative prompt.",+ expect(routeNotice(slim, "edit", "replicate", { params: { aspectRatio: "3:2" } }, () => true)?.words).toBe("Replicate's Qwen-Image-Edit 2511 makes 1:1, 16:9, 9:16, 4:3 or 3:4 pictures only.");+ expect(routeNotice(slim, "edit", "replicate", { params: { aspectRatio: "16:9" }, negativePrompt: "blur" }, () => true)?.words).toBe(+ "Replicate's Qwen-Image-Edit 2511 ignores a negative prompt.",);});it("says nothing when the route makes everything as asked, or no route of the model would", () => {- expect(routeNotice(slim, "t2v", "replicate", { params: { aspectRatio: "16:9" } }, () => true)).toBeNull();- expect(routeNotice(slim, "t2v", "fal", asked, () => true)).toBeNull();- // 1080p: no route of Wan 2.2 makes it (the picker says so), so it isn't Replicate's to say.- expect(routeShortfalls(slim, "t2v", "replicate", { params: { resolution: "1080p" } })).toEqual([]);+ expect(routeNotice(slim, "edit", "replicate", { params: { aspectRatio: "16:9" } }, () => true)).toBeNull();+ expect(routeNotice(slim, "edit", "fal", asked, () => true)).toBeNull();// A blank negative prompt asks for nothing.- expect(routeNotice(slim, "t2v", "replicate", { params: {}, negativePrompt: " " }, () => true)).toBeNull();+ expect(routeNotice(slim, "edit", "replicate", { params: {}, negativePrompt: " " }, () => true)).toBeNull();});- it("a longer clip than Replicate's frames make, which fal.ai makes as asked", () => {- const s = routeShortfalls(slim, "t2v", "replicate", { params: { duration: 3 } });+ it("a longer clip than Replicate's frames make, which another route makes as asked", () => {+ const s = routeShortfalls(lengths, "t2v", "replicate", { params: { duration: 3 } });expect(s.map((x) => [x.setting, x.can])).toEqual([["duration", "makes this 5s long, not 3s"]]);});it("the run's note says what was made, in the past tense", () => {- const s = routeShortfalls(wan, "t2v", "replicate", asked);- expect(shortfallNote(wan, "replicate", s)).toBe("Replicate's Wan 2.2 A14B made this at 16:9 in place of 1:1 and without the negative prompt.");+ const s = routeShortfalls(qwen, "edit", "replicate", asked);+ expect(shortfallNote(qwen, "replicate", s)).toBe("Replicate's Qwen-Image-Edit 2511 made this at 4:3 in place of 3:2 and without the negative prompt.");});it("works for any model whose routes take different settings (Nano Banana Pro's seed on Replicate)", () => {@@ -57,29 +80,29 @@ describe("before a run on a route that can't honour a setting", () => {});it("Run anyway is remembered per model, mode, route and setting", () => {- const n = routeNotice(slim, "t2v", "replicate", asked, () => true)!;- const said = anywayKeys(wan.id, "t2v", n);- expect(anywaySaid(said, wan.id, "t2v", n)).toBe(true);- // The same shape asked again: still said. A new setting the route can't take: asked again.- expect(anywaySaid(said, wan.id, "t2v", routeNotice(slim, "t2v", "replicate", { params: { aspectRatio: "1:1" } }, () => true)!)).toBe(true);- expect(anywaySaid(said, wan.id, "t2v", routeNotice(slim, "t2v", "replicate", { params: { duration: 3 } }, () => true)!)).toBe(false);+ const n = routeNotice(slim, "edit", "replicate", { params: { aspectRatio: "3:2" } }, () => true)!;+ const said = anywayKeys(qwen.id, "edit", n);+ expect(anywaySaid(said, qwen.id, "edit", n)).toBe(true);+ // The same setting asked again: still said. A new setting the route can't take: asked again.+ expect(anywaySaid(said, qwen.id, "edit", routeNotice(slim, "edit", "replicate", { params: { aspectRatio: "3:2" } }, () => true)!)).toBe(true);+ expect(anywaySaid(said, qwen.id, "edit", routeNotice(slim, "edit", "replicate", { params: { aspectRatio: "16:9" }, negativePrompt: "blur" }, () => true)!)).toBe(false);});});describe("where the run goes, as the server picks", () => {it("the first ready route, the preferred aggregator first, and the one the request names", () => {- expect(likelyProvider(slim, "t2v", asked, { ready: only("replicate") })).toBe("replicate");- expect(likelyProvider(slim, "t2v", asked, { ready: only("replicate", "fal") })).toBe("fal");- expect(likelyProvider(slim, "t2v", asked, { ready: only("replicate", "fal"), preferred: "replicate" })).toBe("replicate");- expect(likelyProvider(slim, "t2v", { ...asked, prefer: "fal" }, { ready: only("replicate", "fal"), preferred: "replicate" })).toBe("fal");+ expect(likelyProvider(slim, "edit", asked, { ready: only("replicate") })).toBe("replicate");+ expect(likelyProvider(slim, "edit", asked, { ready: only("replicate", "fal") })).toBe("fal");+ expect(likelyProvider(slim, "edit", asked, { ready: only("replicate", "fal"), preferred: "replicate" })).toBe("replicate");+ expect(likelyProvider(slim, "edit", { ...asked, prefer: "fal" }, { ready: only("replicate", "fal"), preferred: "replicate" })).toBe("fal");// Named but not ready: the next ready one.- expect(likelyProvider(slim, "t2v", { ...asked, prefer: "fal" }, { ready: only("replicate") })).toBe("replicate");- expect(likelyProvider(slim, "t2v", asked, { ready: () => false })).toBeUndefined();+ expect(likelyProvider(slim, "edit", { ...asked, prefer: "fal" }, { ready: only("replicate") })).toBe("replicate");+ expect(likelyProvider(slim, "edit", asked, { ready: () => false })).toBeUndefined();});it("a route that makes the length asked wins over the preferred one", () => {- // 3 s: Replicate's Wan 2.2 makes 81–121 frames (about 5 s), fal's makes 3 s.- expect(likelyProvider(slim, "t2v", { params: { duration: 3 } }, { ready: () => true, preferred: "replicate" })).toBe("fal");- expect(pickRoute(wan.routes.filter((r) => r.op === "t2v"), { ok: () => true, seconds: 3, preferred: "replicate", prefer: "replicate" })?.provider).toBe("replicate");+ // 3 s: Replicate's fast Wan 2.2 makes 81–121 frames (about 5 s); the other route makes 3 s.+ expect(likelyProvider(lengths, "t2v", { params: { duration: 3 } }, { ready: () => true, preferred: "replicate" })).toBe("fal");+ expect(pickRoute(lengths.routes, { ok: () => true, seconds: 3, preferred: "replicate", prefer: "replicate" })?.provider).toBe("replicate");});});diff --git a/tests/wan-replicate-only.test.ts b/tests/wan-replicate-only.test.tsnew file mode 100644index 00000000..f258da88--- /dev/null+++ b/tests/wan-replicate-only.test.ts@@ -0,0 +1,82 @@+import { describe, expect, it } from "vitest";+import { getModel, PRESETS } from "@/lib/catalog";+import { onEngine } from "@/lib/catalog/engines";+import { LORA_LIBRARY, MOTION_EFFECT_LORAS } from "@/lib/catalog/lora-library.generated";+import { fitLoras, routeLoraField } from "@/lib/catalog/loras";+import { buildPayload } from "@/lib/catalog/payload";+import { estimateCost, mixLimit, mixLoras, presetRoute } from "@/lib/catalog/plan";+import type { LoraRef, Preset } from "@/lib/catalog/types";++/*+ * fal removes its Wan 2.2 A14B endpoints on 2027-01-04: Wan 2.2 A14B (hosted) and Fuobe DoP's cloud half run on+ * Replicate's fast Wan 2.2 alone, one LoRA per expert. A Mix whose second preset has no expert left can't join in the+ * cloud (the composer shows it as unavailable, with "Use it on your GPU"); on the GPU every LoRA loads.+ */+const FAL_WAN22 = /^fal-ai\/wan\/v2\.2-a14b\//;++describe("Wan 2.2 A14B (hosted) and Fuobe DoP in the cloud", () => {+ it("run on Replicate's fast Wan 2.2 only, with the start and end frames, the GPU graphs as they were", () => {+ const wan = getModel("wan-2-2-a14b-cloud")!;+ expect(wan.routes.map((r) => `${r.op} ${r.provider}:${r.endpoint}`)).toEqual([+ "t2v replicate:wan-video/wan-2.2-t2v-fast",+ "i2v replicate:wan-video/wan-2.2-i2v-fast",+ "flf2v replicate:wan-video/wan-2.2-i2v-fast",+ ]);+ const dop = getModel("fuobe-dop")!;+ expect(onEngine(dop, "cloud").routes.map((r) => `${r.op} ${r.provider}:${r.endpoint}`)).toEqual(["i2v replicate:wan-video/wan-2.2-i2v-fast", "flf2v replicate:wan-video/wan-2.2-i2v-fast"]);+ expect(onEngine(dop, "open").routes.map((r) => r.endpoint)).toEqual(expect.arrayContaining(["wan22-i2v-14b", "wan22-flf2v-14b"]));+ for (const m of [wan, dop]) {+ expect(m.routes.some((r) => FAL_WAN22.test(r.endpoint) || FAL_WAN22.test(r.loraEndpoint ?? ""))).toBe(false);+ for (const r of onEngine(m, "cloud").routes) expect(routeLoraField(r)?.shape, `${m.id} ${r.op}`).toBe("experts");+ }+ // A transition's end frame goes as last_image.+ const flf = onEngine(dop, "cloud").routes.find((r) => r.op === "flf2v")!;+ expect(buildPayload(flf.map!, { prompt: "p", images: ["https://x/a.png"], endImage: "https://x/b.png", duration: 5 })).toMatchObject({ image: "https://x/a.png", last_image: "https://x/b.png", num_frames: 81 });+ });++ it("are priced per clip at Replicate's rate", () => {+ const dop = onEngine(getModel("fuobe-dop")!, "cloud");+ expect(dop.pricing).toMatchObject({ unit: "video", usd: 0.11, byResolution: { "720p": 0.11, "480p": 0.05 } });+ expect(estimateCost(dop, { resolution: "480p", duration: 3 }, 1, "i2v")).toBeCloseTo(0.05, 6);+ expect(estimateCost(getModel("wan-2-2-a14b-cloud")!, { resolution: "720p", duration: 5 }, 1, "t2v")).toBeCloseTo(0.11, 6);+ });+});++describe("a Mix on one LoRA per expert", () => {+ const dop = getModel("fuobe-dop")!;+ const highOnly = (p: Preset) => {+ const r = presetRoute(p, "cloud");+ return r?.modelId === "fuobe-dop" && !!r.loras?.length && r.loras.every((l) => l.target === "high");+ };+ const highs = PRESETS.filter((p) => (p.type === "motion" || p.type === "effect") && highOnly(p));++ it("a second preset whose LoRA needs the expert the first holds can't join in the cloud, and says why", () => {+ expect(highs.length).toBeGreaterThanOrEqual(2);+ const [a, b] = highs;+ const why = mixLimit(dop, "cloud", "i2v", a, b);+ expect(why).toBe(`Fuobe DoP in the cloud takes one LoRA per expert (high and low noise), so ${b.name} can't join ${a.name} there`);+ // On the GPU every LoRA loads.+ expect(mixLimit(dop, "open", "i2v", a, b)).toBeUndefined();+ // The run itself: the second LoRA is left out with the reason, never sent.+ const loras: LoraRef[] = [...(presetRoute(a, "cloud")!.loras ?? []), ...mixLoras(b, dop.id, "cloud", 0.6).loras];+ const route = onEngine(dop, "cloud").routes.find((r) => r.op === "i2v")!;+ const fit = fitLoras(loras.map((l) => ({ ...l, url: l.url ?? "https://example.com/x.safetensors" })), route);+ expect(fit.notes.join(" ")).toMatch(/one LoRA per expert/);+ });++ it("a second preset on the other expert joins", () => {+ const low = PRESETS.find((p) => {+ const r = presetRoute(p, "cloud");+ return (p.type === "motion" || p.type === "effect") && r?.modelId === "fuobe-dop" && !!r.loras?.length && r.loras.every((l) => l.target === "low");+ });+ if (low) expect(mixLimit(dop, "cloud", "i2v", highs[0], low)).toBeUndefined();+ });+});++describe("the LoRA library's hosted routes", () => {+ it("name the routes that run them now, not fal's retired Wan 2.2 or Wan Animate", () => {+ const texts = [...LORA_LIBRARY.map((l) => l.hostedEndpoint ?? ""), ...MOTION_EFFECT_LORAS.map((m) => m.hostedEndpoint ?? "")];+ expect(texts.filter((t) => /fal-ai\/wan\/v2\.2-(a14b|14b\/animate)|fal-ai\/wan-t2v-lora/.test(t))).toEqual([]);+ expect(texts.some((t) => t.includes("wan-video/wan-2.2-i2v-fast"))).toBe(true);+ });+});