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
Originals O13: Effects 2.0 chains as Canvas templates, a scene-setting edit then Fuobe DoP with the effect, in their own section of the picker
Claude00742cfab661
diff --git a/src/app/(studio)/canvas/page.tsx b/src/app/(studio)/canvas/page.tsxindex 42b364ef..7024d567 100644--- a/src/app/(studio)/canvas/page.tsx+++ b/src/app/(studio)/canvas/page.tsx@@ -21,6 +21,7 @@ function templateCards(): TemplateCardData[] {description: t.description,icon: t.icon,hue: t.hue,+ ...(t.group && { group: t.group }),byEngine: { cloud: forEngine(t, "cloud"), open: forEngine(t, "open") },}));}diff --git a/src/components/canvas/canvas-context.tsx b/src/components/canvas/canvas-context.tsxindex f0ed9be3..cad23fcf 100644--- a/src/components/canvas/canvas-context.tsx+++ b/src/components/canvas/canvas-context.tsx@@ -4,24 +4,34 @@ import {AtSign,AudioLines,AudioWaveform,+ Building2,+ Castle,Clapperboard,Columns3,Combine,+ Dog,Eraser,+ Feather,Film,+ Fish,Frame,GalleryHorizontal,+ Gem,ImageIcon,Languages,MessageSquareText,Mic2,MonitorPlay,Package,+ Palette,Sparkles,+ Star,StickyNote,+ Swords,Table,Type,UserRound,+ Waves,ZoomIn,type LucideIcon,} from "lucide-react";@@ -67,6 +77,17 @@ export const ICONS: Record<string, LucideIcon> = {UserRound,Languages,Table,+ // Effects 2.0 chains (src/lib/catalog/canvas.ts EFFECT_CHAINS)+ Swords,+ Feather,+ Gem,+ Palette,+ Castle,+ Waves,+ Star,+ Building2,+ Fish,+ Dog,};/** A node type's or template's icon, by lucide name. */diff --git a/src/components/canvas/canvas-list.tsx b/src/components/canvas/canvas-list.tsxindex 9944d34b..a641f0d6 100644--- a/src/components/canvas/canvas-list.tsx+++ b/src/components/canvas/canvas-list.tsx@@ -139,9 +139,16 @@ export interface TemplateCardData {description: string;icon: string;hue: number;+ /** The picker's section (Effects 2.0 chains); none: the workflows. */+ group?: string;byEngine: Record<Engine, { outline: Outline; models: string[] }>;}+/** What each template section is, under its heading. */+const GROUP_NOTES: Record<string, string> = {+ "Effects 2.0 chains": "A photo, an image edit that sets the scene, then Fuobe DoP animates it with the effect. Open weights on both engines: free on your GPU.",+};+function TemplateCard({ t, engine, onUse, busy }: { t: TemplateCardData; engine: Engine; onUse: () => void; busy: boolean }) {const { outline, models } = t.byEngine[engine];return (@@ -280,9 +287,25 @@ function ListInner({ templates }: { templates: TemplateCardData[] }) {</Empty>)) : (- <div className="mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">- {templates.map((t) => (- <TemplateCard key={t.id} t={t} engine={engine} busy={creating === t.id} onUse={() => void start(t.id, { templateId: t.id, engine })} />+ <div className="mt-6 space-y-10">+ {[...new Set(templates.map((t) => t.group ?? ""))].map((group) => (+ <section key={group || "workflows"} aria-labelledby={group ? `tpl-${group.replace(/\W+/g, "-")}` : undefined}>+ {group && (+ <div className="mb-3">+ <h2 id={`tpl-${group.replace(/\W+/g, "-")}`} className="font-heading text-[22px] leading-tight">+ {group}+ </h2>+ {GROUP_NOTES[group] && <p className="mt-0.5 text-[13px] text-muted-foreground">{GROUP_NOTES[group]}</p>}+ </div>+ )}+ <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">+ {templates+ .filter((t) => (t.group ?? "") === group)+ .map((t) => (+ <TemplateCard key={t.id} t={t} engine={engine} busy={creating === t.id} onUse={() => void start(t.id, { templateId: t.id, engine })} />+ ))}+ </div>+ </section>))}</div>)}diff --git a/src/components/preset-icons.ts b/src/components/preset-icons.tsindex 513a12cd..46fa69dc 100644--- a/src/components/preset-icons.ts+++ b/src/components/preset-icons.ts@@ -1,4 +1,4 @@// Generated by scripts/gen-icon-map.mjs — do not edit by hand.-import { Activity, Angry, Aperture, AppWindow, ArrowDown, ArrowDownToDot, ArrowDownToLine, ArrowLeft, ArrowLeftRight, ArrowLeftToLine, ArrowRight, ArrowRightLeft, ArrowRightToLine, ArrowUp, ArrowUpFromLine, ArrowUpRight, ArrowUpWideNarrow, Atom, AudioLines, Axis3d, BadgeDollarSign, Banana, Banknote, Bath, Bike, Binary, Biohazard, Bird, Blocks, Bomb, BookOpen, Bot, Box, Boxes, BriefcaseBusiness, Brush, Bug, Building, Building2, Cake, Camera, Candy, Car, CarFront, Castle, ChevronDown, ChevronUp, ChevronsDown, ChevronsLeft, ChevronsRight, ChevronsUp, Circle, CircleDashed, CircleDot, Citrus, Clapperboard, Clock, Cloud, CloudFog, CloudLightning, CloudRain, Cloudy, Coffee, Cog, Columns3, Contrast, Copy, Cpu, Crosshair, Crown, CupSoda, Diamond, Disc, Disc3, Dog, Drama, Droplet, Droplets, Dumbbell, Ear, Earth, Eraser, Expand, Eye, EyeOff, FastForward, Feather, FerrisWheel, FileImage, FileText, Film, Fingerprint, Fish, Flame, FlaskConical, Flower, Flower2, Focus, Footprints, Frame, Frown, Gamepad2, Gauge, Gem, Ghost, GitBranch, Glasses, Globe, Globe2, Grid2x2, Grid3x3, Grip, Hammer, Hand, Headphones, Heart, HeartHandshake, Hexagon, History, Hourglass, House, Image, Images, Infinity, Joystick, Lamp, Landmark, Laugh, Layers, LayoutGrid, Leaf, Lightbulb, Link, Maximize, Maximize2, Megaphone, MessageCircle, Mic, MicVocal, Microscope, Monitor, Moon, Mountain, MountainSnow, MousePointerClick, MoveDiagonal, MoveDiagonal2, MoveHorizontal, Music, Newspaper, Orbit, Package, PackageOpen, PackagePlus, Paintbrush, Palette, Palmtree, PanelTop, PartyPopper, Pause, PawPrint, PenLine, PenTool, Pencil, PencilRuler, PersonStanding, Pizza, Plane, Pointer, Presentation, Rabbit, Radar, Rainbow, Redo2, RefreshCw, Refrigerator, Repeat, Repeat2, Rocket, Rotate3d, RotateCcw, RotateCw, Rows2, Sailboat, Scaling, ScanEye, ScanFace, ScanLine, Scissors, Search, Send, Shapes, Shell, Shield, ShieldCheck, Shirt, Shuffle, Signpost, Skull, SlidersHorizontal, Smartphone, Smile, SmilePlus, Snail, Snowflake, Sparkle, Sparkles, Spline, SprayCan, Sprout, Square, SquareDashed, Star, Sticker, StickyNote, Store, Sun, SunDim, Sunrise, Sunset, Swords, Thermometer, ThumbsUp, Ticket, Timer, Tornado, TrainFront, TrendingUp, Trophy, Truck, Tv, Type, Undo2, Unplug, User, UserRoundCog, UserX, Users, Utensils, UtensilsCrossed, Video, Volleyball, Wand, Wand2, Waves, Waypoints, Wind, Wine, Worm, Zap, ZoomIn, ZoomOut, type LucideIcon } from "lucide-react";+import { Activity, Angry, Aperture, AppWindow, ArrowDown, ArrowDownToDot, ArrowDownToLine, ArrowLeft, ArrowLeftRight, ArrowLeftToLine, ArrowRight, ArrowRightLeft, ArrowRightToLine, ArrowUp, ArrowUpFromLine, ArrowUpRight, ArrowUpWideNarrow, AtSign, Atom, AudioLines, AudioWaveform, Axis3d, BadgeDollarSign, Banana, Banknote, Bath, Bike, Binary, Biohazard, Bird, Blocks, Bomb, BookOpen, Bot, Box, Boxes, BriefcaseBusiness, Brush, Bug, Building, Building2, Cake, Camera, Candy, Car, CarFront, Castle, ChevronDown, ChevronUp, ChevronsDown, ChevronsLeft, ChevronsRight, ChevronsUp, Circle, CircleDashed, CircleDot, Citrus, Clapperboard, Clock, Cloud, CloudFog, CloudLightning, CloudRain, Cloudy, Coffee, Cog, Columns3, Combine, Contrast, Copy, Cpu, Crosshair, Crown, CupSoda, Diamond, Disc, Disc3, Dog, Drama, Droplet, Droplets, Dumbbell, Ear, Earth, Eraser, Expand, Eye, EyeOff, FastForward, Feather, FerrisWheel, FileImage, FileText, Film, Fingerprint, Fish, Flame, FlaskConical, Flower, Flower2, Focus, Footprints, Frame, Frown, GalleryHorizontal, Gamepad2, Gauge, Gem, Ghost, GitBranch, Glasses, Globe, Globe2, Grid2x2, Grid3x3, Grip, Hammer, Hand, Headphones, Heart, HeartHandshake, Hexagon, History, Hourglass, House, Image, ImageIcon, Images, Infinity, Joystick, Lamp, Landmark, Languages, Laugh, Layers, LayoutGrid, Leaf, Lightbulb, Link, Maximize, Maximize2, Megaphone, MessageCircle, MessageSquareText, Mic, Mic2, MicVocal, Microscope, Monitor, MonitorPlay, Moon, Mountain, MountainSnow, MousePointerClick, MoveDiagonal, MoveDiagonal2, MoveHorizontal, Music, Newspaper, Orbit, Package, PackageOpen, PackagePlus, Paintbrush, Palette, Palmtree, PanelTop, PartyPopper, Pause, PawPrint, PenLine, PenTool, Pencil, PencilRuler, PersonStanding, Pizza, Plane, Pointer, Presentation, Rabbit, Radar, Rainbow, Redo2, RefreshCw, Refrigerator, Repeat, Repeat2, Rocket, Rotate3d, RotateCcw, RotateCw, Rows2, Sailboat, Scaling, ScanEye, ScanFace, ScanLine, Scissors, Search, Send, Shapes, Shell, Shield, ShieldCheck, Shirt, Shuffle, Signpost, Skull, SlidersHorizontal, Smartphone, Smile, SmilePlus, Snail, Snowflake, Sparkle, Sparkles, Spline, SprayCan, Sprout, Square, SquareDashed, Star, Sticker, StickyNote, Store, Sun, SunDim, Sunrise, Sunset, Swords, Table, Thermometer, ThumbsUp, Ticket, Timer, Tornado, TrainFront, TrendingUp, Trophy, Truck, Tv, Type, Undo2, Unplug, User, UserRound, UserRoundCog, UserX, Users, Utensils, UtensilsCrossed, Video, Volleyball, Wand, Wand2, Waves, Waypoints, Wind, Wine, Worm, Zap, ZoomIn, ZoomOut, type LucideIcon } from "lucide-react";-export const PRESET_ICONS: Record<string, LucideIcon> = { Activity, Angry, Aperture, AppWindow, ArrowDown, ArrowDownToDot, ArrowDownToLine, ArrowLeft, ArrowLeftRight, ArrowLeftToLine, ArrowRight, ArrowRightLeft, ArrowRightToLine, ArrowUp, ArrowUpFromLine, ArrowUpRight, ArrowUpWideNarrow, Atom, AudioLines, Axis3d, BadgeDollarSign, Banana, Banknote, Bath, Bike, Binary, Biohazard, Bird, Blocks, Bomb, BookOpen, Bot, Box, Boxes, BriefcaseBusiness, Brush, Bug, Building, Building2, Cake, Camera, Candy, Car, CarFront, Castle, ChevronDown, ChevronUp, ChevronsDown, ChevronsLeft, ChevronsRight, ChevronsUp, Circle, CircleDashed, CircleDot, Citrus, Clapperboard, Clock, Cloud, CloudFog, CloudLightning, CloudRain, Cloudy, Coffee, Cog, Columns3, Contrast, Copy, Cpu, Crosshair, Crown, CupSoda, Diamond, Disc, Disc3, Dog, Drama, Droplet, Droplets, Dumbbell, Ear, Earth, Eraser, Expand, Eye, EyeOff, FastForward, Feather, FerrisWheel, FileImage, FileText, Film, Fingerprint, Fish, Flame, FlaskConical, Flower, Flower2, Focus, Footprints, Frame, Frown, Gamepad2, Gauge, Gem, Ghost, GitBranch, Glasses, Globe, Globe2, Grid2x2, Grid3x3, Grip, Hammer, Hand, Headphones, Heart, HeartHandshake, Hexagon, History, Hourglass, House, Image, Images, Infinity, Joystick, Lamp, Landmark, Laugh, Layers, LayoutGrid, Leaf, Lightbulb, Link, Maximize, Maximize2, Megaphone, MessageCircle, Mic, MicVocal, Microscope, Monitor, Moon, Mountain, MountainSnow, MousePointerClick, MoveDiagonal, MoveDiagonal2, MoveHorizontal, Music, Newspaper, Orbit, Package, PackageOpen, PackagePlus, Paintbrush, Palette, Palmtree, PanelTop, PartyPopper, Pause, PawPrint, PenLine, PenTool, Pencil, PencilRuler, PersonStanding, Pizza, Plane, Pointer, Presentation, Rabbit, Radar, Rainbow, Redo2, RefreshCw, Refrigerator, Repeat, Repeat2, Rocket, Rotate3d, RotateCcw, RotateCw, Rows2, Sailboat, Scaling, ScanEye, ScanFace, ScanLine, Scissors, Search, Send, Shapes, Shell, Shield, ShieldCheck, Shirt, Shuffle, Signpost, Skull, SlidersHorizontal, Smartphone, Smile, SmilePlus, Snail, Snowflake, Sparkle, Sparkles, Spline, SprayCan, Sprout, Square, SquareDashed, Star, Sticker, StickyNote, Store, Sun, SunDim, Sunrise, Sunset, Swords, Thermometer, ThumbsUp, Ticket, Timer, Tornado, TrainFront, TrendingUp, Trophy, Truck, Tv, Type, Undo2, Unplug, User, UserRoundCog, UserX, Users, Utensils, UtensilsCrossed, Video, Volleyball, Wand, Wand2, Waves, Waypoints, Wind, Wine, Worm, Zap, ZoomIn, ZoomOut };+export const PRESET_ICONS: Record<string, LucideIcon> = { Activity, Angry, Aperture, AppWindow, ArrowDown, ArrowDownToDot, ArrowDownToLine, ArrowLeft, ArrowLeftRight, ArrowLeftToLine, ArrowRight, ArrowRightLeft, ArrowRightToLine, ArrowUp, ArrowUpFromLine, ArrowUpRight, ArrowUpWideNarrow, AtSign, Atom, AudioLines, AudioWaveform, Axis3d, BadgeDollarSign, Banana, Banknote, Bath, Bike, Binary, Biohazard, Bird, Blocks, Bomb, BookOpen, Bot, Box, Boxes, BriefcaseBusiness, Brush, Bug, Building, Building2, Cake, Camera, Candy, Car, CarFront, Castle, ChevronDown, ChevronUp, ChevronsDown, ChevronsLeft, ChevronsRight, ChevronsUp, Circle, CircleDashed, CircleDot, Citrus, Clapperboard, Clock, Cloud, CloudFog, CloudLightning, CloudRain, Cloudy, Coffee, Cog, Columns3, Combine, Contrast, Copy, Cpu, Crosshair, Crown, CupSoda, Diamond, Disc, Disc3, Dog, Drama, Droplet, Droplets, Dumbbell, Ear, Earth, Eraser, Expand, Eye, EyeOff, FastForward, Feather, FerrisWheel, FileImage, FileText, Film, Fingerprint, Fish, Flame, FlaskConical, Flower, Flower2, Focus, Footprints, Frame, Frown, GalleryHorizontal, Gamepad2, Gauge, Gem, Ghost, GitBranch, Glasses, Globe, Globe2, Grid2x2, Grid3x3, Grip, Hammer, Hand, Headphones, Heart, HeartHandshake, Hexagon, History, Hourglass, House, Image, ImageIcon, Images, Infinity, Joystick, Lamp, Landmark, Languages, Laugh, Layers, LayoutGrid, Leaf, Lightbulb, Link, Maximize, Maximize2, Megaphone, MessageCircle, MessageSquareText, Mic, Mic2, MicVocal, Microscope, Monitor, MonitorPlay, Moon, Mountain, MountainSnow, MousePointerClick, MoveDiagonal, MoveDiagonal2, MoveHorizontal, Music, Newspaper, Orbit, Package, PackageOpen, PackagePlus, Paintbrush, Palette, Palmtree, PanelTop, PartyPopper, Pause, PawPrint, PenLine, PenTool, Pencil, PencilRuler, PersonStanding, Pizza, Plane, Pointer, Presentation, Rabbit, Radar, Rainbow, Redo2, RefreshCw, Refrigerator, Repeat, Repeat2, Rocket, Rotate3d, RotateCcw, RotateCw, Rows2, Sailboat, Scaling, ScanEye, ScanFace, ScanLine, Scissors, Search, Send, Shapes, Shell, Shield, ShieldCheck, Shirt, Shuffle, Signpost, Skull, SlidersHorizontal, Smartphone, Smile, SmilePlus, Snail, Snowflake, Sparkle, Sparkles, Spline, SprayCan, Sprout, Square, SquareDashed, Star, Sticker, StickyNote, Store, Sun, SunDim, Sunrise, Sunset, Swords, Table, Thermometer, ThumbsUp, Ticket, Timer, Tornado, TrainFront, TrendingUp, Trophy, Truck, Tv, Type, Undo2, Unplug, User, UserRound, UserRoundCog, UserX, Users, Utensils, UtensilsCrossed, Video, Volleyball, Wand, Wand2, Waves, Waypoints, Wind, Wine, Worm, Zap, ZoomIn, ZoomOut };diff --git a/src/lib/catalog/canvas.ts b/src/lib/catalog/canvas.tsindex b1951863..a5b64170 100644--- a/src/lib/catalog/canvas.ts+++ b/src/lib/catalog/canvas.ts@@ -1719,6 +1719,8 @@ export interface CanvasTemplate {/** lucide icon name. */icon: string;hue: number;+ /** The picker's section ("Effects 2.0 chains"); none: the workflows. */+ group?: string;build: (engine: Engine) => CanvasGraph;}@@ -1956,6 +1958,76 @@ export const CANVAS_TEMPLATES: CanvasTemplate[] = [},];+// ---------------------------------------------------------------------------+// Effects 2.0 chains (build plan O13): Higgsfield's "Prompt based" effect chains as Fuobe templates. A photo goes+// through an image edit that sets the scene, then Fuobe DoP animates it with the effect's words (research+// higgsfield-originals-5.md §3.8: an image edit, then image to video). Both steps are open weights on both engines:+// Qwen-Image-Edit 2511 (on your GPU, or hosted on fal) and Fuobe DoP (Wan 2.2 14B on your GPU, or hosted on fal).+// The edit prompts are Fuobe's own words; the motion is the effect's own prompt from the effects catalog.++export const EFFECT_CHAIN_GROUP = "Effects 2.0 chains";++/** Image edit, then image to video: the models per engine (Fuobe DoP is an Original, run on the template's engine). */+export const EFFECT_CHAIN_MODELS = { edit: { cloud: "qwen-image-edit-2511-cloud", open: "oss-qwen-edit" }, video: "fuobe-dop" } as const;++/** The researched Effects 2.0 chains with a scene to set first: the effect (its name in the effects catalog) and the edit. */+export const EFFECT_CHAINS: { effect: string; edit: string; icon: string; hue: number }[] = [+ { effect: "Agamemnon", icon: "Swords", hue: 35, edit: "Dress the person as an ancient Greek warrior king in polished bronze armour and a red cape, a sword in hand, a vast army on a dusty battlefield behind them at golden hour. Keep their face and pose." },+ { effect: "Fallen Angel", icon: "Feather", hue: 270, edit: "Give the person large dark ragged wings and put them on a storm-lit rooftop at night, black feathers drifting in the air. Keep their face, clothes and pose." },+ { effect: "Pearl Earring", icon: "Gem", hue: 220, edit: "Repaint the picture as a Dutch Golden Age oil portrait: a blue and gold head wrap, a pearl earring, a dark background and soft window light. Keep the person's face." },+ { effect: "Monet Muse", icon: "Palette", hue: 150, edit: "Repaint the scene as an impressionist oil painting of a garden pond with water lilies, soft dabs of light and colour. Keep the person and their pose." },+ { effect: "Fairytale Castle", icon: "Castle", hue: 300, edit: "Put a magical fairytale castle on a hill far behind the person under a twilight sky with the first fireworks. Keep the person exactly as they are." },+ { effect: "Blue Depth", icon: "Waves", hue: 210, edit: "Place the person underwater in deep blue ocean light, rays shimmering down from the surface, hair and clothes floating. Keep their face." },+ { effect: "Superstar", icon: "Star", hue: 50, edit: "Put the person on a glittering concert stage under bright spotlights, a cheering crowd in silhouette and confetti in the air. Keep their face and outfit." },+ { effect: "Street Colossus", icon: "Building2", hue: 15, edit: "Make the person a giant standing in the middle of a city street, as tall as the buildings, with tiny cars and people around their feet. Keep their face and clothes." },+ { effect: "Dolphin Ride", icon: "Fish", hue: 190, edit: "Put the person on the back of a dolphin leaping over sparkling ocean waves in bright sunshine. Keep their face." },+ { effect: "Skatedog", icon: "Dog", hue: 95, edit: "Add a happy dog riding a skateboard next to the person on a sunny street. Keep the person exactly as they are." },+];++const slugOf = (s: string) => s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");++/** An effect's own motion words (its catalog prompt without the user's part). */+export function effectWords(name: string): string | undefined {+ return getPreset(`effect-${slugOf(name)}`)?.promptTemplate?.replace(/^\{prompt\}\.\s*/, "").trim() || undefined;+}++function effectChainTemplate(c: (typeof EFFECT_CHAINS)[number]): CanvasTemplate {+ const words = effectWords(c.effect);+ if (!words) throw new Error(`Effects 2.0 chain ${c.effect}: no such effect in the catalog`);+ return {+ id: `effect-chain-${slugOf(c.effect)}`,+ name: c.effect,+ description: "A photo, its scene set by an image edit, then animated with the effect",+ icon: c.icon,+ hue: c.hue,+ group: EFFECT_CHAIN_GROUP,+ build: (engine) => {+ const graph = tpl(+ [+ { id: "photo", type: "image-input", x: 0, y: 60, data: { label: "Your photo" } },+ { id: "scene", type: "model", x: COL, y: 0, data: { mediaKind: "image", label: "Set the scene", op: "edit", prompt: c.edit, params: { aspectRatio: "auto" } }, models: EFFECT_CHAIN_MODELS.edit },+ {+ id: "effect",+ type: "model",+ x: COL * 2,+ y: 0,+ data: { mediaKind: "video", label: c.effect, op: "i2v", modelId: EFFECT_CHAIN_MODELS.video, engine, prompt: words, params: { aspectRatio: "auto", duration: 5 } },+ },+ { id: "out", type: "output", x: COL * 3, y: 40, data: { label: c.effect } },+ ],+ [+ ["photo", "scene", "images"],+ ["scene", "effect", "images"],+ ["effect", "out"],+ ],+ )(engine);+ return graph;+ },+ };+}++CANVAS_TEMPLATES.push(...EFFECT_CHAINS.map(effectChainTemplate));+export function getTemplate(id: string): CanvasTemplate | undefined {return CANVAS_TEMPLATES.find((t) => t.id === id);}diff --git a/tests/canvas.test.ts b/tests/canvas.test.tsindex 913d00e3..28674798 100644--- a/tests/canvas.test.ts+++ b/tests/canvas.test.ts@@ -13,6 +13,7 @@ import {inputPorts,isGenerator,modelChoices,+ nodeEngine,nodeSignature,outputType,paletteItems,@@ -347,7 +348,8 @@ describe("canvas templates", () => {for (const n of g.nodes.filter(isGenerator)) {const m = getModel(n.data.modelId!);expect(m, `${id}/${n.id}: ${n.data.modelId}`).toBeDefined();- expect(m!.engine).toBe(engine);+ // A Fuobe Original (both engines) runs on the engine its node names.+ expect(nodeEngine(n, m!)).toBe(engine);}expect(graphEngine(g)).toBe(engine);const plan = planCanvas(g, { engineMode: engine });diff --git a/tests/effect-chains.test.ts b/tests/effect-chains.test.tsnew file mode 100644index 00000000..298b191c--- /dev/null+++ b/tests/effect-chains.test.ts@@ -0,0 +1,34 @@+import { describe, expect, it } from "vitest";+import { getModel } from "@/lib/catalog";+import { CANVAS_TEMPLATES, EFFECT_CHAIN_GROUP, EFFECT_CHAIN_MODELS, EFFECT_CHAINS, effectWords, getTemplate, planCanvas } from "@/lib/catalog/canvas";++// Effects 2.0 chains as Canvas templates (build plan O13): a photo, an image edit that sets the scene, Fuobe DoP with+// the effect's own words, on either engine.+const chains = CANVAS_TEMPLATES.filter((t) => t.group === EFFECT_CHAIN_GROUP);++describe("Effects 2.0 chains", () => {+ it("one template per researched chain, each an effect of the catalog, after the workflows", () => {+ expect(chains.map((t) => t.name)).toEqual(EFFECT_CHAINS.map((c) => c.effect));+ expect(chains.length).toBeGreaterThanOrEqual(10);+ expect(CANVAS_TEMPLATES.findIndex((t) => t.group === EFFECT_CHAIN_GROUP)).toBeGreaterThan(CANVAS_TEMPLATES.findIndex((t) => !t.group));+ for (const c of EFFECT_CHAINS) expect(effectWords(c.effect), c.effect).toBeTruthy();+ expect(getTemplate("effect-chain-agamemnon")?.name).toBe("Agamemnon");+ });++ it.each(["cloud", "open"] as const)("with a photo, plans the edit then the effect on Fuobe DoP (%s)", (engine) => {+ const t = getTemplate("effect-chain-fallen-angel")!;+ const g = t.build(engine);+ g.nodes.find((n) => n.id === "photo")!.data.url = "/api/files/u/me.png";+ const plan = planCanvas(g, { engineMode: engine });+ expect(plan.errors).toEqual([]);+ const [edit, effect] = plan.steps;+ expect(edit).toMatchObject({ nodeId: "scene", deps: [], request: { modelId: EFFECT_CHAIN_MODELS.edit[engine], op: "edit", inputs: { images: ["/api/files/u/me.png"] } } });+ expect(edit.request.prompt).toMatch(/^Give the person large dark ragged wings/);+ expect(effect).toMatchObject({ nodeId: "effect", deps: ["scene"], request: { modelId: "fuobe-dop", engine, op: "i2v", chain: [{ slot: "images", position: "first" }] } });+ expect(effect.request.prompt).toBe(effectWords("Fallen Angel"));+ if (engine === "open") expect(plan.costUsd).toBe(0);+ else expect(plan.costUsd).toBeGreaterThan(0);+ // Both steps are open weights: Qwen-Image-Edit 2511 and Wan 2.2 (Fuobe DoP), hosted on fal in the cloud.+ expect(getModel(EFFECT_CHAIN_MODELS.edit[engine])?.name).toMatch(/Qwen/);+ });+});