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
Fuobe Animation: the cloud film runs on Replicate's fast Wan 2.2
Adarshb4e7c0761be1
diff --git a/scripts/gen-cloud-models.py b/scripts/gen-cloud-models.pyindex 5277fde7..9f277b64 100644--- a/scripts/gen-cloud-models.py+++ b/scripts/gen-cloud-models.py@@ -798,17 +798,19 @@ model("fuobe-dop-ltx", "Fuobe DoP · LTX", "Fuobe Original", "fuobe-dop", "videooriginal=True, api_defaults={"enable_prompt_expansion": False},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}),options={"durations": [3, 5]}, defaults={"aspectRatio": "auto", "duration": 5, "generateAudio": False}, frame_step=8)-# ----- Fuobe Animation: keyframe in-betweening's cloud half. fal's Wan 2.2 A14B image-to-video-# takes an end frame, 17–161 frames and LoRAs per expert (schema read 2026-11-02): one hosted clip per gap with AniSora-# 3.2 on the high-noise expert (models.ts sends it, options.loras), joined. fal makes every frame and plays it as made-# (16 fps, interpolation off): the every-Nth speeds and 24 fps playback are the GPU graph's (src/lib/inbetween.ts).-ANIMATION_FAL = {"interpolator_model": "none", "frames_per_second": 16}+# ----- Fuobe Animation: keyframe in-betweening's cloud half on Replicate's fast Wan 2.2 A14B image-to-video (fal removes its+# Wan 2.2 line on 2027-01-04): a start frame and last_image, one LoRA per expert (AniSora 3.2 on the high-noise+# lora_weights_transformer, by its URL; models.ts sends it, options.loras), 81-121 frames at frames_per_second, no+# interpolation. One clip per gap at 81 frames, brought down to the gap's own 17-81 frames inside the film+# (createKeyframeFilm, resampleGap), joined; the every-Nth speeds and 24 fps playback are the GPU graph's+# (src/lib/inbetween.ts). Replicate bills each clip: "$0.05 per output video" at 480p, $0.11 at 720p (model page, 2026-11-07).+ANIMATION_REPLICATE = {"interpolate_output": False, "frames_per_second": 16}model("fuobe-animation", "Fuobe Animation", "Fuobe Original", "fuobe-animation", "video","Keyframes in, the in-betweens drawn, one finished animation, with timing per gap: Wan 2.2 + AniSora",- [("i2v", "fal-ai/wan/v2.2-a14b/image-to-video", "fal", {"loraEndpoint": "fal-ai/wan/v2.2-a14b/image-to-video/lora", "fixed": ANIMATION_FAL, "flf2v": True})],+ [("i2v", "wan-video/wan-2.2-i2v-fast", "replicate", {"fixed": ANIMATION_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, per gap's clip",- {"byResolution": {"720p": 0.08, "580p": 0.06, "480p": 0.04}, "withLoras": 0.1}),+ pricing=("video", 0.11, "per gap's clip at 720p (81 frames on Replicate); 480p $0.05",+ {"byResolution": {"720p": 0.11, "480p": 0.05}}),defaults={"aspectRatio": "auto", "duration": 5, "resolution": "720p"}, frame_step=4, fit_values=True)# ----- Originals (O6): Fuobe Cinema's cloud half, Cinema Studio's Director on LTX-2.3 22B (research §8 cinema-studio →# studios[cinema-studio].original). Prompt expansion off so the compiled Director prompt is what runs; sound follows thediff --git a/src/lib/catalog/cloud-models.generated.ts b/src/lib/catalog/cloud-models.generated.tsindex a4548cf2..6f7e3113 100644--- a/src/lib/catalog/cloud-models.generated.ts+++ b/src/lib/catalog/cloud-models.generated.ts@@ -24230,126 +24230,91 @@ 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",+ "interpolate_output": false,"frames_per_second": 16},"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",+ "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",+ "interpolate_output": false,"frames_per_second": 16},"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"+ }}],"options": {"durations": [- 3,- 4,- 5,- 6,- 8,- 10+ 6],- "negativePrompt": true,"seed": true,"endFrame": true,- "aspectRatios": [- "auto",- "16:9",- "9:16",- "1:1"- ],"resolutions": ["480p",- "580p","720p"],"maxImages": 1@@ -24362,19 +24327,17 @@ export const ORIGINAL_CLOUD: ModelDef[] = [},"defaults": {"aspectRatio": "auto",- "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, per gap's clip",+ "unit": "video",+ "usd": 0.11,+ "note": "per gap's clip at 720p (81 frames on Replicate); 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/hosted-untested.ts b/src/lib/catalog/hosted-untested.tsindex 86ffa7d6..baf226e8 100644--- a/src/lib/catalog/hosted-untested.ts+++ b/src/lib/catalog/hosted-untested.ts@@ -65,7 +65,7 @@ export const HOSTED_UNTESTED_ENDPOINTS: ReadonlySet<string> = new Set(["fal-ai/wan/v2.7/text-to-image",]);-/** Models whose hosted routes are new even where the endpoint isn't (Fuobe Animation's LoRA run on Wan 2.2 A14B). */+/** Models whose hosted routes are new even where the endpoint isn't (Fuobe Animation's AniSora film on Replicate's fast Wan 2.2). */export const HOSTED_UNTESTED_MODELS: ReadonlySet<string> = new Set(["fuobe-animation"]);const hosted = (r: Pick<ModelRoute, "provider">) => r.provider === "fal" || r.provider === "replicate";diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.tsindex 9183190d..9b8fbb97 100644--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@ -2888,10 +2888,11 @@ function original(spec: { id: string; open: ModelRoute[]; options: ModelOptions;}/**- * Fuobe Animation's hosted gap clip (fal's Wan 2.2 A14B start/end-frame route): the cloud film's chained route takes- * LoRAs the way each gap's clip does, so the run keeps AniSora when it is planned and each gap sends it to `/lora`.+ * Fuobe Animation's hosted gap clip (Replicate's fast Wan 2.2 A14B, start and last image): the cloud film's chained route+ * takes LoRAs the way each gap's clip does (one per expert), so the run keeps AniSora when it is planned and each gap+ * sends it as the high-noise expert's weights.*/-const ANIMATION_GAP = ORIGINAL_HALVES.get("fuobe-animation")?.routes.find((r) => r.op === "flf2v" && r.provider === "fal");+const ANIMATION_GAP = ORIGINAL_HALVES.get("fuobe-animation")?.routes.find((r) => r.op === "flf2v" && r.provider === "replicate");/** Fuobe DoP on both engines: a start frame (and an end frame for a transition), 3 or 5 s (49 or 81 frames at 16 fps on Wan). */const DOP_OPTIONS: ModelOptions = {@@ -2981,7 +2982,7 @@ const originals: ModelDef[] = [...original({id: "fuobe-animation",open: [comfy("keyframes", "wan22-inbetween-anisora", "every gap on one set of loaders: AniSora 3.2 + lightx2v 4 steps, every Nth frame, one video")],- tagline: "Keyframes in, the in-betweens drawn, one finished animation · Wan 2.2 + AniSora free on your GPU (24 GB), or hosted on fal",+ tagline: "Keyframes in, the in-betweens drawn, one finished animation · Wan 2.2 + AniSora free on your GPU (24 GB), or hosted on Replicate",options: {inbetween: true,aspectRatios: ["auto", ...VID_AR],@@ -2999,12 +3000,12 @@ const originals: ModelDef[] = [...(ORIGINAL_HALVES.get("fuobe-animation")?.routes ?? []),{op: "keyframes",- provider: "fal",- endpoint: "fal-ai/wan/v2.2-a14b/image-to-video",+ provider: "replicate",+ endpoint: "wan-video/wan-2.2-i2v-fast",chained: true,- note: "one hosted clip per gap with AniSora, joined",+ note: "one hosted clip per gap with AniSora, each brought to its gap's frames, joined",// Without a LoRA field here the planner leaves AniSora out of the film and refuses it (prepare's lost-LoRA check).- ...(ANIMATION_GAP?.map?.loras && { loraEndpoint: ANIMATION_GAP.loraEndpoint, map: { loras: ANIMATION_GAP.map.loras } }),+ ...(ANIMATION_GAP?.map?.loras && { map: { loras: ANIMATION_GAP.map.loras } }),},],engineDefaults: { open: { resolution: "720p" } },diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.tsindex 85a2c4c6..13ce6146 100644--- a/src/lib/catalog/plan.ts+++ b/src/lib/catalog/plan.ts@@ -1431,6 +1431,13 @@ function outputFramesPrice(o: NonNullable<Pricing["outputFrames"]>, params: GenP* at `now` (./promo): the clock when not given (the server planning a run, the browser after it hydrates); with null (a* page prerendering, the browser before it hydrates) a launch-priced model's price isn't known yet (null).*/+/** A keyframe animation's gaps: its timing's (params.extra.inbetween), else one between each two keyframe times, else one. */+function filmGaps(params: GenParams): number {+ const gaps = (params.extra?.inbetween as { gaps?: unknown[] } | undefined)?.gaps;+ if (Array.isArray(gaps) && gaps.length) return gaps.length;+ return Math.max(1, (params.keyframeTimes?.length ?? 0) - 1);+}+export function estimateCost(model: ModelDef, params: GenParams, jobs = 1, op?: Operation, withLoras = false, now?: PriceClock): number | null {if (model.engine === "open" || !model.pricing) return model.engine === "open" ? 0 : null;const p = pricingOn(model.pricing, now);@@ -1451,6 +1458,8 @@ export function estimateCost(model: ModelDef, params: GenParams, jobs = 1, op?:// A voice cleaned (DeepFilterNet 3, VEED) is billed on the recording's length (params.sourceDuration: its header).const audioClip = op && AUDIO_LENGTH_OPS.has(op) && params.sourceDuration && params.sourceDuration > 0 ? params.sourceDuration : undefined;if (p.unit === "image") per = usd * n;+ // A keyframe film billed per clip (Fuobe Animation on Replicate: one clip a gap, whatever its length).+ if (p.unit === "video" && op === "keyframes" && model.options.inbetween) per = usd * filmGaps(params);// Per image by tier, but per megapixel with LoRAs (fal's FLUX 3 Klein /lora): the route's size in megapixels.if (withLoras && p.withLorasPerMegapixel !== undefined) per = p.withLorasPerMegapixel * (routeMegapixels(model, params, op) ?? sentMegapixels(params) ?? 1) * n;// Per megapixel of every image made: Soul's sizes are known (about 1 or 2 MP), so is a size sent as fal's image_sizediff --git a/src/lib/inbetween.ts b/src/lib/inbetween.tsindex 63f571d2..b4075354 100644--- a/src/lib/inbetween.ts+++ b/src/lib/inbetween.ts@@ -83,6 +83,22 @@ export function keptFrames(t: Pick<InbetweenTiming, "gaps">): number[] {return t.gaps.map((g, i) => gapSelection(g).kept + (i === 0 ? 1 : 0));}+/**+ * A gap made longer than its own length, brought down to it inside the film (the cloud: Replicate's fast Wan 2.2 makes at+ * least 81 frames a clip, so a 17-frame gap is made as 81). `interval`: take every Nth made frame (1: every frame); `picks`:+ * which of the frames taken make the gap, in order. Where the made length divides evenly (81 → 17, 21, 41: every 5th, 4th,+ * 2nd) the frames taken are the gap exactly; otherwise every frame is taken and each of the gap's frames is the nearest+ * made frame at its place in time (first and last land on the clip's first and last, the two keyframes). Null when the+ * clip is already the gap's length.+ */+export function resampleGap(made: number, frames: number): { interval: number; picks: number[] } | null {+ if (!(made > frames) || frames < 2) return null;+ const span = made - 1;+ const steps = frames - 1;+ if (span % steps === 0) return { interval: span / steps, picks: Array.from({ length: frames }, (_, i) => i) };+ return { interval: 1, picks: Array.from({ length: frames }, (_, i) => Math.round((i * span) / steps)) };+}+/** The film's frame count: keyframe 1, then every gap's kept frames. */export function totalFrames(t: Pick<InbetweenTiming, "gaps">): number {return t.gaps.length ? keptFrames(t).reduce((a, b) => a + b, 0) : 0;diff --git a/src/server/chains.ts b/src/server/chains.tsindex a9c337f8..97ad92ef 100644--- a/src/server/chains.ts+++ b/src/server/chains.ts@@ -4,7 +4,7 @@ import { getModel, supportsOp } from "@/lib/catalog";import { MODEL3D_STEP_FEATURE, stillPromptFor3d } from "@/lib/av/model3d";import { HI3D_CHAIN_PARAM, HI3D_MODEL, HI3D_OP, HI3D_PARAM, chainedRefine } from "@/lib/av/hi3d";import { chainTiming, chainedWaitMessage, frameTimes, framesWait, planKeyframeClips, spread, type KeyframeClip } from "@/lib/catalog/keyframes";-import { gapPrompt, MAKE_FPS, requestTiming } from "@/lib/inbetween";+import { gapPrompt, MAKE_FPS, requestTiming, resampleGap } from "@/lib/inbetween";import { faceMosaicStep } from "@/lib/catalog/open-tools";import { planVoiceFirst } from "@/lib/av/voice-first";import { dualEngine, onEngine } from "@/lib/catalog/engines";@@ -269,8 +269,19 @@ export function createKeyframeFilm(original: GenerationRequest, model: ModelDef,maxFrames: wf?.limits?.maxFrames,});const tail = clips.some((c) => c.to === null);+ // A hosted gap clip made longer than the gap (Replicate's fast Wan 2.2 makes at least 81 frames) is brought down to the+ // gap's own frames inside the film: its frames taken (every Nth, or every one), then the gap's frames put back together+ // at 16 fps (resampleGap). The open graph makes each gap at its own length.+ const madeFrames = animation && model.engine !== "open" ? routesFor(model, "flf2v").find((r) => r.provider !== "comfyui")?.map?.numFrames?.min : undefined;+ const fits = clips.map((c) => (madeFrames && c.to !== null ? resampleGap(madeFrames, c.frames) : null));assertOneMode([{ label: `${model.name} clips`, modelId: model.id, op: "flf2v", engine: model.engine },+ ...(fits.some(Boolean)+ ? [+ { label: "Taking each clip's frames", modelId: GAP_TOOLS.frames, op: "extract-frames" as const },+ { label: "Each gap at its own length", modelId: GAP_TOOLS.assemble, op: "images-to-video" as const },+ ]+ : []),...(tail ? [{ label: `${model.name} after the last frame`, modelId: model.id, op: "i2v" as const, engine: model.engine }] : []),...(clips.length > 1 ? [{ label: "Joining the clips", modelId: joinModelId(model.engine), op: "concat" as const }] : []),]);@@ -289,6 +300,8 @@ export function createKeyframeFilm(original: GenerationRequest, model: ModelDef,delete rest.endImage;const n = clips.length;const made: Generation[] = [];+ // What the film joins: each gap's clip, or the clip brought down to the gap's length.+ const parts: string[] = [];try {for (const [i, c] of clips.entries()) {const label = c.to === null ? `After frame ${c.from + 1}` : `Frames ${c.from + 1} → ${c.to + 1}`;@@ -317,11 +330,48 @@ export function createKeyframeFilm(original: GenerationRequest, model: ModelDef,params: { ...params, duration: c.seconds, numOutputs: 1 },...(n > 1 ? { step: { label, index: i, of: n + 1 } } : {}),};- made.push(createGenerations(request, { batchId, ...(after.length && { dependsOn: after }) })[0]);+ const clip = createGenerations(request, { batchId, ...(after.length && { dependsOn: after }) })[0];+ made.push(clip);+ const fit = fits[i];+ if (!fit || !madeFrames) {+ parts.push(clip.id);+ continue;+ }+ const taken = Math.floor((madeFrames - 1) / fit.interval) + 1;+ const tool = { feature: original.feature, ...(original.demo && { demo: true }) };+ const frameStep = createGenerations(+ {+ ...tool,+ modelId: GAP_TOOLS.frames,+ op: "extract-frames",+ // JPEG frames at 95: a tenth of the bytes of PNG, as Mixed Media sends them (each frame is downloaded and sent on).+ params: { frameInterval: fit.interval, extra: { max_frames: taken, output_format: "jpg", quality: 95 } },+ chain: [{ slot: "video" }],+ ...(n > 1 ? { step: { label: `${label} · frames`, index: i, of: n + 1 } } : {}),+ },+ { batchId, dependsOn: clip.id },+ )[0];+ made.push(frameStep);+ const gap = createGenerations(+ {+ ...tool,+ modelId: GAP_TOOLS.assemble,+ op: "images-to-video",+ ...(n === 1 && { title: original.title?.trim() || tidy(original.prompt) || "Animation" }),+ params: { fps: MAKE_FPS },+ chain: fit.picks.map((index) => ({ slot: "images" as const, index, of: taken })),+ ...(n > 1 ? { step: { label: `${label} · ${c.frames} frames`, index: i, of: n + 1 } } : {}),+ },+ { batchId, dependsOn: fit.picks.map(() => frameStep.id) },+ )[0];+ made.push(gap);+ parts.push(gap.id);}+ // One gap brought down to its length: that clip is the film.+ if (n === 1 && parts[0] !== made[0].id) return withAsked([made.find((g) => g.id === parts[0])!, ...made.filter((g) => g.id !== parts[0])], original, model.engine);if (n === 1) return withAsked(made, original, model.engine);const film = joinClips(- made.map((c) => c.id),+ parts,{engine: model.engine,feature: original.feature,@@ -341,6 +391,9 @@ export function createKeyframeFilm(original: GenerationRequest, model: ModelDef,}}+/** fal's FFmpeg tools that bring a hosted gap clip down to the gap's own frames (createKeyframeFilm). */+const GAP_TOOLS = { frames: "extract-frames", assemble: "images-to-video" } as const;+/** Where a frame an earlier step makes sits while the film is checked (it is never sent). */const WAITING_FRAME = "/api/files/placeholder.png";diff --git a/tests/fixtures/provider-schemas/index.json b/tests/fixtures/provider-schemas/index.jsonindex 077224b4..d4bde83b 100644--- a/tests/fixtures/provider-schemas/index.json+++ b/tests/fixtures/provider-schemas/index.json@@ -49,6 +49,7 @@],"replicate": ["minimax/h3-highspeed",- "minimax/h3-lite"+ "minimax/h3-lite",+ "wan-video/wan-2.2-i2v-fast"]}diff --git a/tests/fixtures/provider-schemas/replicate/wan-video__wan-2.2-i2v-fast.json b/tests/fixtures/provider-schemas/replicate/wan-video__wan-2.2-i2v-fast.jsonnew file mode 100644index 00000000..382dd287--- /dev/null+++ b/tests/fixtures/provider-schemas/replicate/wan-video__wan-2.2-i2v-fast.json@@ -0,0 +1,1063 @@+{+ "example_prediction": {+ "input": {+ "frames_per_second": 16,+ "go_fast": true,+ "image": "https://replicate.delivery/pbxt/NRvtedaIOd3pdE0pTE3L9uavxJ53g33THGr0HF81M2olNOce/replicate-prediction-g8gbs3rbk9rme0crbhwatpsq04.jpg",+ "lora_scale_transformer": 1,+ "lora_scale_transformer_2": 1,+ "num_frames": 81,+ "prompt": "Close-up shot of an elderly sailor wearing a yellow raincoat, seated on the deck of a catamaran, slowly puffing on a pipe. His cat lies quietly beside him with eyes closed, enjoying the calm. The warm glow of the setting sun bathes the scene, with gentle waves lapping against the hull and a few seabirds circling slowly above. The camera slowly pushes in, capturing this peaceful and harmonious moment.",+ "resolution": "480p",+ "sample_shift": 12+ },+ "output": "https://replicate.delivery/xezq/FFBRE9C0J85HAJDLBHxQYMXwdt0WUZnlADnbOqxiM8pTI8VF/output_30fps.mp4",+ "status": "succeeded"+ },+ "model": "wan-video/wan-2.2-i2v-fast",+ "openapi_schema": {+ "components": {+ "schemas": {+ "HTTPValidationError": {+ "properties": {+ "detail": {+ "items": {+ "properties": {+ "loc": {+ "items": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "integer"+ }+ ]+ },+ "title": "Location",+ "type": "array"+ },+ "msg": {+ "title": "Message",+ "type": "string"+ },+ "type": {+ "title": "Error Type",+ "type": "string"+ }+ },+ "required": [+ "loc",+ "msg",+ "type"+ ],+ "title": "ValidationError",+ "type": "object"+ },+ "title": "Detail",+ "type": "array"+ }+ },+ "title": "HTTPValidationError",+ "type": "object"+ },+ "Input": {+ "properties": {+ "disable_safety_checker": {+ "default": false,+ "description": "Disable safety checker for generated video.",+ "title": "Disable Safety Checker",+ "type": "boolean",+ "x-order": 10+ },+ "frames_per_second": {+ "default": 16,+ "description": "Frames per second. Note that the pricing of this model is based on the video duration at 16 fps",+ "maximum": 30,+ "minimum": 5,+ "title": "Frames Per Second",+ "type": "integer",+ "x-order": 5+ },+ "go_fast": {+ "default": true,+ "description": "Go fast",+ "title": "Go Fast",+ "type": "boolean",+ "x-order": 7+ },+ "image": {+ "description": "Input image to generate video from.",+ "format": "uri",+ "title": "Image",+ "type": "string",+ "x-order": 1+ },+ "interpolate_output": {+ "default": false,+ "description": "Interpolate the generated video to 30 FPS using ffmpeg",+ "title": "Interpolate Output",+ "type": "boolean",+ "x-order": 6+ },+ "last_image": {+ "description": "Optional last image to condition the video generation. If provided, creates smoother transitions between frames.",+ "format": "uri",+ "nullable": true,+ "title": "Last Image",+ "type": "string",+ "x-order": 2+ },+ "lora_scale_transformer": {+ "default": 1,+ "description": "Determines how strongly the transformer LoRA should be applied.",+ "title": "Lora Scale Transformer",+ "type": "number",+ "x-order": 12+ },+ "lora_scale_transformer_2": {+ "default": 1,+ "description": "Determines how strongly the transformer_2 LoRA should be applied.",+ "title": "Lora Scale Transformer 2",+ "type": "number",+ "x-order": 14+ },+ "lora_weights_transformer": {+ "description": "Load LoRA weights for the HIGH transformer. Supports arbitrary .safetensors URLs from the Internet (for example, 'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_hinoise.safetensors')",+ "nullable": true,+ "title": "Lora Weights Transformer",+ "type": "string",+ "x-order": 11+ },+ "lora_weights_transformer_2": {+ "description": "Load LoRA weights for the LOW transformer_2. Supports arbitrary .safetensors URLs from the Internet. Can be different from transformer LoRA. (for example, 'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_lownoise.safetensors')",+ "nullable": true,+ "title": "Lora Weights Transformer 2",+ "type": "string",+ "x-order": 13+ },+ "num_frames": {+ "default": 81,+ "description": "Number of video frames. 81 frames give the best results",+ "maximum": 121,+ "minimum": 81,+ "title": "Num Frames",+ "type": "integer",+ "x-order": 3+ },+ "prompt": {+ "description": "Prompt for video generation",+ "title": "Prompt",+ "type": "string",+ "x-order": 0+ },+ "resolution": {+ "default": "480p",+ "description": "Resolution of video. 16:9 corresponds to 832x480px, and 9:16 is 480x832px",+ "enum": [+ "480p",+ "720p"+ ],+ "title": "resolution",+ "type": "string",+ "x-order": 4+ },+ "sample_shift": {+ "default": 12,+ "description": "Sample shift factor",+ "maximum": 20,+ "minimum": 1,+ "title": "Sample Shift",+ "type": "number",+ "x-order": 8+ },+ "seed": {+ "description": "Random seed. Leave blank for random",+ "nullable": true,+ "title": "Seed",+ "type": "integer",+ "x-order": 9+ }+ },+ "required": [+ "prompt",+ "image"+ ],+ "title": "Input",+ "type": "object"+ },+ "Output": {+ "format": "uri",+ "title": "Output",+ "type": "string"+ },+ "PredictionRequest": {+ "properties": {+ "id": {+ "title": "Id",+ "type": "string"+ },+ "input": {+ "properties": {+ "disable_safety_checker": {+ "default": false,+ "description": "Disable safety checker for generated video.",+ "title": "Disable Safety Checker",+ "type": "boolean",+ "x-order": 10+ },+ "frames_per_second": {+ "default": 16,+ "description": "Frames per second. Note that the pricing of this model is based on the video duration at 16 fps",+ "maximum": 30,+ "minimum": 5,+ "title": "Frames Per Second",+ "type": "integer",+ "x-order": 5+ },+ "go_fast": {+ "default": true,+ "description": "Go fast",+ "title": "Go Fast",+ "type": "boolean",+ "x-order": 7+ },+ "image": {+ "description": "Input image to generate video from.",+ "format": "uri",+ "title": "Image",+ "type": "string",+ "x-order": 1+ },+ "interpolate_output": {+ "default": false,+ "description": "Interpolate the generated video to 30 FPS using ffmpeg",+ "title": "Interpolate Output",+ "type": "boolean",+ "x-order": 6+ },+ "last_image": {+ "description": "Optional last image to condition the video generation. If provided, creates smoother transitions between frames.",+ "format": "uri",+ "nullable": true,+ "title": "Last Image",+ "type": "string",+ "x-order": 2+ },+ "lora_scale_transformer": {+ "default": 1,+ "description": "Determines how strongly the transformer LoRA should be applied.",+ "title": "Lora Scale Transformer",+ "type": "number",+ "x-order": 12+ },+ "lora_scale_transformer_2": {+ "default": 1,+ "description": "Determines how strongly the transformer_2 LoRA should be applied.",+ "title": "Lora Scale Transformer 2",+ "type": "number",+ "x-order": 14+ },+ "lora_weights_transformer": {+ "description": "Load LoRA weights for the HIGH transformer. Supports arbitrary .safetensors URLs from the Internet (for example, 'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_hinoise.safetensors')",+ "nullable": true,+ "title": "Lora Weights Transformer",+ "type": "string",+ "x-order": 11+ },+ "lora_weights_transformer_2": {+ "description": "Load LoRA weights for the LOW transformer_2. Supports arbitrary .safetensors URLs from the Internet. Can be different from transformer LoRA. (for example, 'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_lownoise.safetensors')",+ "nullable": true,+ "title": "Lora Weights Transformer 2",+ "type": "string",+ "x-order": 13+ },+ "num_frames": {+ "default": 81,+ "description": "Number of video frames. 81 frames give the best results",+ "maximum": 121,+ "minimum": 81,+ "title": "Num Frames",+ "type": "integer",+ "x-order": 3+ },+ "prompt": {+ "description": "Prompt for video generation",+ "title": "Prompt",+ "type": "string",+ "x-order": 0+ },+ "resolution": {+ "default": "480p",+ "description": "Resolution of video. 16:9 corresponds to 832x480px, and 9:16 is 480x832px",+ "enum": [+ "480p",+ "720p"+ ],+ "title": "resolution",+ "type": "string",+ "x-order": 4+ },+ "sample_shift": {+ "default": 12,+ "description": "Sample shift factor",+ "maximum": 20,+ "minimum": 1,+ "title": "Sample Shift",+ "type": "number",+ "x-order": 8+ },+ "seed": {+ "description": "Random seed. Leave blank for random",+ "nullable": true,+ "title": "Seed",+ "type": "integer",+ "x-order": 9+ }+ },+ "required": [+ "prompt",+ "image"+ ],+ "title": "Input",+ "type": "object"+ }+ },+ "title": "PredictionRequest",+ "type": "object"+ },+ "PredictionResponse": {+ "properties": {+ "completed_at": {+ "format": "date-time",+ "title": "Completed At",+ "type": "string"+ },+ "created_at": {+ "format": "date-time",+ "title": "Created At",+ "type": "string"+ },+ "error": {+ "title": "Error",+ "type": "string"+ },+ "id": {+ "title": "Id",+ "type": "string"+ },+ "input": {+ "properties": {+ "disable_safety_checker": {+ "default": false,+ "description": "Disable safety checker for generated video.",+ "title": "Disable Safety Checker",+ "type": "boolean",+ "x-order": 10+ },+ "frames_per_second": {+ "default": 16,+ "description": "Frames per second. Note that the pricing of this model is based on the video duration at 16 fps",+ "maximum": 30,+ "minimum": 5,+ "title": "Frames Per Second",+ "type": "integer",+ "x-order": 5+ },+ "go_fast": {+ "default": true,+ "description": "Go fast",+ "title": "Go Fast",+ "type": "boolean",+ "x-order": 7+ },+ "image": {+ "description": "Input image to generate video from.",+ "format": "uri",+ "title": "Image",+ "type": "string",+ "x-order": 1+ },+ "interpolate_output": {+ "default": false,+ "description": "Interpolate the generated video to 30 FPS using ffmpeg",+ "title": "Interpolate Output",+ "type": "boolean",+ "x-order": 6+ },+ "last_image": {+ "description": "Optional last image to condition the video generation. If provided, creates smoother transitions between frames.",+ "format": "uri",+ "nullable": true,+ "title": "Last Image",+ "type": "string",+ "x-order": 2+ },+ "lora_scale_transformer": {+ "default": 1,+ "description": "Determines how strongly the transformer LoRA should be applied.",+ "title": "Lora Scale Transformer",+ "type": "number",+ "x-order": 12+ },+ "lora_scale_transformer_2": {+ "default": 1,+ "description": "Determines how strongly the transformer_2 LoRA should be applied.",+ "title": "Lora Scale Transformer 2",+ "type": "number",+ "x-order": 14+ },+ "lora_weights_transformer": {+ "description": "Load LoRA weights for the HIGH transformer. Supports arbitrary .safetensors URLs from the Internet (for example, 'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_hinoise.safetensors')",+ "nullable": true,+ "title": "Lora Weights Transformer",+ "type": "string",+ "x-order": 11+ },+ "lora_weights_transformer_2": {+ "description": "Load LoRA weights for the LOW transformer_2. Supports arbitrary .safetensors URLs from the Internet. Can be different from transformer LoRA. (for example, 'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_lownoise.safetensors')",+ "nullable": true,+ "title": "Lora Weights Transformer 2",+ "type": "string",+ "x-order": 13+ },+ "num_frames": {+ "default": 81,+ "description": "Number of video frames. 81 frames give the best results",+ "maximum": 121,+ "minimum": 81,+ "title": "Num Frames",+ "type": "integer",+ "x-order": 3+ },+ "prompt": {+ "description": "Prompt for video generation",+ "title": "Prompt",+ "type": "string",+ "x-order": 0+ },+ "resolution": {+ "default": "480p",+ "description": "Resolution of video. 16:9 corresponds to 832x480px, and 9:16 is 480x832px",+ "enum": [+ "480p",+ "720p"+ ],+ "title": "resolution",+ "type": "string",+ "x-order": 4+ },+ "sample_shift": {+ "default": 12,+ "description": "Sample shift factor",+ "maximum": 20,+ "minimum": 1,+ "title": "Sample Shift",+ "type": "number",+ "x-order": 8+ },+ "seed": {+ "description": "Random seed. Leave blank for random",+ "nullable": true,+ "title": "Seed",+ "type": "integer",+ "x-order": 9+ }+ },+ "required": [+ "prompt",+ "image"+ ],+ "title": "Input",+ "type": "object"+ },+ "logs": {+ "title": "Logs",+ "type": "string"+ },+ "metrics": {+ "title": "Metrics",+ "type": "object"+ },+ "output": {+ "format": "uri",+ "title": "Output",+ "type": "string"+ },+ "started_at": {+ "format": "date-time",+ "title": "Started At",+ "type": "string"+ },+ "status": {+ "title": "Status",+ "type": "string"+ },+ "version": {+ "title": "Version",+ "type": "string"+ }+ },+ "title": "PredictionResponse",+ "type": "object"+ },+ "Status": {+ "description": "An enumeration.",+ "enum": [+ "starting",+ "processing",+ "succeeded",+ "canceled",+ "failed"+ ],+ "title": "Status",+ "type": "string"+ },+ "ValidationError": {+ "properties": {+ "loc": {+ "items": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "integer"+ }+ ]+ },+ "title": "Location",+ "type": "array"+ },+ "msg": {+ "title": "Message",+ "type": "string"+ },+ "type": {+ "title": "Error Type",+ "type": "string"+ }+ },+ "required": [+ "loc",+ "msg",+ "type"+ ],+ "title": "ValidationError",+ "type": "object"+ },+ "resolution": {+ "description": "An enumeration.",+ "enum": [+ "480p",+ "720p"+ ],+ "title": "resolution",+ "type": "string"+ }+ }+ },+ "info": {+ "title": "Cog",+ "version": "0.1.0"+ },+ "openapi": "3.0.2",+ "paths": {+ "/": {+ "get": {+ "operationId": "root__get",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ }+ },+ "summary": "Root"+ }+ },+ "/health-check": {+ "get": {+ "operationId": "healthcheck_health_check_get",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ }+ },+ "summary": "Healthcheck"+ }+ },+ "/predictions": {+ "post": {+ "description": "Run a single prediction on the model",+ "operationId": "predict_predictions_post",+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "properties": {+ "id": {+ "title": "Id",+ "type": "string"+ },+ "input": {+ "properties": {+ "disable_safety_checker": {+ "default": false,+ "description": "Disable safety checker for generated video.",+ "title": "Disable Safety Checker",+ "type": "boolean",+ "x-order": 10+ },+ "frames_per_second": {+ "default": 16,+ "description": "Frames per second. Note that the pricing of this model is based on the video duration at 16 fps",+ "maximum": 30,+ "minimum": 5,+ "title": "Frames Per Second",+ "type": "integer",+ "x-order": 5+ },+ "go_fast": {+ "default": true,+ "description": "Go fast",+ "title": "Go Fast",+ "type": "boolean",+ "x-order": 7+ },+ "image": {+ "description": "Input image to generate video from.",+ "format": "uri",+ "title": "Image",+ "type": "string",+ "x-order": 1+ },+ "interpolate_output": {+ "default": false,+ "description": "Interpolate the generated video to 30 FPS using ffmpeg",+ "title": "Interpolate Output",+ "type": "boolean",+ "x-order": 6+ },+ "last_image": {+ "description": "Optional last image to condition the video generation. If provided, creates smoother transitions between frames.",+ "format": "uri",+ "nullable": true,+ "title": "Last Image",+ "type": "string",+ "x-order": 2+ },+ "lora_scale_transformer": {+ "default": 1,+ "description": "Determines how strongly the transformer LoRA should be applied.",+ "title": "Lora Scale Transformer",+ "type": "number",+ "x-order": 12+ },+ "lora_scale_transformer_2": {+ "default": 1,+ "description": "Determines how strongly the transformer_2 LoRA should be applied.",+ "title": "Lora Scale Transformer 2",+ "type": "number",+ "x-order": 14+ },+ "lora_weights_transformer": {+ "description": "Load LoRA weights for the HIGH transformer. Supports arbitrary .safetensors URLs from the Internet (for example, 'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_hinoise.safetensors')",+ "nullable": true,+ "title": "Lora Weights Transformer",+ "type": "string",+ "x-order": 11+ },+ "lora_weights_transformer_2": {+ "description": "Load LoRA weights for the LOW transformer_2. Supports arbitrary .safetensors URLs from the Internet. Can be different from transformer LoRA. (for example, 'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_lownoise.safetensors')",+ "nullable": true,+ "title": "Lora Weights Transformer 2",+ "type": "string",+ "x-order": 13+ },+ "num_frames": {+ "default": 81,+ "description": "Number of video frames. 81 frames give the best results",+ "maximum": 121,+ "minimum": 81,+ "title": "Num Frames",+ "type": "integer",+ "x-order": 3+ },+ "prompt": {+ "description": "Prompt for video generation",+ "title": "Prompt",+ "type": "string",+ "x-order": 0+ },+ "resolution": {+ "default": "480p",+ "description": "Resolution of video. 16:9 corresponds to 832x480px, and 9:16 is 480x832px",+ "enum": [+ "480p",+ "720p"+ ],+ "title": "resolution",+ "type": "string",+ "x-order": 4+ },+ "sample_shift": {+ "default": 12,+ "description": "Sample shift factor",+ "maximum": 20,+ "minimum": 1,+ "title": "Sample Shift",+ "type": "number",+ "x-order": 8+ },+ "seed": {+ "description": "Random seed. Leave blank for random",+ "nullable": true,+ "title": "Seed",+ "type": "integer",+ "x-order": 9+ }+ },+ "required": [+ "prompt",+ "image"+ ],+ "title": "Input",+ "type": "object"+ }+ },+ "title": "PredictionRequest",+ "type": "object"+ }+ }+ }+ },+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {+ "properties": {+ "completed_at": {+ "format": "date-time",+ "title": "Completed At",+ "type": "string"+ },+ "created_at": {+ "format": "date-time",+ "title": "Created At",+ "type": "string"+ },+ "error": {+ "title": "Error",+ "type": "string"+ },+ "id": {+ "title": "Id",+ "type": "string"+ },+ "input": {+ "properties": {+ "disable_safety_checker": {+ "default": false,+ "description": "Disable safety checker for generated video.",+ "title": "Disable Safety Checker",+ "type": "boolean",+ "x-order": 10+ },+ "frames_per_second": {+ "default": 16,+ "description": "Frames per second. Note that the pricing of this model is based on the video duration at 16 fps",+ "maximum": 30,+ "minimum": 5,+ "title": "Frames Per Second",+ "type": "integer",+ "x-order": 5+ },+ "go_fast": {+ "default": true,+ "description": "Go fast",+ "title": "Go Fast",+ "type": "boolean",+ "x-order": 7+ },+ "image": {+ "description": "Input image to generate video from.",+ "format": "uri",+ "title": "Image",+ "type": "string",+ "x-order": 1+ },+ "interpolate_output": {+ "default": false,+ "description": "Interpolate the generated video to 30 FPS using ffmpeg",+ "title": "Interpolate Output",+ "type": "boolean",+ "x-order": 6+ },+ "last_image": {+ "description": "Optional last image to condition the video generation. If provided, creates smoother transitions between frames.",+ "format": "uri",+ "nullable": true,+ "title": "Last Image",+ "type": "string",+ "x-order": 2+ },+ "lora_scale_transformer": {+ "default": 1,+ "description": "Determines how strongly the transformer LoRA should be applied.",+ "title": "Lora Scale Transformer",+ "type": "number",+ "x-order": 12+ },+ "lora_scale_transformer_2": {+ "default": 1,+ "description": "Determines how strongly the transformer_2 LoRA should be applied.",+ "title": "Lora Scale Transformer 2",+ "type": "number",+ "x-order": 14+ },+ "lora_weights_transformer": {+ "description": "Load LoRA weights for the HIGH transformer. Supports arbitrary .safetensors URLs from the Internet (for example, 'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_hinoise.safetensors')",+ "nullable": true,+ "title": "Lora Weights Transformer",+ "type": "string",+ "x-order": 11+ },+ "lora_weights_transformer_2": {+ "description": "Load LoRA weights for the LOW transformer_2. Supports arbitrary .safetensors URLs from the Internet. Can be different from transformer LoRA. (for example, 'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_lownoise.safetensors')",+ "nullable": true,+ "title": "Lora Weights Transformer 2",+ "type": "string",+ "x-order": 13+ },+ "num_frames": {+ "default": 81,+ "description": "Number of video frames. 81 frames give the best results",+ "maximum": 121,+ "minimum": 81,+ "title": "Num Frames",+ "type": "integer",+ "x-order": 3+ },+ "prompt": {+ "description": "Prompt for video generation",+ "title": "Prompt",+ "type": "string",+ "x-order": 0+ },+ "resolution": {+ "default": "480p",+ "description": "Resolution of video. 16:9 corresponds to 832x480px, and 9:16 is 480x832px",+ "enum": [+ "480p",+ "720p"+ ],+ "title": "resolution",+ "type": "string",+ "x-order": 4+ },+ "sample_shift": {+ "default": 12,+ "description": "Sample shift factor",+ "maximum": 20,+ "minimum": 1,+ "title": "Sample Shift",+ "type": "number",+ "x-order": 8+ },+ "seed": {+ "description": "Random seed. Leave blank for random",+ "nullable": true,+ "title": "Seed",+ "type": "integer",+ "x-order": 9+ }+ },+ "required": [+ "prompt",+ "image"+ ],+ "title": "Input",+ "type": "object"+ },+ "logs": {+ "title": "Logs",+ "type": "string"+ },+ "metrics": {+ "title": "Metrics",+ "type": "object"+ },+ "output": {+ "format": "uri",+ "title": "Output",+ "type": "string"+ },+ "started_at": {+ "format": "date-time",+ "title": "Started At",+ "type": "string"+ },+ "status": {+ "title": "Status",+ "type": "string"+ },+ "version": {+ "title": "Version",+ "type": "string"+ }+ },+ "title": "PredictionResponse",+ "type": "object"+ }+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "properties": {+ "detail": {+ "items": {+ "properties": {+ "loc": {+ "items": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "integer"+ }+ ]+ },+ "title": "Location",+ "type": "array"+ },+ "msg": {+ "title": "Message",+ "type": "string"+ },+ "type": {+ "title": "Error Type",+ "type": "string"+ }+ },+ "required": [+ "loc",+ "msg",+ "type"+ ],+ "title": "ValidationError",+ "type": "object"+ },+ "title": "Detail",+ "type": "array"+ }+ },+ "title": "HTTPValidationError",+ "type": "object"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Predict"+ }+ },+ "/predictions/{prediction_id}/cancel": {+ "post": {+ "operationId": "cancel_predictions__prediction_id__cancel_post",+ "parameters": [+ {+ "in": "path",+ "name": "prediction_id",+ "required": true,+ "schema": {+ "title": "Prediction Id",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "properties": {+ "detail": {+ "items": {+ "properties": {+ "loc": {+ "items": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "integer"+ }+ ]+ },+ "title": "Location",+ "type": "array"+ },+ "msg": {+ "title": "Message",+ "type": "string"+ },+ "type": {+ "title": "Error Type",+ "type": "string"+ }+ },+ "required": [+ "loc",+ "msg",+ "type"+ ],+ "title": "ValidationError",+ "type": "object"+ },+ "title": "Detail",+ "type": "array"+ }+ },+ "title": "HTTPValidationError",+ "type": "object"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Cancel"+ }+ }+ }+ },+ "source": "https://replicate.com/wan-video/wan-2.2-i2v-fast/api/schema",+ "uses_versionless_api": true,+ "version_created_at": "2026-09-17T08:35:18.143459Z",+ "version_id": "4d9f302ce75125a365469e2fe1b65e50d70de4e0e1e3d438d695db5e8bb32e27"+}diff --git a/tests/fuobe-animation-cloud-film.test.ts b/tests/fuobe-animation-cloud-film.test.tsindex 01ff9180..e382f953 100644--- a/tests/fuobe-animation-cloud-film.test.ts+++ b/tests/fuobe-animation-cloud-film.test.ts@@ -1,13 +1,14 @@import { afterAll, beforeAll, describe, expect, it } from "vitest";-import { keyTimes } from "@/lib/inbetween";-import { startFakeFal, type FakeCloud } from "./helpers/fake-cloud";+import { keyTimes, resampleGap } from "@/lib/inbetween";+import { startFakeFal, startFakeReplicate, type FakeCloud } from "./helpers/fake-cloud";import { TINY_MP4 } from "./helpers/fake-comfy-runner";import { tempDir } from "./helpers/temp-dir";+import { bodyProblems } from "./helpers/provider-schemas";-// Fuobe Animation's cloud film with a fal key (not demo mode), on the stand-in fal: the film is planned with its AniSora-// LoRA, each gap is one request to fal's Wan 2.2 A14B `/lora` endpoint in the shape its OpenAPI schema takes-// (https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/wan/v2.2-a14b/image-to-video/lora), and the-// clips are joined with fal's merge-videos. No real call.+// Fuobe Animation's cloud film with a Replicate token and a fal key (not demo mode), on the stand-in providers: each gap+// is one prediction on Replicate's fast Wan 2.2 (https://replicate.com/wan-video/wan-2.2-i2v-fast/api/schema) with+// AniSora as the high-noise expert's weights, made at 81 frames; a shorter gap is brought down to its own frames with+// fal's extract-nth-frame and images-to-video, and the gaps are joined with fal's merge-videos. No real call.const dir = tempDir("fuobe-animation-cloud-film-");process.env.FUOBE_DATA_DIR = dir;process.env.COMFYUI_URL = "http://127.0.0.1:9";@@ -22,19 +23,44 @@ const png = Buffer.from("89504e470d0a1a0a0000000d4948445200000001000000010806000const frames = (n: number) => Array.from({ length: n }, () => saveFile({ data: png, contentType: "image/png", source: "upload" }).url);let fal: FakeCloud;+let rep: FakeCloud;beforeAll(async () => {fal = await startFakeFal();+ rep = await startFakeReplicate();globalThis.__fuobeTestFalUrl = fal.url;+ globalThis.__fuobeTestReplicateUrl = rep.url;fal.keys["test-fal"] = "good";+ rep.keys["test-rep"] = "good";fal.pollsToFinish = 1;+ rep.pollsToFinish = 1;setSetting("falKey", "test-fal");+ setSetting("replicateToken", "test-rep");setSetting("demoMode", "off");- // Each endpoint's documented output: Wan's { video: File, prompt, seed }, merge-videos' { video: File, metadata }.+ // Replicate's answer: the clip's URL. fal's: the frames ({ images, frame_count }), then a video ({ video: File }).+ const frameCount = new Map<string, number>();+ rep.script = (r) => {+ const path = r.path.split("?")[0];+ if (r.method === "GET" && path === "/files/clip.mp4") return { status: 200, body: TINY_MP4.toString("latin1"), headers: { "Content-Type": "video/mp4" } };+ const one = /^\/v1\/predictions\/([^/]+)$/.exec(path);+ if (one && r.method === "GET") return { status: 200, body: { id: one[1], status: "succeeded", output: `${rep.url}/files/clip.mp4` } };+ return null;+ };fal.script = (r) => {const path = r.path.split("?")[0];if (r.method === "GET" && path === "/files/out.mp4") return { status: 200, body: TINY_MP4.toString("latin1"), headers: { "Content-Type": "video/mp4" } };- if (r.method === "GET" && /^\/fal-ai\/wan\/requests\/[^/]+$/.test(path)) return { status: 200, body: { video: { url: `${fal.url}/files/out.mp4`, content_type: "video/mp4" }, prompt: "p", seed: 1 } };+ if (r.method === "GET" && /^\/files\/frames-\d+-\d+\.png$/.test(path)) return { status: 200, body: png.toString("latin1"), headers: { "Content-Type": "image/png" } };+ if (r.method === "POST" && path === "/fal-ai/workflow-utilities/extract-nth-frame") {+ const id = `frames-${frameCount.size + 1}`;+ frameCount.set(id, JSON.parse(r.body).max_frames);+ const base = `${fal.url}/fal-ai/workflow-utilities/requests/${id}`;+ return { status: 200, body: { request_id: id, status_url: `${base}/status`, response_url: base, cancel_url: `${base}/cancel` } };+ }+ const taken = /^\/fal-ai\/workflow-utilities\/requests\/(frames-\d+)$/.exec(path);+ if (r.method === "GET" && taken) {+ const n = frameCount.get(taken[1]) ?? 1;+ return { status: 200, body: { frame_count: n, images: Array.from({ length: n }, (_, i) => ({ url: `${fal.url}/files/${taken[1]}-${i}.png`, content_type: "image/png" })) } };+ }if (r.method === "GET" && /^\/fal-ai\/ffmpeg-api\/requests\/[^/]+$/.test(path)) return { status: 200, body: { video: { url: `${fal.url}/files/out.mp4`, content_type: "video/mp4" }, metadata: {} } };return null;};@@ -42,7 +68,9 @@ beforeAll(async () => {afterAll(async () => {globalThis.__fuobeTestFalUrl = undefined;+ globalThis.__fuobeTestReplicateUrl = undefined;await fal.close();+ await rep.close();});async function settle(id: string, ms = 40_000) {@@ -55,12 +83,13 @@ async function settle(id: string, ms = 40_000) {}}-describe("Fuobe Animation in the cloud with a fal key", () => {- it("keeps AniSora on the film: each gap goes to Wan 2.2's /lora with it, then the clips are joined", async () => {+describe("Fuobe Animation in the cloud with a Replicate token", () => {+ it("makes each gap on Replicate's fast Wan 2.2 with AniSora, brings it to the gap's frames and joins the film", async () => {const images = frames(3);const timing = { gaps: [{ frames: 17, speed: 1 as const, prompt: "it lands" }, { frames: 81, speed: 1 as const }], fps: 16 as const };- const from = fal.log.length;- const [film, ...clips] = gens.createGenerations({+ const repFrom = rep.log.length;+ const falFrom = fal.log.length;+ const [film, ...steps] = gens.createGenerations({feature: "video",modelId: "fuobe-animation",engine: "cloud",@@ -70,29 +99,56 @@ describe("Fuobe Animation in the cloud with a fal key", () => {params: { aspectRatio: "16:9", resolution: "480p", seed: 42, numOutputs: 1, duration: 6, keyframeTimes: keyTimes(timing), extra: { inbetween: timing } },});expect(film).toMatchObject({ op: "concat", modelId: "join-clips" });- expect(clips.map((c) => c.op)).toEqual(["flf2v", "flf2v"]);- expect((await settle(film.id, 60_000)).status).toBe("succeeded");+ // The 17-frame gap: its clip, its frames (every 5th of 81), the gap at 16 fps; the 81-frame gap as made.+ expect(steps.map((c) => c.op)).toEqual(["flf2v", "extract-frames", "images-to-video", "flf2v"]);+ const done = await settle(film.id, 60_000);+ const why = [film, ...steps].map((g) => `${g.op}: ${gens.getGeneration(g.id)!.status} ${gens.getGeneration(g.id)!.message ?? ""} ${(gens.getGeneration(g.id) as { error?: string }).error ?? ""}`).join(" | ");+ expect(done.status, why).toBe("succeeded");- const posts = fal.log.slice(from).filter((r) => r.method === "POST" && !r.path.startsWith("/storage"));- const gaps = posts.filter((r) => r.path === "/fal-ai/wan/v2.2-a14b/image-to-video/lora").map((r) => JSON.parse(r.body));- expect(gaps).toHaveLength(2);- for (const body of gaps) {- expect(body).toMatchObject({- image_url: expect.stringMatching(/^http/),- end_image_url: expect.stringMatching(/^http/),- aspect_ratio: "16:9",+ const predictions = rep.log.slice(repFrom).filter((r) => r.method === "POST" && /predictions$/.test(r.path));+ expect(predictions.map((r) => r.path)).toEqual(["/v1/models/wan-video/wan-2.2-i2v-fast/predictions", "/v1/models/wan-video/wan-2.2-i2v-fast/predictions"]);+ for (const r of predictions) {+ const { input } = JSON.parse(r.body) as { input: Record<string, unknown> };+ expect(input).toMatchObject({+ image: expect.stringMatching(/^(http|data:)/),+ last_image: expect.stringMatching(/^(http|data:)/),resolution: "480p",- interpolator_model: "none",+ num_frames: 81,frames_per_second: 16,- loras: [{ path: ANISORA.url, scale: 1, transformer: "high" }],+ interpolate_output: false,+ seed: 42,+ lora_weights_transformer: ANISORA.url,+ lora_scale_transformer: 1,});- expect(typeof body.prompt).toBe("string");- expect(body.seed).toBe(42);+ expect(input).not.toHaveProperty("lora_weights_transformer_2");+ expect(bodyProblems("replicate", "wan-video/wan-2.2-i2v-fast", input)).toEqual([]);}- // Each gap's own frames: 17 and 81 (4n + 1, within the schema's 17-161).- expect(gaps.map((b) => b.num_frames).sort((a, b) => a - b)).toEqual([17, 81]);- // The join: fal's merge-videos takes the clips in order (video_urls, at least 2).++ const posts = fal.log.slice(falFrom).filter((r) => r.method === "POST" && !r.path.startsWith("/storage"));+ const extract = posts.filter((r) => r.path === "/fal-ai/workflow-utilities/extract-nth-frame").map((r) => JSON.parse(r.body));+ expect(extract).toEqual([expect.objectContaining({ frame_interval: 5, max_frames: 17, output_format: "jpg", quality: 95 })]);+ const back = posts.filter((r) => r.path === "/fal-ai/ffmpeg-api/images-to-video").map((r) => JSON.parse(r.body));+ expect(back).toHaveLength(1);+ expect(back[0].fps).toBe(16);+ expect(back[0].images).toHaveLength(17);const join = posts.find((r) => r.path === "/fal-ai/ffmpeg-api/merge-videos");expect(JSON.parse(join!.body).video_urls).toHaveLength(2);}, 90_000);++ it("one gap shorter than 81 frames: the gap brought to its length is the film", () => {+ const timing = { gaps: [{ frames: 33, speed: 1 as const }], fps: 16 as const };+ const [film, ...steps] = gens.createGenerations({+ feature: "video",+ modelId: "fuobe-animation",+ engine: "cloud",+ op: "keyframes",+ prompt: "a fox turns",+ inputs: { images: frames(2) },+ params: { aspectRatio: "16:9", resolution: "480p", keyframeTimes: keyTimes(timing), extra: { inbetween: timing } },+ });+ expect(film.op).toBe("images-to-video");+ expect(film.request.chain?.map((s) => s.index)).toEqual(resampleGap(81, 33)!.picks);+ expect(steps.map((s) => s.op).sort()).toEqual(["extract-frames", "flf2v"]);+ for (const g of [film, ...steps]) void gens.cancelGeneration(g.id);+ });});diff --git a/tests/hosted-untested.test.ts b/tests/hosted-untested.test.tsindex af8b8566..d33b0bd0 100644--- a/tests/hosted-untested.test.ts+++ b/tests/hosted-untested.test.ts@@ -118,7 +118,7 @@ describe("hosted routes without a live call", () => {expect(song?.ownSetup).toBe("mureka-extend");// The Original's cloud half needs the key; its open half runs as before.expect(ownSetupOnly("fuobe-animation")).toBeNull();- expect(ownSetupOnly("fuobe-animation", "cloud")).toEqual({ need: "key", provider: "fal" });+ expect(ownSetupOnly("fuobe-animation", "cloud")).toEqual({ need: "key", provider: "replicate" });});});diff --git a/tests/inbetween-graph.test.ts b/tests/inbetween-graph.test.tsindex 56b6f1af..dfc0176f 100644--- a/tests/inbetween-graph.test.ts+++ b/tests/inbetween-graph.test.ts@@ -90,7 +90,7 @@ describe("Fuobe Animation in the catalog", () => {expect(m.options.loras?.map((l) => [l.file, l.target])).toEqual([["Wan2_2_I2V_AniSora_3_2_HIGH_rank_64_fp16.safetensors", "high"]]);expect(m.routes.filter((r) => r.op === "keyframes").map((r) => [r.provider, r.endpoint, !!r.chained])).toEqual([["comfyui", "wan22-inbetween-anisora", false],- ["fal", "fal-ai/wan/v2.2-a14b/image-to-video", true],+ ["replicate", "wan-video/wan-2.2-i2v-fast", true],]);});diff --git a/tests/inbetween-resample.test.ts b/tests/inbetween-resample.test.tsnew file mode 100644index 00000000..d24b0255--- /dev/null+++ b/tests/inbetween-resample.test.ts@@ -0,0 +1,65 @@+import { describe, expect, it } from "vitest";+import { getModel } from "@/lib/catalog";+import { onEngine } from "@/lib/catalog/engines";+import { estimateCost } from "@/lib/catalog/plan";+import { GAP_STEP, keyTimes, MAX_GAP_FRAMES, MIN_GAP_FRAMES, resampleGap } from "@/lib/inbetween";++/*+ * Fuobe Animation in the cloud: Replicate's fast Wan 2.2 makes at least 81 frames a clip, so each gap (17-81 frames in+ * steps of 4) is made as 81 and brought down to its own frames inside the film.+ */+describe("a gap made as 81 frames, brought to its own length", () => {+ it("takes every Nth frame exactly where 80 divides by the gap's steps", () => {+ expect(resampleGap(81, 17)).toEqual({ interval: 5, picks: Array.from({ length: 17 }, (_, i) => i) });+ expect(resampleGap(81, 21)).toEqual({ interval: 4, picks: Array.from({ length: 21 }, (_, i) => i) });+ expect(resampleGap(81, 41)).toEqual({ interval: 2, picks: Array.from({ length: 41 }, (_, i) => i) });+ // The frames taken are the made frames 0, N, 2N … 80: both keyframes land on screen.+ for (const f of [17, 21, 41]) {+ const r = resampleGap(81, f)!;+ expect((r.picks.at(-1)! * r.interval), `${f}`).toBe(80);+ }+ });++ it("otherwise takes every frame and picks the nearest one at each of the gap's places in time", () => {+ const r = resampleGap(81, 33)!;+ expect(r.interval).toBe(1);+ expect(r.picks).toHaveLength(33);+ // 80 / 32 = 2.5 made frames a gap frame: 0, 2.5 → 3 (half rounds up), 5, 7.5 → 8 …+ expect(r.picks.slice(0, 5)).toEqual([0, 3, 5, 8, 10]);+ expect(r.picks.at(-1)).toBe(80);+ });++ it("every gap length the studio offers: as many frames as the gap, in order, from the first made frame to the last", () => {+ for (let f = MIN_GAP_FRAMES; f < MAX_GAP_FRAMES; f += GAP_STEP) {+ const r = resampleGap(81, f)!;+ const made = r.picks.map((p) => p * r.interval);+ expect(made, `${f}`).toHaveLength(f);+ expect(made[0], `${f}`).toBe(0);+ expect(made.at(-1), `${f}`).toBe(80);+ for (let i = 1; i < made.length; i++) expect(made[i], `${f} @${i}`).toBeGreaterThan(made[i - 1]);+ // Each pick is the made frame nearest its place in time (within half a frame).+ made.forEach((m, i) => expect(Math.abs(m - (i * 80) / (f - 1)), `${f} @${i}`).toBeLessThanOrEqual(0.5));+ }+ });++ it("a gap already as long as its clip is left as made", () => {+ expect(resampleGap(81, 81)).toBeNull();+ expect(resampleGap(17, 33)).toBeNull();+ });+});++describe("the cloud film's price on Replicate", () => {+ const cloud = onEngine(getModel("fuobe-animation")!, "cloud");++ it("is Replicate's price per output video, one clip a gap, whatever the gap's length", () => {+ expect(cloud.routes.map((r) => `${r.provider}:${r.endpoint}`)).toContain("replicate:wan-video/wan-2.2-i2v-fast");+ expect(cloud.pricing).toMatchObject({ unit: "video", usd: 0.11, byResolution: { "720p": 0.11, "480p": 0.05 } });+ // One gap's clip.+ expect(estimateCost(cloud, { resolution: "480p", duration: 1 }, 1, "flf2v")).toBeCloseTo(0.05, 6);+ expect(estimateCost(cloud, { resolution: "720p", duration: 5 }, 1, "flf2v")).toBeCloseTo(0.11, 6);+ // The film: three gaps of 17, 33 and 81 frames at 720p are three clips.+ const timing = { gaps: [{ frames: 17, speed: 1 as const }, { frames: 33, speed: 1 as const }, { frames: 81, speed: 1 as const }], fps: 16 as const };+ expect(estimateCost(cloud, { resolution: "720p", keyframeTimes: keyTimes(timing), extra: { inbetween: timing } }, 1, "keyframes")).toBeCloseTo(0.33, 6);+ expect(estimateCost(cloud, { resolution: "480p", keyframeTimes: [0, 1, 2] }, 1, "keyframes")).toBeCloseTo(0.1, 6);+ });+});diff --git a/tests/inbetween-runs.test.ts b/tests/inbetween-runs.test.tsindex 6fc65051..3a82a20e 100644--- a/tests/inbetween-runs.test.ts+++ b/tests/inbetween-runs.test.ts@@ -1,5 +1,5 @@import { beforeAll, describe, expect, it } from "vitest";-import { keyTimes, WORKFLOW_TIMING } from "@/lib/inbetween";+import { keyTimes, resampleGap, WORKFLOW_TIMING } from "@/lib/inbetween";import { tempDir } from "./helpers/temp-dir";// Fuobe Animation's runs in demo mode (no keys, no GPU): one row on your GPU, one clip per gap and a join in the cloud.@@ -56,14 +56,24 @@ describe("Fuobe Animation runs", () => {params: { aspectRatio: "16:9", keyframeTimes: keyTimes(timing), extra: { inbetween: timing, stillMouth: true } },});expect(film).toMatchObject({ op: "concat" });- expect(clips.map((c) => c.op)).toEqual(["flf2v", "flf2v"]);- expect(clips.map((c) => c.request.params?.duration)).toEqual([2, 1]);- expect(clips.map((c) => c.request.prompt)).toEqual(["a fox leaps. it lands. mouth does not move", "a fox leaps. mouth does not move"]);- expect(clips.every((c) => c.request.params?.extra?.inbetween === undefined)).toBe(true);- expect(clips.map((c) => [c.request.inputs?.images, c.request.inputs?.endImage])).toEqual([+ const gaps = clips.filter((c) => c.op === "flf2v");+ expect(gaps.map((c) => c.request.params?.duration)).toEqual([2, 1]);+ expect(gaps.map((c) => c.request.prompt)).toEqual(["a fox leaps. it lands. mouth does not move", "a fox leaps. mouth does not move"]);+ expect(gaps.every((c) => c.request.params?.extra?.inbetween === undefined)).toBe(true);+ expect(gaps.map((c) => [c.request.inputs?.images, c.request.inputs?.endImage])).toEqual([[[images[0]], images[1]],[[images[1]], images[2]],]);+ // Replicate makes 81 frames a clip: each gap is brought down to its own frames (33: 80 / 32 isn't whole, so+ // every frame is taken and the nearest picked; 17: every 5th), put back together at 16 fps, then the film is joined.+ expect(clips.map((c) => c.op)).toEqual(["flf2v", "extract-frames", "images-to-video", "flf2v", "extract-frames", "images-to-video"]);+ const taken = clips.filter((c) => c.op === "extract-frames");+ expect(taken.map((c) => c.request.params?.frameInterval)).toEqual([1, 5]);+ const back = clips.filter((c) => c.op === "images-to-video");+ expect(back.map((c) => c.request.chain?.length)).toEqual([33, 17]);+ expect(back.map((c) => c.request.params?.fps)).toEqual([16, 16]);+ expect(back[0].request.chain?.map((s) => s.index)).toEqual(resampleGap(81, 33)!.picks);+ expect(back[1].request.chain?.map((s) => s.index)).toEqual(Array.from({ length: 17 }, (_, i) => i));expect((await settle(film.id, 60_000)).status).toBe("succeeded");}, 70_000);diff --git a/tests/own-setup.test.ts b/tests/own-setup.test.tsindex 4dcf6e3d..dfc43da4 100644--- a/tests/own-setup.test.ts+++ b/tests/own-setup.test.ts@@ -104,7 +104,7 @@ describe("own setup: what a visitor needs", () => {it("leaves everything else as it is", () => {for (const id of ["oss-qwen-image-21", "nano-banana-pro", "oss-kandinsky6", "oss-h3-group-swap", "no-such-model"]) expect(ownSetupOnly(id), id).toBeNull();expect(ownSetupOnly("fuobe-animation")).toBeNull();- expect(ownSetupOnly("fuobe-animation", "cloud")).toEqual({ need: "key", provider: "fal" });+ expect(ownSetupOnly("fuobe-animation", "cloud")).toEqual({ need: "key", provider: "replicate" });});it("knows every id its table holds by a real model where it names one", () => {diff --git a/tests/provider-conformance-paths.test.ts b/tests/provider-conformance-paths.test.tsindex 65c85f48..cb0765e8 100644--- a/tests/provider-conformance-paths.test.ts+++ b/tests/provider-conformance-paths.test.ts@@ -5,8 +5,8 @@* - Mureka's files/upload: the upload's own body ({file_url, purpose}) and the id its answer gives; a song of Mureka's own* going by its song_id instead.* - Clean dialogue on a video: extract-audio (FLAC), DeepFilterNet 3 and merge-audio-video, each step's body; VEED's video.- * - Fuobe Animation's cloud film: every gap length the film sends to Wan 2.2's /lora (17-81 frames in steps of 4 at 16 fps),- * with the user's own LoRAs on top of AniSora.+ * - Fuobe Animation's cloud film: every gap length the film sends to Replicate's fast Wan 2.2 (17-81 frames in steps of 4+ * at 16 fps, each made as 81), AniSora on the high-noise expert and a user's low-noise LoRA beside it.* - Songs with lyrics (Mureka, MiniMax Music 3, Lyria 3.5 in its prompt), instrumentals, and the API's limits on lengths.* - Pictures and clips beside the main input (Lyria's picture, Insert's references, Turbo extend's voices), each list at* the catalog's own maximum, and the 12-file total.@@ -151,12 +151,11 @@ describe("Clean dialogue on a video in the cloud: each step's body", () => {});});-describe("Fuobe Animation's cloud film: every gap the film sends, against Wan 2.2's /lora schema", () => {+describe("Fuobe Animation's cloud film: every gap the film sends, against Replicate's fast Wan 2.2 schema", () => {const anim = getModel("fuobe-animation")!;- // The user's own LoRAs (Wan 2.2 high-noise ones with a hosted copy) on top of AniSora. The schema's loras list has no- // maxItems; each scale must be 0 to 4 (LoRAWeight.scale).- const own = (n: number): LoraRef[] =>- Array.from({ length: n }, (_, i) => ({ file: `my-style-${i}.safetensors`, url: `https://huggingface.co/me/style-${i}/resolve/main/style.safetensors`, hostedUrl: `https://v3b.fal.media/files/loras/style-${i}.safetensors`, strength: 0.8, target: "high" }));+ // A user's own Wan 2.2 LoRA for one expert. Replicate takes one LoRA per expert (lora_weights_transformer for high+ // noise, _2 for low noise), by URL.+ const own = (target: "high" | "low"): LoraRef => ({ file: `my-style-${target}.safetensors`, url: `https://huggingface.co/me/style/resolve/main/style-${target}.safetensors`, strength: 0.8, target });/** One gap's clip as createKeyframeFilm makes it: start and end frames, as long as the gap's own frames at 16 fps. */const gap = (frames: number, extra: Partial<Run> = {}): Run => ({@@ -169,26 +168,28 @@ describe("Fuobe Animation's cloud film: every gap the film sends, against Wan 2....extra,});- it("each gap length, 17 to 81 frames in steps of 4, goes to /lora with AniSora and num_frames of that gap", () => {+ it("each gap length, 17 to 81 frames in steps of 4, is made as 81 frames with AniSora on the high-noise expert", () => {for (let f = MIN_GAP_FRAMES; f <= MAX_GAP_FRAMES; f += GAP_STEP) {const s = sent(gap(f));- expect(s.endpoint, `${f}`).toBe("fal-ai/wan/v2.2-a14b/image-to-video/lora");- expect(s.body.num_frames, `${f}`).toBe(f);- expect((s.body.loras as { path: string }[]).length, `${f}`).toBe(1);+ expect(s.endpoint, `${f}`).toBe("wan-video/wan-2.2-i2v-fast");+ // Replicate makes 81-121 frames: the film brings the clip down to the gap's own frames (resampleGap).+ expect(s.body.num_frames, `${f}`).toBe(81);+ expect(s.body, `${f}`).toMatchObject({ frames_per_second: 16, interpolate_output: false, last_image: END });+ expect(s.body.lora_weights_transformer, `${f}`).toMatch(/AniSora/);+ expect(s.body.lora_weights_transformer_2, `${f}`).toBeUndefined();fits(gap(f));}});- it("the user's own LoRAs go on top of AniSora, AniSora first", () => {- for (const n of [1, 2, 3, 4]) {- const run = gap(41, { loras: own(n) });- const s = sent(run);- const loras = s.body.loras as { path: string; scale: number; transformer: string }[];- expect(loras.length, `${n}`).toBe(n + 1);- expect(loras[0].path, `${n}`).toMatch(/anisora/i);- for (const l of loras) expect(["high", "low", "both"]).toContain(l.transformer);- fits(run);- }+ it("a user's low-noise LoRA goes beside AniSora; a high-noise one can't (AniSora holds that expert)", () => {+ const low = sent(gap(41, { loras: [own("low")] }));+ expect(low.body.lora_weights_transformer).toMatch(/AniSora/);+ expect(low.body.lora_weights_transformer_2).toBe(own("low").url);+ fits(gap(41, { loras: [own("low")] }));+ const high = sent(gap(41, { loras: [own("high")] }));+ expect(high.body.lora_weights_transformer).toMatch(/AniSora/);+ expect(high.body.lora_weights_transformer_2).toBeUndefined();+ fits(gap(41, { loras: [own("high")] }));});it("every shape and size the studio offers the film fits", () => {