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
Image: Film look for MOSS-Image, with 30 looks and their thumbnails
Adarsh276614166d74
diff --git a/docs/FEATURES.md b/docs/FEATURES.mdindex b8f0a6fc..967b2959 100644--- a/docs/FEATURES.md+++ b/docs/FEATURES.md@@ -59,6 +59,7 @@ Fuobe is a complete creative studio you can run yourself: 108 camera motions, 25- **Create:** Image · Video (text, image, start/end frame, **Frames**: up to 10 stills on a timeline, reference images and clips, multi-shot, draft mode) · Edit · **Layers** (split a flat image into editable layers, edit text with the lines found for you on either engine, Inpaint a painted area, an Enhancer (skin, soft glow, sharpen, detail), regional edits, save a layer as an element, cropped or positioned zips) · Inpaint & Draw to Edit · Color grading · Camera motions and Effects (on Fuobe DoP) · Storyboard (Popcorn: a board in one of Fuobe Soul's looks if you like, priced next to Generate, and turned into a film; cloud boards start on hosted open models, Z-Image Turbo or Qwen-Image-Edit, then Qwen-Image-Edit 2509 with a next-scene LoRA, and "Frames made on" switches them to Nano Banana Pro) · **Canvas** (wire prompts, files and models into node workflows; every template in a cloud and an open-source version, 10 Effects 2.0 chains among them (your photo, a "Set the scene" edit, then a 5 s Fuobe DoP clip); up to 20 pages per board, groups you can run as one, comment pins with replies, and drawing, shapes and text from a toolbar with keys; a Table node runs the node it feeds once per row; Change voice, Clone voice, Translate (text, or a dub of a video) and Video concatenator (cut, mute and join up to 50 clips) nodes) · Apps- **Live edit** (Create → Live edit, the Edit studio's Live switch, a Library picture's "Change it as you type") — the picture changes as you type, on your own GPU: Qwen-Image 2.1 with linoyts' 2-step DMD2 LoRA on Fuobe's live nodes (fuobe_live.py, which the Windows start file and the setup card add to ComfyUI). Live frames come at 384 to 768 px (Auto steps down on a slower GPU); a pause renders the text on screen at full quality. One prompt keeps growing: Enter ends a change and starts the next, and every frame renders all the words on the original with one seed for the session, so the picture stays steady while you type and nothing wears down, however many changes you make. Undo drops the newest change; Start fresh makes the picture on screen the new original (a lossless full-size master) and clears the words. Hold C to compare (Shift+C with the original), paint a region to change only that. On "Use the ComfyUI on this computer" the tab talks to its ComfyUI directly. Guests see a recorded session. Non-commercial weights; none of it has rendered on a real GPU yet- **MOSS-Image** (Image studio → model menu → MOSS-Image) — OpenMOSS's picture model, made for Chinese and English text in pictures. In the cloud it runs on fal at $0.05 per megapixel, up to 4 images (fal's safety checker returns a black image when it flags an output). On your GPU it is free, on ComfyUI's built-in nodes, with about 15 GB of files and 16 GB of VRAM (a guess); **Options → Quality** picks Standard (25 steps), Best (50), Fast (8 steps, an extra 5.4 GB file) or Base model (MOSS-Image Base, 50 steps, an extra 5.4 GB file). Its text encoder is the int8 Qwen3.5-9B: the w4a8 build in ComfyUI's template crashed the graphics driver on a test PC. The Image studio's controls chip now reads **Options** (it read "Director"). Text placed in boxes: the Image studio's Layout mode draws the boxes on the picture, and `src/lib/layout-prompt.ts` turns them into MOSS's prompt+- **Film look** (Image studio and Canvas, MOSS-Image → Film look) — film and camera looks for MOSS-Image on both engines, in eight groups (colour film, slide, black and white, instant, motion picture, toy and odd cameras, grades, broken film), each with a thumbnail from its own test render. The server adds the picked look when the picture is made: the look's words before and after the prompt, and the look's opposite in the negative prompt beside MOSS-Image's own. A black-and-white look first takes the colour words out of the prompt (an LLM rewrite, then a word list; the word list alone when no LLM answers). The prompt box keeps the person's words, and Reuse applies the look again. Enhance, Assist (`film_look`) and the `moss-film-looks` skill write MOSS prompts by the same rules. Looks live in `src/lib/film-looks.ts`; a layout runs without a look- **The newest open image models, first on your GPU** — Ideogram 4, Qwen-Image 2.1 and its Turbo, Krea 2 (Realism, Turbo, Edit, Identity Edit, Image to image, Inpaint) and FIBO 2 (Dev, Edit Turbo), from the owner's ComfyUI workflows. On the open engine the Image studio opens on Auto (next item) and Edit and Inpaint on Qwen-Image 2.1; every model menu's "Best" list puts the new models first (text to image: Ideogram 4, Qwen-Image 2.1, Krea 2 Realism, MOSS-Image, then FIBO 2 Dev; edits: Qwen-Image 2.1, its Turbo, FIBO 2 Dev and Edit Turbo, then Krea 2 Edit), and so do apps, Layers, Canvas, Cinema stills, Photodump, Fashion Factory and Character swap's anchor. Apps and tools that run a LoRA trained on an older model keep it (Angles, Relight, Product shot, Try-On, Cinema's recompose). Ideogram 4 reads a JSON caption, which Fuobe writes from your words (with your local LLM, never a paid API; a plain caption without one) and keeps as the run's prompt. When Ideogram's safety filter sends its grey card for every picture of a run, the run is made once more with a new seed, then with Qwen-Image 2.1, before it fails and says what to try; the card is kept for the owner to look at. Soul Location doesn't offer Ideogram 4 (pictures of empty places hit that filter most), and a new Layers layer starts on Qwen-Image 2.1. Qwen-Image 2.1, FIBO 2 and Krea 2 Edit take up to 4 references (Krea 2 Edit 2) and leave out the ones you don't give; an edit keeps image 1's shape and size, so Edit and Inpaint show no aspect or size choice for them, and Qwen-Image 2.1's inpaint and expand take the picture alone. An app run made before an app moved to Qwen-Image 2.1 (a retry, Run again, Reuse) runs on Qwen-Image 2.1 and says so. About 92 GB of new files, 20–24 GB of VRAM (estimates), ComfyUI 0.42.0; Krea 2 runs Comfy-Org's fp8 Krea 2 Turbo, the file the owner's edit workflow loads. Krea 2 Inpaint also needs the ComfyUI-Krea2-Ostris-Edit node pack, so it isn't in Inpaint's "Best" list. Qwen-Image 2.1, Ideogram 4 and FIBO 2 weights are non-commercial. None of the 16 graphs has rendered through Fuobe yet- **Auto, the Image studio's first pick on your GPU** — Auto picks the open model for each run, for everyone (the owner, accounts, and a guest's draft): a run with a picture to work from goes to the edit model for its operation (Qwen-Image 2.1), lettering, posters, logos and signs to Ideogram 4, prompts that Ideogram 4's safety filter often declines to Krea 2 Realism, and everything else to Ideogram 4. Those prompts are a list the owner edits in Settings → Auto image model (one word, phrase or pattern per line; a built-in list to start with). When Ideogram 4 declines a run of Auto, Krea 2 Realism, then FIBO 2 Dev, then MOSS-Image make the same run, each only if the one before fails; it is still one run for limits and billing. The tile, the run details and the Library say what made it ("Auto · made with Krea 2 Realism · Ideogram 4 declined this one"), and the price before Run is the picked model's. Picking a model by name always runs that model. On a declined run the owner also sees the words it declined and "Add a pattern", which puts a line on that list- **Kandinsky 6.0** (Video studio → model menu, both engines) — Kandinsky Lab's model makes 5 s clips at 480p with sound and lip-synced dialogue, from words or a first frame. Words in quotes are what someone says, and a closing `Sound:` line sets the sound. On your GPU it is free, on Kandinsky Lab's own node packs: **Options → Quality** picks Lite (10 steps, the default; about 24 GB of VRAM, an estimate) or Pro (about 80 GB, with an extra 60 GB file), and the Prompt helper (an extra 19 GB file) writes a fuller caption first. In the cloud it runs on fal: Pro or Lite at Fast, Standard or Best steps (Pro · Standard, the default, $0.56 a clip; Lite from $0.08; Pro · Best $1.35). Lipsync & avatars links a talking character from words to the Video studio on Kandinsky. **Kandinsky VSR** (Upscale → Video, both engines) upscales clips up to 5 s by 2x, 2.25x (the default, 480p to 1080p) or 4x, about $0.09 for 5 s of 480p to 1080p on faldiff --git a/public/previews/film-looks/bw-fine.320.avif b/public/previews/film-looks/bw-fine.320.avifnew file mode 100644index 00000000..eae35ca2Binary files /dev/null and b/public/previews/film-looks/bw-fine.320.avif differdiff --git a/public/previews/film-looks/bw-fine.320.webp b/public/previews/film-looks/bw-fine.320.webpnew file mode 100644index 00000000..1b277251Binary files /dev/null and b/public/previews/film-looks/bw-fine.320.webp differdiff --git a/public/previews/film-looks/bw-fine.640.avif b/public/previews/film-looks/bw-fine.640.avifnew file mode 100644index 00000000..6cd0cbcaBinary files /dev/null and b/public/previews/film-looks/bw-fine.640.avif differdiff --git a/public/previews/film-looks/bw-fine.640.webp b/public/previews/film-looks/bw-fine.640.webpnew file mode 100644index 00000000..87e2c44cBinary files /dev/null and b/public/previews/film-looks/bw-fine.640.webp differdiff --git a/public/previews/film-looks/bw-grain.320.avif b/public/previews/film-looks/bw-grain.320.avifnew file mode 100644index 00000000..59a9d77eBinary files /dev/null and b/public/previews/film-looks/bw-grain.320.avif differdiff --git a/public/previews/film-looks/bw-grain.320.webp b/public/previews/film-looks/bw-grain.320.webpnew file mode 100644index 00000000..d0d70407Binary files /dev/null and b/public/previews/film-looks/bw-grain.320.webp differdiff --git a/public/previews/film-looks/bw-grain.640.avif b/public/previews/film-looks/bw-grain.640.avifnew file mode 100644index 00000000..d53fd8bdBinary files /dev/null and b/public/previews/film-looks/bw-grain.640.avif differdiff --git a/public/previews/film-looks/bw-grain.640.webp b/public/previews/film-looks/bw-grain.640.webpnew file mode 100644index 00000000..2e027b28Binary files /dev/null and b/public/previews/film-looks/bw-grain.640.webp differdiff --git a/public/previews/film-looks/bw-pushed.320.avif b/public/previews/film-looks/bw-pushed.320.avifnew file mode 100644index 00000000..828ad9e1Binary files /dev/null and b/public/previews/film-looks/bw-pushed.320.avif differdiff --git a/public/previews/film-looks/bw-pushed.320.webp b/public/previews/film-looks/bw-pushed.320.webpnew file mode 100644index 00000000..83aa52d7Binary files /dev/null and b/public/previews/film-looks/bw-pushed.320.webp differdiff --git a/public/previews/film-looks/bw-pushed.640.avif b/public/previews/film-looks/bw-pushed.640.avifnew file mode 100644index 00000000..a76250a0Binary files /dev/null and b/public/previews/film-looks/bw-pushed.640.avif differdiff --git a/public/previews/film-looks/bw-pushed.640.webp b/public/previews/film-looks/bw-pushed.640.webpnew file mode 100644index 00000000..09fcffccBinary files /dev/null and b/public/previews/film-looks/bw-pushed.640.webp differdiff --git a/public/previews/film-looks/cinema-500.320.avif b/public/previews/film-looks/cinema-500.320.avifnew file mode 100644index 00000000..fcbfb6a3Binary files /dev/null and b/public/previews/film-looks/cinema-500.320.avif differdiff --git a/public/previews/film-looks/cinema-500.320.webp b/public/previews/film-looks/cinema-500.320.webpnew file mode 100644index 00000000..0c9fa520Binary files /dev/null and b/public/previews/film-looks/cinema-500.320.webp differdiff --git a/public/previews/film-looks/cinema-500.640.avif b/public/previews/film-looks/cinema-500.640.avifnew file mode 100644index 00000000..6837be4eBinary files /dev/null and b/public/previews/film-looks/cinema-500.640.avif differdiff --git a/public/previews/film-looks/cinema-500.640.webp b/public/previews/film-looks/cinema-500.640.webpnew file mode 100644index 00000000..f2a37016Binary files /dev/null and b/public/previews/film-looks/cinema-500.640.webp differdiff --git a/public/previews/film-looks/cross-processed.320.avif b/public/previews/film-looks/cross-processed.320.avifnew file mode 100644index 00000000..3ec93f44Binary files /dev/null and b/public/previews/film-looks/cross-processed.320.avif differdiff --git a/public/previews/film-looks/cross-processed.320.webp b/public/previews/film-looks/cross-processed.320.webpnew file mode 100644index 00000000..d6d2329aBinary files /dev/null and b/public/previews/film-looks/cross-processed.320.webp differdiff --git a/public/previews/film-looks/cross-processed.640.avif b/public/previews/film-looks/cross-processed.640.avifnew file mode 100644index 00000000..28131cf9Binary files /dev/null and b/public/previews/film-looks/cross-processed.640.avif differdiff --git a/public/previews/film-looks/cross-processed.640.webp b/public/previews/film-looks/cross-processed.640.webpnew file mode 100644index 00000000..8743709aBinary files /dev/null and b/public/previews/film-looks/cross-processed.640.webp differdiff --git a/public/previews/film-looks/daguerreotype.320.avif b/public/previews/film-looks/daguerreotype.320.avifnew file mode 100644index 00000000..376d877dBinary files /dev/null and b/public/previews/film-looks/daguerreotype.320.avif differdiff --git a/public/previews/film-looks/daguerreotype.320.webp b/public/previews/film-looks/daguerreotype.320.webpnew file mode 100644index 00000000..fb0eb19dBinary files /dev/null and b/public/previews/film-looks/daguerreotype.320.webp differdiff --git a/public/previews/film-looks/daguerreotype.640.avif b/public/previews/film-looks/daguerreotype.640.avifnew file mode 100644index 00000000..66a2efbdBinary files /dev/null and b/public/previews/film-looks/daguerreotype.640.avif differdiff --git a/public/previews/film-looks/daguerreotype.640.webp b/public/previews/film-looks/daguerreotype.640.webpnew file mode 100644index 00000000..d543ff72Binary files /dev/null and b/public/previews/film-looks/daguerreotype.640.webp differdiff --git a/public/previews/film-looks/digicam-2000s.320.avif b/public/previews/film-looks/digicam-2000s.320.avifnew file mode 100644index 00000000..19e6c668Binary files /dev/null and b/public/previews/film-looks/digicam-2000s.320.avif differdiff --git a/public/previews/film-looks/digicam-2000s.320.webp b/public/previews/film-looks/digicam-2000s.320.webpnew file mode 100644index 00000000..c4462bc7Binary files /dev/null and b/public/previews/film-looks/digicam-2000s.320.webp differdiff --git a/public/previews/film-looks/digicam-2000s.640.avif b/public/previews/film-looks/digicam-2000s.640.avifnew file mode 100644index 00000000..2b75632bBinary files /dev/null and b/public/previews/film-looks/digicam-2000s.640.avif differdiff --git a/public/previews/film-looks/digicam-2000s.640.webp b/public/previews/film-looks/digicam-2000s.640.webpnew file mode 100644index 00000000..09de6d1bBinary files /dev/null and b/public/previews/film-looks/digicam-2000s.640.webp differdiff --git a/public/previews/film-looks/disposable.320.avif b/public/previews/film-looks/disposable.320.avifnew file mode 100644index 00000000..7b48bdceBinary files /dev/null and b/public/previews/film-looks/disposable.320.avif differdiff --git a/public/previews/film-looks/disposable.320.webp b/public/previews/film-looks/disposable.320.webpnew file mode 100644index 00000000..f5ee862eBinary files /dev/null and b/public/previews/film-looks/disposable.320.webp differdiff --git a/public/previews/film-looks/disposable.640.avif b/public/previews/film-looks/disposable.640.avifnew file mode 100644index 00000000..22bae792Binary files /dev/null and b/public/previews/film-looks/disposable.640.avif differdiff --git a/public/previews/film-looks/disposable.640.webp b/public/previews/film-looks/disposable.640.webpnew file mode 100644index 00000000..2d1abe92Binary files /dev/null and b/public/previews/film-looks/disposable.640.webp differdiff --git a/public/previews/film-looks/double-exposure.320.avif b/public/previews/film-looks/double-exposure.320.avifnew file mode 100644index 00000000..d3745cc3Binary files /dev/null and b/public/previews/film-looks/double-exposure.320.avif differdiff --git a/public/previews/film-looks/double-exposure.320.webp b/public/previews/film-looks/double-exposure.320.webpnew file mode 100644index 00000000..8257e818Binary files /dev/null and b/public/previews/film-looks/double-exposure.320.webp differdiff --git a/public/previews/film-looks/double-exposure.640.avif b/public/previews/film-looks/double-exposure.640.avifnew file mode 100644index 00000000..5b70532aBinary files /dev/null and b/public/previews/film-looks/double-exposure.640.avif differdiff --git a/public/previews/film-looks/double-exposure.640.webp b/public/previews/film-looks/double-exposure.640.webpnew file mode 100644index 00000000..fa2aa90fBinary files /dev/null and b/public/previews/film-looks/double-exposure.640.webp differdiff --git a/public/previews/film-looks/end-of-roll.320.avif b/public/previews/film-looks/end-of-roll.320.avifnew file mode 100644index 00000000..3841a66dBinary files /dev/null and b/public/previews/film-looks/end-of-roll.320.avif differdiff --git a/public/previews/film-looks/end-of-roll.320.webp b/public/previews/film-looks/end-of-roll.320.webpnew file mode 100644index 00000000..922e17bbBinary files /dev/null and b/public/previews/film-looks/end-of-roll.320.webp differdiff --git a/public/previews/film-looks/end-of-roll.640.avif b/public/previews/film-looks/end-of-roll.640.avifnew file mode 100644index 00000000..74c9d170Binary files /dev/null and b/public/previews/film-looks/end-of-roll.640.avif differdiff --git a/public/previews/film-looks/end-of-roll.640.webp b/public/previews/film-looks/end-of-roll.640.webpnew file mode 100644index 00000000..8554f4afBinary files /dev/null and b/public/previews/film-looks/end-of-roll.640.webp differdiff --git a/public/previews/film-looks/fisheye-toy.320.avif b/public/previews/film-looks/fisheye-toy.320.avifnew file mode 100644index 00000000..0ef092f5Binary files /dev/null and b/public/previews/film-looks/fisheye-toy.320.avif differdiff --git a/public/previews/film-looks/fisheye-toy.320.webp b/public/previews/film-looks/fisheye-toy.320.webpnew file mode 100644index 00000000..3a376031Binary files /dev/null and b/public/previews/film-looks/fisheye-toy.320.webp differdiff --git a/public/previews/film-looks/fisheye-toy.640.avif b/public/previews/film-looks/fisheye-toy.640.avifnew file mode 100644index 00000000..8fbe1feeBinary files /dev/null and b/public/previews/film-looks/fisheye-toy.640.avif differdiff --git a/public/previews/film-looks/fisheye-toy.640.webp b/public/previews/film-looks/fisheye-toy.640.webpnew file mode 100644index 00000000..d619c3c0Binary files /dev/null and b/public/previews/film-looks/fisheye-toy.640.webp differdiff --git a/public/previews/film-looks/fogged.320.avif b/public/previews/film-looks/fogged.320.avifnew file mode 100644index 00000000..9b90e551Binary files /dev/null and b/public/previews/film-looks/fogged.320.avif differdiff --git a/public/previews/film-looks/fogged.320.webp b/public/previews/film-looks/fogged.320.webpnew file mode 100644index 00000000..fad3a9c6Binary files /dev/null and b/public/previews/film-looks/fogged.320.webp differdiff --git a/public/previews/film-looks/fogged.640.avif b/public/previews/film-looks/fogged.640.avifnew file mode 100644index 00000000..553edfd4Binary files /dev/null and b/public/previews/film-looks/fogged.640.avif differdiff --git a/public/previews/film-looks/fogged.640.webp b/public/previews/film-looks/fogged.640.webpnew file mode 100644index 00000000..ab323b36Binary files /dev/null and b/public/previews/film-looks/fogged.640.webp differdiff --git a/public/previews/film-looks/glass-plate.320.avif b/public/previews/film-looks/glass-plate.320.avifnew file mode 100644index 00000000..84bcbf7eBinary files /dev/null and b/public/previews/film-looks/glass-plate.320.avif differdiff --git a/public/previews/film-looks/glass-plate.320.webp b/public/previews/film-looks/glass-plate.320.webpnew file mode 100644index 00000000..f51a7749Binary files /dev/null and b/public/previews/film-looks/glass-plate.320.webp differdiff --git a/public/previews/film-looks/glass-plate.640.avif b/public/previews/film-looks/glass-plate.640.avifnew file mode 100644index 00000000..78fb83cfBinary files /dev/null and b/public/previews/film-looks/glass-plate.640.avif differdiff --git a/public/previews/film-looks/glass-plate.640.webp b/public/previews/film-looks/glass-plate.640.webpnew file mode 100644index 00000000..c440b9b5Binary files /dev/null and b/public/previews/film-looks/glass-plate.640.webp differdiff --git a/public/previews/film-looks/half-frame.320.avif b/public/previews/film-looks/half-frame.320.avifnew file mode 100644index 00000000..83fc5555Binary files /dev/null and b/public/previews/film-looks/half-frame.320.avif differdiff --git a/public/previews/film-looks/half-frame.320.webp b/public/previews/film-looks/half-frame.320.webpnew file mode 100644index 00000000..a9fda39eBinary files /dev/null and b/public/previews/film-looks/half-frame.320.webp differdiff --git a/public/previews/film-looks/half-frame.640.avif b/public/previews/film-looks/half-frame.640.avifnew file mode 100644index 00000000..c2fa7e73Binary files /dev/null and b/public/previews/film-looks/half-frame.640.avif differdiff --git a/public/previews/film-looks/half-frame.640.webp b/public/previews/film-looks/half-frame.640.webpnew file mode 100644index 00000000..970d001eBinary files /dev/null and b/public/previews/film-looks/half-frame.640.webp differdiff --git a/public/previews/film-looks/instant-classic.320.avif b/public/previews/film-looks/instant-classic.320.avifnew file mode 100644index 00000000..f50af300Binary files /dev/null and b/public/previews/film-looks/instant-classic.320.avif differdiff --git a/public/previews/film-looks/instant-classic.320.webp b/public/previews/film-looks/instant-classic.320.webpnew file mode 100644index 00000000..019ea7caBinary files /dev/null and b/public/previews/film-looks/instant-classic.320.webp differdiff --git a/public/previews/film-looks/instant-classic.640.avif b/public/previews/film-looks/instant-classic.640.avifnew file mode 100644index 00000000..f72d8075Binary files /dev/null and b/public/previews/film-looks/instant-classic.640.avif differdiff --git a/public/previews/film-looks/instant-classic.640.webp b/public/previews/film-looks/instant-classic.640.webpnew file mode 100644index 00000000..50a25097Binary files /dev/null and b/public/previews/film-looks/instant-classic.640.webp differdiff --git a/public/previews/film-looks/instant-expired.320.avif b/public/previews/film-looks/instant-expired.320.avifnew file mode 100644index 00000000..4b0443c7Binary files /dev/null and b/public/previews/film-looks/instant-expired.320.avif differdiff --git a/public/previews/film-looks/instant-expired.320.webp b/public/previews/film-looks/instant-expired.320.webpnew file mode 100644index 00000000..15867c76Binary files /dev/null and b/public/previews/film-looks/instant-expired.320.webp differdiff --git a/public/previews/film-looks/instant-expired.640.avif b/public/previews/film-looks/instant-expired.640.avifnew file mode 100644index 00000000..dfe6b129Binary files /dev/null and b/public/previews/film-looks/instant-expired.640.avif differdiff --git a/public/previews/film-looks/instant-expired.640.webp b/public/previews/film-looks/instant-expired.640.webpnew file mode 100644index 00000000..fd376301Binary files /dev/null and b/public/previews/film-looks/instant-expired.640.webp differdiff --git a/public/previews/film-looks/instant-mini.320.avif b/public/previews/film-looks/instant-mini.320.avifnew file mode 100644index 00000000..f0fe631eBinary files /dev/null and b/public/previews/film-looks/instant-mini.320.avif differdiff --git a/public/previews/film-looks/instant-mini.320.webp b/public/previews/film-looks/instant-mini.320.webpnew file mode 100644index 00000000..bf9d0cd5Binary files /dev/null and b/public/previews/film-looks/instant-mini.320.webp differdiff --git a/public/previews/film-looks/instant-mini.640.avif b/public/previews/film-looks/instant-mini.640.avifnew file mode 100644index 00000000..4327e15dBinary files /dev/null and b/public/previews/film-looks/instant-mini.640.avif differdiff --git a/public/previews/film-looks/instant-mini.640.webp b/public/previews/film-looks/instant-mini.640.webpnew file mode 100644index 00000000..9f94f15cBinary files /dev/null and b/public/previews/film-looks/instant-mini.640.webp differdiff --git a/public/previews/film-looks/light-leaks.320.avif b/public/previews/film-looks/light-leaks.320.avifnew file mode 100644index 00000000..54d80385Binary files /dev/null and b/public/previews/film-looks/light-leaks.320.avif differdiff --git a/public/previews/film-looks/light-leaks.320.webp b/public/previews/film-looks/light-leaks.320.webpnew file mode 100644index 00000000..2a1fed01Binary files /dev/null and b/public/previews/film-looks/light-leaks.320.webp differdiff --git a/public/previews/film-looks/light-leaks.640.avif b/public/previews/film-looks/light-leaks.640.avifnew file mode 100644index 00000000..30253e85Binary files /dev/null and b/public/previews/film-looks/light-leaks.640.avif differdiff --git a/public/previews/film-looks/light-leaks.640.webp b/public/previews/film-looks/light-leaks.640.webpnew file mode 100644index 00000000..60ab2256Binary files /dev/null and b/public/previews/film-looks/light-leaks.640.webp differdiff --git a/public/previews/film-looks/lomo.320.avif b/public/previews/film-looks/lomo.320.avifnew file mode 100644index 00000000..f778dd08Binary files /dev/null and b/public/previews/film-looks/lomo.320.avif differdiff --git a/public/previews/film-looks/lomo.320.webp b/public/previews/film-looks/lomo.320.webpnew file mode 100644index 00000000..56de1ad4Binary files /dev/null and b/public/previews/film-looks/lomo.320.webp differdiff --git a/public/previews/film-looks/lomo.640.avif b/public/previews/film-looks/lomo.640.avifnew file mode 100644index 00000000..14f924ebBinary files /dev/null and b/public/previews/film-looks/lomo.640.avif differdiff --git a/public/previews/film-looks/lomo.640.webp b/public/previews/film-looks/lomo.640.webpnew file mode 100644index 00000000..7d3bdc3fBinary files /dev/null and b/public/previews/film-looks/lomo.640.webp differdiff --git a/public/previews/film-looks/muted-chrome.320.avif b/public/previews/film-looks/muted-chrome.320.avifnew file mode 100644index 00000000..874572b8Binary files /dev/null and b/public/previews/film-looks/muted-chrome.320.avif differdiff --git a/public/previews/film-looks/muted-chrome.320.webp b/public/previews/film-looks/muted-chrome.320.webpnew file mode 100644index 00000000..63266ca7Binary files /dev/null and b/public/previews/film-looks/muted-chrome.320.webp differdiff --git a/public/previews/film-looks/muted-chrome.640.avif b/public/previews/film-looks/muted-chrome.640.avifnew file mode 100644index 00000000..3df1f5bbBinary files /dev/null and b/public/previews/film-looks/muted-chrome.640.avif differdiff --git a/public/previews/film-looks/muted-chrome.640.webp b/public/previews/film-looks/muted-chrome.640.webpnew file mode 100644index 00000000..b556c805Binary files /dev/null and b/public/previews/film-looks/muted-chrome.640.webp differdiff --git a/public/previews/film-looks/night-halation.320.avif b/public/previews/film-looks/night-halation.320.avifnew file mode 100644index 00000000..113284aeBinary files /dev/null and b/public/previews/film-looks/night-halation.320.avif differdiff --git a/public/previews/film-looks/night-halation.320.webp b/public/previews/film-looks/night-halation.320.webpnew file mode 100644index 00000000..2811248bBinary files /dev/null and b/public/previews/film-looks/night-halation.320.webp differdiff --git a/public/previews/film-looks/night-halation.640.avif b/public/previews/film-looks/night-halation.640.avifnew file mode 100644index 00000000..768d9a5bBinary files /dev/null and b/public/previews/film-looks/night-halation.640.avif differdiff --git a/public/previews/film-looks/night-halation.640.webp b/public/previews/film-looks/night-halation.640.webpnew file mode 100644index 00000000..ba2eb8c0Binary files /dev/null and b/public/previews/film-looks/night-halation.640.webp differdiff --git a/public/previews/film-looks/pinhole.320.avif b/public/previews/film-looks/pinhole.320.avifnew file mode 100644index 00000000..4b2a6bcbBinary files /dev/null and b/public/previews/film-looks/pinhole.320.avif differdiff --git a/public/previews/film-looks/pinhole.320.webp b/public/previews/film-looks/pinhole.320.webpnew file mode 100644index 00000000..bdfde92aBinary files /dev/null and b/public/previews/film-looks/pinhole.320.webp differdiff --git a/public/previews/film-looks/pinhole.640.avif b/public/previews/film-looks/pinhole.640.avifnew file mode 100644index 00000000..5ecaa4c4Binary files /dev/null and b/public/previews/film-looks/pinhole.640.avif differdiff --git a/public/previews/film-looks/pinhole.640.webp b/public/previews/film-looks/pinhole.640.webpnew file mode 100644index 00000000..6f4cb03fBinary files /dev/null and b/public/previews/film-looks/pinhole.640.webp differdiff --git a/public/previews/film-looks/pocket-110.320.avif b/public/previews/film-looks/pocket-110.320.avifnew file mode 100644index 00000000..90848ec2Binary files /dev/null and b/public/previews/film-looks/pocket-110.320.avif differdiff --git a/public/previews/film-looks/pocket-110.320.webp b/public/previews/film-looks/pocket-110.320.webpnew file mode 100644index 00000000..1cdc06cfBinary files /dev/null and b/public/previews/film-looks/pocket-110.320.webp differdiff --git a/public/previews/film-looks/pocket-110.640.avif b/public/previews/film-looks/pocket-110.640.avifnew file mode 100644index 00000000..dbb6b337Binary files /dev/null and b/public/previews/film-looks/pocket-110.640.avif differdiff --git a/public/previews/film-looks/pocket-110.640.webp b/public/previews/film-looks/pocket-110.640.webpnew file mode 100644index 00000000..6b12f98cBinary files /dev/null and b/public/previews/film-looks/pocket-110.640.webp differdiff --git a/public/previews/film-looks/scratches.320.avif b/public/previews/film-looks/scratches.320.avifnew file mode 100644index 00000000..24c6bf88Binary files /dev/null and b/public/previews/film-looks/scratches.320.avif differdiff --git a/public/previews/film-looks/scratches.320.webp b/public/previews/film-looks/scratches.320.webpnew file mode 100644index 00000000..29792fbcBinary files /dev/null and b/public/previews/film-looks/scratches.320.webp differdiff --git a/public/previews/film-looks/scratches.640.avif b/public/previews/film-looks/scratches.640.avifnew file mode 100644index 00000000..4a476236Binary files /dev/null and b/public/previews/film-looks/scratches.640.avif differdiff --git a/public/previews/film-looks/scratches.640.webp b/public/previews/film-looks/scratches.640.webpnew file mode 100644index 00000000..f1d0e726Binary files /dev/null and b/public/previews/film-looks/scratches.640.webp differdiff --git a/public/previews/film-looks/sepia.320.avif b/public/previews/film-looks/sepia.320.avifnew file mode 100644index 00000000..443858a0Binary files /dev/null and b/public/previews/film-looks/sepia.320.avif differdiff --git a/public/previews/film-looks/sepia.320.webp b/public/previews/film-looks/sepia.320.webpnew file mode 100644index 00000000..79440b79Binary files /dev/null and b/public/previews/film-looks/sepia.320.webp differdiff --git a/public/previews/film-looks/sepia.640.avif b/public/previews/film-looks/sepia.640.avifnew file mode 100644index 00000000..51122af3Binary files /dev/null and b/public/previews/film-looks/sepia.640.avif differdiff --git a/public/previews/film-looks/sepia.640.webp b/public/previews/film-looks/sepia.640.webpnew file mode 100644index 00000000..ea4840dbBinary files /dev/null and b/public/previews/film-looks/sepia.640.webp differdiff --git a/public/previews/film-looks/super-8.320.avif b/public/previews/film-looks/super-8.320.avifnew file mode 100644index 00000000..e4fb7f1fBinary files /dev/null and b/public/previews/film-looks/super-8.320.avif differdiff --git a/public/previews/film-looks/super-8.320.webp b/public/previews/film-looks/super-8.320.webpnew file mode 100644index 00000000..26f211daBinary files /dev/null and b/public/previews/film-looks/super-8.320.webp differdiff --git a/public/previews/film-looks/super-8.640.avif b/public/previews/film-looks/super-8.640.avifnew file mode 100644index 00000000..c7d3a723Binary files /dev/null and b/public/previews/film-looks/super-8.640.avif differdiff --git a/public/previews/film-looks/super-8.640.webp b/public/previews/film-looks/super-8.640.webpnew file mode 100644index 00000000..2f947878Binary files /dev/null and b/public/previews/film-looks/super-8.640.webp differdiff --git a/public/previews/film-looks/teal-orange.320.avif b/public/previews/film-looks/teal-orange.320.avifnew file mode 100644index 00000000..13de0f8eBinary files /dev/null and b/public/previews/film-looks/teal-orange.320.avif differdiff --git a/public/previews/film-looks/teal-orange.320.webp b/public/previews/film-looks/teal-orange.320.webpnew file mode 100644index 00000000..d937ad43Binary files /dev/null and b/public/previews/film-looks/teal-orange.320.webp differdiff --git a/public/previews/film-looks/teal-orange.640.avif b/public/previews/film-looks/teal-orange.640.avifnew file mode 100644index 00000000..be13bf7eBinary files /dev/null and b/public/previews/film-looks/teal-orange.640.avif differdiff --git a/public/previews/film-looks/teal-orange.640.webp b/public/previews/film-looks/teal-orange.640.webpnew file mode 100644index 00000000..63ba2ae2Binary files /dev/null and b/public/previews/film-looks/teal-orange.640.webp differdiff --git a/public/previews/film-looks/tintype.320.avif b/public/previews/film-looks/tintype.320.avifnew file mode 100644index 00000000..d07bc2d8Binary files /dev/null and b/public/previews/film-looks/tintype.320.avif differdiff --git a/public/previews/film-looks/tintype.320.webp b/public/previews/film-looks/tintype.320.webpnew file mode 100644index 00000000..5b79bb3eBinary files /dev/null and b/public/previews/film-looks/tintype.320.webp differdiff --git a/public/previews/film-looks/tintype.640.avif b/public/previews/film-looks/tintype.640.avifnew file mode 100644index 00000000..288782cfBinary files /dev/null and b/public/previews/film-looks/tintype.640.avif differdiff --git a/public/previews/film-looks/tintype.640.webp b/public/previews/film-looks/tintype.640.webpnew file mode 100644index 00000000..b8d2d46aBinary files /dev/null and b/public/previews/film-looks/tintype.640.webp differdiff --git a/public/previews/film-looks/toy-plastic.320.avif b/public/previews/film-looks/toy-plastic.320.avifnew file mode 100644index 00000000..d5a86307Binary files /dev/null and b/public/previews/film-looks/toy-plastic.320.avif differdiff --git a/public/previews/film-looks/toy-plastic.320.webp b/public/previews/film-looks/toy-plastic.320.webpnew file mode 100644index 00000000..9539d0a9Binary files /dev/null and b/public/previews/film-looks/toy-plastic.320.webp differdiff --git a/public/previews/film-looks/toy-plastic.640.avif b/public/previews/film-looks/toy-plastic.640.avifnew file mode 100644index 00000000..75b701d8Binary files /dev/null and b/public/previews/film-looks/toy-plastic.640.avif differdiff --git a/public/previews/film-looks/toy-plastic.640.webp b/public/previews/film-looks/toy-plastic.640.webpnew file mode 100644index 00000000..6d114f1aBinary files /dev/null and b/public/previews/film-looks/toy-plastic.640.webp differdiff --git a/public/previews/film-looks/vivid-slide.320.avif b/public/previews/film-looks/vivid-slide.320.avifnew file mode 100644index 00000000..c2172b6eBinary files /dev/null and b/public/previews/film-looks/vivid-slide.320.avif differdiff --git a/public/previews/film-looks/vivid-slide.320.webp b/public/previews/film-looks/vivid-slide.320.webpnew file mode 100644index 00000000..2fa63b39Binary files /dev/null and b/public/previews/film-looks/vivid-slide.320.webp differdiff --git a/public/previews/film-looks/vivid-slide.640.avif b/public/previews/film-looks/vivid-slide.640.avifnew file mode 100644index 00000000..e00cb485Binary files /dev/null and b/public/previews/film-looks/vivid-slide.640.avif differdiff --git a/public/previews/film-looks/vivid-slide.640.webp b/public/previews/film-looks/vivid-slide.640.webpnew file mode 100644index 00000000..b64ee157Binary files /dev/null and b/public/previews/film-looks/vivid-slide.640.webp differdiff --git a/scripts/gen-film-look-thumbs.mjs b/scripts/gen-film-look-thumbs.mjsnew file mode 100644index 00000000..55dfd49d--- /dev/null+++ b/scripts/gen-film-look-thumbs.mjs@@ -0,0 +1,22 @@+#!/usr/bin/env node+/**+ * The Film look picker's thumbnails (src/lib/film-looks.ts filmLookThumb): each look's chosen test render (a 3:4 MOSS-Image+ * picture) as public/previews/film-looks/<id>.320 and .640, in AVIF and WebP.+ *+ * Run: node scripts/gen-film-look-thumbs.mjs <picks.json> (picks.json: { "<look id>": "<path to its render>" })+ */+import fs from "node:fs";+import path from "node:path";+import sharp from "sharp";++const picks = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));+const out = path.resolve("public/previews/film-looks");+fs.mkdirSync(out, { recursive: true });+for (const [id, src] of Object.entries(picks)) {+ for (const w of [320, 640]) {+ const img = sharp(src).resize({ width: w, height: Math.round((w * 4) / 3), fit: "cover", position: "attention" });+ await img.clone().avif({ quality: w === 320 ? 52 : 48, effort: 6 }).toFile(path.join(out, `${id}.${w}.avif`));+ await img.clone().webp({ quality: w === 320 ? 76 : 72, effort: 6 }).toFile(path.join(out, `${id}.${w}.webp`));+ }+ console.log(id);+}diff --git a/skills/moss-film-looks/SKILL.md b/skills/moss-film-looks/SKILL.mdnew file mode 100644index 00000000..ecd568fc--- /dev/null+++ b/skills/moss-film-looks/SKILL.md@@ -0,0 +1,61 @@+---+name: moss-film-looks+description: Write MOSS-Image photo prompts and give the picture a film or camera look (night colour film, slide, black and white, tintype, instant film, a movie still, toy and odd cameras, grades, light leaks, double exposure). Use when the user wants a photo with a film look, a vintage or analogue feel, black and white, an instant print or a lo-fi camera, or asks how to prompt MOSS-Image.+compatibility: Needs a Fuobe server. Fuobe Assist runs these steps itself; other agents call the generate tool on Fuobe's MCP endpoint (/api/mcp) or use the fuobe CLI.+metadata:+ title: Film Looks+ when_to_use: The user wants a picture with a film, camera or analogue look ("shot on black and white film", "like an old instant photo", "a movie still at night", "light leaks", "a tintype portrait"), or asks how to write a prompt for MOSS-Image.+ icon: film+ studio: /image?model=oss-moss-image+ tags: film, photography, black and white, vintage, look+ offline_kind: image+ offline_aspect: "3:4"+ offline_outputs: "2"+ offline_style: night colour film photograph, cool blue-teal shadows, warm orange highlights, a soft red glow around bright lights, fine visible film grain, deep inky blacks+---++# Film Looks++MOSS-Image (`oss-moss-image` on your GPU, `moss-image` in the cloud) has Fuobe's tested film+looks. Pick one with `film_look` and write the scene only: Fuobe puts the look before and after+the scene and adds the look's own negative prompt when the picture is made. The user's prompt+stays as they wrote it.++## 1. Write the scene+- Plain prose: whole sentences, no JSON, no tag lists.+- The subject first: who, their hair, face and outfit (materials and cut), the place, the light.+- Pin the pose down: where they stand or sit, where the hands and the weight are, where they look.+ The same pose keeps the subject steady when the user tries several looks.+- Name only what should be in the picture. What should not be there goes in `negative_prompt`.+- With a look picked, name no film stock, camera, grade, grain or lens look of your own.+- With a black-and-white look (the Black & white group), name no colours: hair is fair or+ dark, eyes light or dark, jewellery metal. Fuobe also takes colour words out before the run.++## 2. Pick the look+Call `search_models` for image: MOSS-Image's `filmLooks` field lists every id. The groups:++| Group | Looks |+|---|---|+| Colour film | night halation, muted chrome |+| Slide | vivid slide, cross-processed |+| Black & white | grainy 400, fine grain 100, pushed 3200, sepia, tintype, daguerreotype, glass plate |+| Instant | vintage instant, expired instant, mini instant |+| Motion picture | cinema 500, Super 8 |+| Toy & odd cameras | plastic toy camera, lo-fi compact, pinhole, toy fisheye, half-frame diptych, pocket 110, disposable, 2000s digicam |+| Looks | teal and orange |+| Broken film | light leaks, fogged film, double exposure, end of roll, scratched print |++## 3. Writing a look by hand+When no listed look fits, describe the look in the prompt yourself, the same way Fuobe's looks do:+- Say what the film or camera does to the picture: "cool blue-teal shadows, warm orange+ highlights, a soft red glow around every light, fine grain". Brand and stock names do nothing.+- Say the look first, then the scene, then the look again.+- Put the opposite look in `negative_prompt` ("flat even daylight, HDR, clean digital look"), and+ colours the look could paint onto walls or clothes ("orange walls").+- An overlay needs what and where: "a faint city skyline across the left half of the frame",+ "a warm orange light leak from the right edge".+- A dark slide look needs "underexposed, low-key" to keep its depth.++## Using Fuobe from an agent+`generate` with the model `oss-moss-image` (or `moss-image`), op t2i, the scene as the prompt, and+the film_look field set to a look's id.diff --git a/src/app/api/enhance/route.ts b/src/app/api/enhance/route.tsindex 94034886..daaedf1e 100644--- a/src/app/api/enhance/route.ts+++ b/src/app/api/enhance/route.ts@@ -1,6 +1,7 @@import { enhancePrompt, writeLyrics } from "@/server/enhance";import { getModel } from "@/lib/catalog";import { appliesOwnStyle } from "@/lib/catalog/applied-style";+import { filmLook as lookOf, takesFilmLooks } from "@/lib/film-looks";import type { MediaKind, Operation } from "@/lib/catalog/types";import { GUEST_HEADER, GUEST_RUN_MESSAGE, ownGpuToolMessage, SIGN_IN_CODE } from "@/lib/guest-access";import { LoginGuard, requestViewer } from "@/server/auth";@@ -31,7 +32,7 @@ function noLyrics(owner: boolean, why: HelperTrouble | null): Response {}export async function POST(request: Request) {- const { prompt, kind, op, target, seconds, max, modelId } = (await request.json().catch(() => ({}))) as {+ const { prompt, kind, op, target, seconds, max, modelId, filmLook } = (await request.json().catch(() => ({}))) as {prompt?: string;kind?: MediaKind;op?: Operation;@@ -41,6 +42,8 @@ export async function POST(request: Request) {max?: number;/** The composer's model: one that puts its own look on the clip (an H3 Max look) gets no look of Fuobe's. */modelId?: string;+ /** MOSS-Image's picked film look (src/lib/film-looks.ts): added after the rewrite, so the rewrite names no look. */+ filmLook?: string;};if (!prompt?.trim()) return Response.json({ error: "Empty prompt" }, { status: 400 });// A visitor (only while hosted runs are on: the proxy lets nothing else through) gets the free helper, as itself.@@ -62,8 +65,12 @@ export async function POST(request: Request) {if (!lyrics) return noLyrics(owner, why);return Response.json({ lyrics });}- const ownStyle = !!modelId && !!getModel(modelId)?.routes.some(appliesOwnStyle);- return Response.json({ prompt: await run(() => enhancePrompt(words, kind ?? "image", op ?? "t2i", { ownStyle }, { guestKey: key, waitMs: 45_000 })) });+ const model = modelId ? getModel(modelId) : undefined;+ const ownStyle = !!model?.routes.some(appliesOwnStyle);+ // MOSS-Image gets its own prompt rules, and none of the rewrite's own look when a film look is picked.+ const look = lookOf(filmLook);+ const moss = takesFilmLooks(model) ? { filmLook: !!look, mono: !!look?.mono } : undefined;+ return Response.json({ prompt: await run(() => enhancePrompt(words, kind ?? "image", op ?? "t2i", { ownStyle, ...(moss && { moss }) }, { guestKey: key, waitMs: 45_000 })) });} catch (e) {return Response.json({ error: (e as Error).message }, { status: 502 });}diff --git a/src/components/canvas/nodes.tsx b/src/components/canvas/nodes.tsxindex 3d62a6fa..221df2d8 100644--- a/src/components/canvas/nodes.tsx+++ b/src/components/canvas/nodes.tsx@@ -69,6 +69,7 @@ import { ModelTile } from "@/components/model3d/model-tile";import { preview3dOf } from "@/lib/preview3d";import { fileToSlot, type SlotValue } from "@/components/studio/media-slot";import { ControlsChip } from "@/components/studio/model-controls";+import { FILM_LOOK_PARAM, takesFilmLooks } from "@/lib/film-looks";import { ModelPicker } from "@/components/studio/model-picker";import { ResponsivePanel } from "@/components/studio/responsive-panel";import { VoiceRecorder } from "@/components/studio/voice-recorder";@@ -720,6 +721,11 @@ function ModelOptions({ id, model, data, runOp, readOnly }: { id: string; model:);if (o.sliders?.length) items.push(<div key="sliders" className={NO_DRAG}><SlidersChip model={model} values={extra} onChange={setExtra} /></div>);if (o.controls?.length) items.push(<div key="controls" className={NO_DRAG}><ControlsChip controls={o.controls} values={extra} onChange={setExtra} op={op} /></div>);+ // MOSS-Image's Film look, as in the Image studio (the server adds the look around the node's words).+ if (takesFilmLooks(model) && (op ?? "t2i") === "t2i") {+ const look = extra[FILM_LOOK_PARAM];+ items.push(<div key="film" className={NO_DRAG}><FilmLookChip value={typeof look === "string" ? look : undefined} onChange={(v) => setExtra(FILM_LOOK_PARAM, v)} /></div>);+ }// A value the node holds that its run makes differently (a model switch kept 2K; a template set 4K): said before the// run, with the value it is made at one tap away.const changes = op ? fittedSettings(model, op, { ...d, ...p }).changes : [];@@ -1946,6 +1952,8 @@ const TableNode = memo(function TableNode({ id, data, selected }: NodeProps<Flow// Layout: boxes for a headline, a product, a price; the image model it feeds draws each in its placeconst LayoutEditor = dynamic(() => import("@/components/studio/layout-editor").then((m) => m.LayoutEditor));+/** MOSS-Image's Film look picker: its own chunk, as in the Image studio. */+const FilmLookChip = dynamic(() => import("@/components/studio/film-look-chip"));const LAYOUT_ASPECTS = ["1:1", "4:5", "3:4", "2:3", "9:16", "16:9", "3:2", "4:3"];const EMPTY_LAYOUT: LayoutDraft = { summary: { caption: "", meta: [], canvas: "single" }, items: [], aspect: "1:1" };diff --git a/src/components/studio/composer.tsx b/src/components/studio/composer.tsxindex 183ff267..35cc1660 100644--- a/src/components/studio/composer.tsx+++ b/src/components/studio/composer.tsx@@ -159,6 +159,7 @@ import { useVoiceFirstLive, useVoiceFirstShown, VoiceFirstSwitch } from "@/compoimport { VOICE_FIRST_PARAM, voiceFirstDefault } from "@/lib/av/voice-first";import { useSignature } from "../palettes/use-signature";import { placeholdersOn } from "@/lib/demo-mode";+import { FILM_LOOK_PARAM, takesFilmLooks } from "@/lib/film-looks";const EMPTY: StudioElement[] = [];@@ -178,6 +179,11 @@ const LookChip = dynamic(() => import("./look-chip"), {loading: () => <span aria-hidden className="h-8 w-28 shrink-0 animate-pulse rounded-full bg-secondary" />,});+/** MOSS-Image's Film look picker (the look thumbnails): its own chunk. */+const FilmLookChip = dynamic(() => import("./film-look-chip"), {+ loading: () => <span aria-hidden className="h-8 w-28 shrink-0 animate-pulse rounded-full bg-secondary" />,+});+/** Color signature + Moodboard chips (studios with `signature`): their own chunk too. */const SignatureChips = dynamic(() => import("../palettes/signature-chips"), {loading: () => <span aria-hidden className="h-8 w-40 shrink-0 animate-pulse rounded-full bg-secondary" />,@@ -1178,7 +1184,8 @@ export function Composer({ docked }: { docked: boolean }) {if (!draft.prompt.trim()) return toast("Write a short idea first, then enhance it");setEnhancing(true);try {- const p = await enhance(draft.prompt, config.kind, op ?? (config.kind === "video" ? "t2v" : "t2i"), draft.modelId);+ const look = draft.params.extra?.[FILM_LOOK_PARAM];+ const p = await enhance(draft.prompt, config.kind, op ?? (config.kind === "video" ? "t2v" : "t2i"), draft.modelId, typeof look === "string" ? look : undefined);setDraft({ prompt: p });} catch (e) {if (!helperSignIn(e)) toastError(e);@@ -1708,6 +1715,13 @@ export function Composer({ docked }: { docked: boolean }) {onStrength={(v) => setDraft({ presetStrength: v })}/>)}+ {takesFilmLooks(model) && (effectiveOp ?? "t2i") === "t2i" && (+ <FilmLookChip+ value={typeof p.extra?.[FILM_LOOK_PARAM] === "string" ? (p.extra[FILM_LOOK_PARAM] as string) : undefined}+ onChange={(id) => setExtra(FILM_LOOK_PARAM, id)}+ disabled={layoutOn ? "Film looks work on words: turn Layout off to see the look in this picture." : undefined}+ />+ )}{shownControls.length > 0 && <ControlsChip controls={shownControls} values={p.extra ?? {}} onChange={setExtra} title={config.controlsTitle} op={effectiveOp} setupOf={setupViewer ? (param, v) => controlSetup(model?.id, param, v) : undefined} />}{opts.lightSphere && <LightSphereChip value={draft.slots.image} onChange={setLight} />}{effectiveOp === "insert-moment" && <InsertRangeChip clip={facts?.duration} start={p.startTime} resume={p.endTime} onChange={setInsertRange} />}diff --git a/src/components/studio/film-look-chip.tsx b/src/components/studio/film-look-chip.tsxnew file mode 100644index 00000000..0ffed9f1--- /dev/null+++ b/src/components/studio/film-look-chip.tsx@@ -0,0 +1,105 @@+"use client";++import { Film } from "lucide-react";+import { useState } from "react";+import { FILM_LOOK_GROUPS, filmLook, filmLookThumb, FILM_LOOKS, type FilmLook } from "@/lib/film-looks";+import { cn } from "@/lib/utils";+import { Chip, ClearableChip } from "./chip";+import { radioKeys, radioTab } from "./radio-keys";+import { ResponsivePanel } from "./responsive-panel";++/**+ * MOSS-Image's Film look picker (params.extra.filmLook): Fuobe's tested film and camera looks, grouped, each with a+ * thumbnail made from its own test render. The server adds the look around the words when the picture is made, so the+ * prompt box keeps the person's words as written. A popover on desktop, a bottom sheet on phones; its own chunk.+ */++const ALL = "All looks";++function Thumb({ look, className, sizes = "120px", width = 320 }: { look: FilmLook; className?: string; sizes?: string; width?: 320 | 640 }) {+ const small = filmLookThumb(look.id, 320);+ const large = filmLookThumb(look.id, 640);+ return (+ <picture className={cn("block overflow-hidden bg-muted", className)}>+ <source type="image/avif" srcSet={`${small.avif} 320w, ${large.avif} 640w`} sizes={sizes} />+ <source type="image/webp" srcSet={`${small.webp} 320w, ${large.webp} 640w`} sizes={sizes} />+ <img src={(width === 640 ? large : small).webp} alt="" loading="lazy" decoding="async" className="size-full object-cover" />+ </picture>+ );+}++export default function FilmLookChip({ value, onChange, disabled }: { value?: string; onChange: (id: string | undefined) => void; disabled?: string }) {+ const [open, setOpen] = useState(false);+ const picked = filmLook(value);+ const [tab, setTab] = useState<string>(picked?.group ?? ALL);+ const groups = FILM_LOOK_GROUPS.filter((g) => FILM_LOOKS.some((l) => l.group === g));+ const items = tab === ALL ? FILM_LOOKS : FILM_LOOKS.filter((l) => l.group === tab);+ return (+ <ClearableChip active={!!picked} onClear={() => onChange(undefined)} clearLabel="No film look">+ <ResponsivePanel+ open={open}+ onOpenChange={setOpen}+ title="Film look"+ description="Film and camera looks for MOSS-Image. Fuobe adds the look around your words when the picture is made; your prompt stays as you wrote it."+ className="w-[min(92vw,500px)] p-2"+ trigger={+ <Chip icon={picked ? undefined : Film} active={!!picked} aria-label={`Film look: ${picked?.name ?? "none"}`} title={disabled}>+ {picked && <Thumb look={picked} className="size-4 rounded-full" sizes="16px" />}+ <span className="max-w-32 truncate">{picked?.name ?? "Film look"}</span>+ </Chip>+ }+ >+ {disabled && <p className="mb-2 rounded-md bg-muted px-2 py-1.5 text-[12px] text-muted-foreground">{disabled}</p>}+ {/* Filters of the grid below (not tabs with panels): a radio group, arrow keys move and pick. */}+ <div role="radiogroup" aria-label="Film look groups" onKeyDown={radioKeys} className="scrollbar-none -mx-0.5 mb-2 flex gap-1 overflow-x-auto px-0.5">+ {[ALL, ...groups].map((t) => (+ <button+ key={t}+ type="button"+ role="radio"+ aria-checked={tab === t}+ tabIndex={radioTab(tab === t)}+ onClick={() => setTab(t)}+ className={cn(+ "h-7 shrink-0 rounded-full px-2.5 text-[12px] font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50",+ tab === t ? "bg-brand-faint text-brand-text" : "text-muted-foreground hover:bg-accent",+ )}+ >+ {t}+ </button>+ ))}+ </div>+ <div className="grid max-h-80 grid-cols-3 gap-1.5 overflow-y-auto sm:grid-cols-4">+ {items.map((l) => (+ <button+ key={l.id}+ type="button"+ aria-pressed={picked?.id === l.id}+ title={l.blurb}+ onClick={() => {+ onChange(picked?.id === l.id ? undefined : l.id);+ setOpen(false);+ }}+ className={cn("group flex min-w-0 flex-col gap-1 rounded-lg p-1 text-left ring-primary transition hover:bg-accent", picked?.id === l.id && "ring-2")}+ >+ <span className="relative aspect-[3/4] w-full overflow-hidden rounded-md">+ <Thumb look={l} className="size-full transition-transform duration-300 group-hover:scale-105" />+ </span>+ <span className="truncate px-0.5 text-[12px] font-medium">{l.name}</span>+ </button>+ ))}+ </div>+ <p className="mt-2 border-t px-0.5 pt-2 text-[12px] text-muted-foreground">+ {picked ? (+ <>+ <span className="font-medium text-foreground">{picked.name}.</span> {picked.blurb}.+ {picked.mono && " Black and white: colour words in your prompt are left out of this picture."}+ </>+ ) : (+ "Pick a look: describe the scene in your prompt, and the look takes care of the colour, grain and contrast."+ )}+ </p>+ </ResponsivePanel>+ </ClearableChip>+ );+}diff --git a/src/lib/api.ts b/src/lib/api.tsindex e271903a..c23b5eeb 100644--- a/src/lib/api.ts+++ b/src/lib/api.ts@@ -1173,13 +1173,14 @@ export function useClipFacts(url: string | undefined) {});}-export async function enhance(prompt: string, kind: MediaKind, op: string, modelId?: string): Promise<string> {+/** `filmLook`: MOSS-Image's picked film look, which Fuobe adds after the rewrite (so the rewrite names no look of its own). */+export async function enhance(prompt: string, kind: MediaKind, op: string, modelId?: string, filmLook?: string): Promise<string> {return (await json<{ prompt: string }>(await fetch("/api/enhance", {method: "POST",headers: { "Content-Type": "application/json" },- body: JSON.stringify({ prompt, kind, op, modelId }),+ body: JSON.stringify({ prompt, kind, op, modelId, ...(filmLook && { filmLook }) }),}),)).prompt;diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.tsindex c1e296eb..1d5da454 100644--- a/src/lib/catalog/plan.ts+++ b/src/lib/catalog/plan.ts@@ -24,7 +24,8 @@ import { qmaRunPrompt } from "@/lib/qma";import { askedSize, clipWords, fitLength, fitValue, numFramesValue, sizeValue } from "./payload";import { oneEachCall } from "./route-takes";import { characterScale, CINEMA_CROP, soulKind, soulMegapixels, soulRecipe, soulSize, type SoulOverlay } from "./soul";-import { computeDimensions, fitCanvas } from "@/lib/comfy";+import { computeDimensions, fitCanvas, PROMPT_HELPER_PARAM } from "@/lib/comfy";+import { FILM_LOOK_PARAM, filmLook, takesFilmLooks } from "@/lib/film-looks";import { carriesLayout, flux3Boxes, flux3Caption, layoutCompilerFor, LAYOUT_MAX_SIDE, LAYOUT_MULTIPLE, LAYOUT_PARAM, readLayout, validateLayout, type LayoutDraft, type LayoutFormat } from "@/lib/layout-prompt";import { pricingOn, type PriceClock } from "./promo";import { isInstrumental, lyricsOf, lyricsProblem, LYRICS_PARAM, promptLyricsProblem } from "@/lib/lyrics";@@ -381,6 +382,12 @@ export interface Plan {layout?: { format: LayoutFormat | "words"; boxes: number; width?: number; height?: number };/** MiniMax H3's sound lines from the preset's route (its preview's), which its layout's sound fields take. */sound?: { soundscape: string; music: string };+ /**+ * A MOSS-Image film look (params.extra.filmLook, src/lib/film-looks.ts): the server wraps the run's words in it just+ * before the run (the look, the scene, the look again; its negative beside the run's), so the person's prompt stays as+ * typed. `mono`: a monochrome look, whose scene loses its colour words first.+ */+ film?: { look: string; mono: boolean };/** An end-frame step: an image edit of the start frame that becomes the clip's end frame (H3 flf2v). */end?: PresetEndStep;}@@ -691,6 +698,22 @@ export function planGeneration(params = compiled.params;layoutPlan = compiled.layout;}+ // A film look (MOSS-Image's Film look chip): never sent as a setting of its own. It applies to a picture made from words;+ // a layout keeps its compiled boxes, and another model or operation runs without it, saying so.+ let film: Plan["film"];+ if (params.extra && FILM_LOOK_PARAM in params.extra) {+ const look = filmLook(params.extra[FILM_LOOK_PARAM]);+ const rest = { ...params.extra };+ delete rest[FILM_LOOK_PARAM];+ if (look && takesFilmLooks(model) && op === "t2i" && !layoutPlan) {+ film = { look: look.id, mono: !!look.mono };+ // The API's own prompt expansion would rewrite the look's words: off for this run (fal's MOSS-Image).+ if (routesFor(model, op).some((r) => r.map?.promptExpansion)) rest[PROMPT_HELPER_PARAM] = "off";+ } else if (look) {+ notes.push(layoutPlan ? `${look.name} is made for words: the layout runs without the film look` : `${look.name} is a MOSS-Image film look: this run is made without it`);+ }+ params = { ...params, extra: Object.keys(rest).length ? rest : undefined };+ }// MiniMax H3's orbit of a still (its Orbit LoRA graph, src/lib/comfy-variants.ts) runs at the LoRA's own length, 3 s// (73 frames), unless the run names a length.if (model.options.promptFormat === "minimax-h3" && op === "i2v" && params.extra?.orbit === true && req.params?.duration === undefined && params.duration === model.defaults?.duration) {@@ -840,6 +863,7 @@ export function planGeneration(...(notes.length && { notes }),...(soulPlan && { soul: soulPlan }),...(layoutPlan && { layout: layoutPlan }),+ ...(film && { film }),...(sound && { sound }),...(end && { end }),};diff --git a/src/lib/film-looks.ts b/src/lib/film-looks.tsnew file mode 100644index 00000000..e6806eb9--- /dev/null+++ b/src/lib/film-looks.ts@@ -0,0 +1,447 @@+/**+ * Film looks for MOSS-Image (both engines): a picked look (params.extra.filmLook) is applied by the server just before+ * the run, never shown in the person's prompt. Each look is a short recipe of what the film or camera visibly does+ * (colour, contrast, grain, halation, vignette, borders, leaks), never a stock or camera brand: MOSS-Image draws the+ * effects it is told about and ignores names. The run reads it as a sandwich: the recipe, the person's scene, the+ * recipe again. Its negative names the opposite look, beside MOSS-Image's own base negative (MOSS runs at a low CFG,+ * so the negative steers a lot). A monochrome look also takes the colour words out of the scene first, or colour+ * survives; the server asks an LLM to do that (src/server/film-look.ts) and this file's word list is the fallback.+ *+ * Every recipe here was rendered on MOSS-Image SFT (25 steps, CFG 2.5, er_sde) over several pose-locked scenes and+ * judged before it shipped; looks that MOSS-Image renders weakly (missed focus, true panoramas, square frames, warm+ * portrait films it already looks like) are left out. Pure, so the composer, the server and the tests share it.+ */++/** The picker's groups, in their order. */+export const FILM_LOOK_GROUPS = ["Colour film", "Slide", "Black & white", "Instant", "Motion picture", "Toy & odd cameras", "Looks", "Broken film"] as const;+export type FilmLookGroup = (typeof FILM_LOOK_GROUPS)[number];++/** params.extra's key for the picked look. */+export const FILM_LOOK_PARAM = "filmLook";++export interface FilmLook {+ id: string;+ name: string;+ group: FilmLookGroup;+ /** One line for the picker: what the look does to a picture. */+ blurb: string;+ /** The look in words of what shows: said before the scene and again after it. */+ recipe: string;+ /** The opposite look (and colours the look would otherwise paint onto walls and clothes), for the negative field only. */+ negative: string;+ /** A monochrome look: the scene's colour words come out before the run. */+ mono?: true;+}++/** MOSS-Image's own negative (the graph's default), kept under every look's. */+export const MOSS_BASE_NEGATIVE = "nsfw, worst quality, bad anatomy, watermark, jpeg artifact";++/** The colours a monochrome look's negative names, so none creep back in. */+const COLOUR_NEGATIVE = "color, colorful, saturated colors, color cast, red, orange, yellow, green, blue, purple, pink";++export const FILM_LOOKS: FilmLook[] = [+ // Colour film+ {+ id: "night-halation",+ name: "Night halation",+ group: "Colour film",+ blurb: "Cool teal shadows, warm highlights and a red glow around every light",+ recipe: "night colour film photograph, cool blue-teal shadows, warm orange highlights, a soft red halation glow around every bright light, fine visible film grain, deep inky blacks",+ negative: "flat even daylight, HDR, clean digital look, sterile sharpening, teal skin, orange walls",+ },+ {+ id: "muted-chrome",+ name: "Muted chrome",+ group: "Colour film",+ blurb: "Quiet documentary colour: low saturation, hard contrast, deep reds",+ recipe: "documentary colour film photograph, muted low-saturation colours, hard contrast, cool cyan-leaning shadows, deep dense reds, matte highlights, fine grain",+ negative: "vivid saturated colours, HDR, glossy digital look, warm golden glow, pastel colours",+ },+ // Slide+ {+ id: "vivid-slide",+ name: "Vivid slide",+ group: "Slide",+ blurb: "Deep saturated colour, dark low-key shadows and crisp grain",+ recipe: "vivid slide film photograph, deeply saturated colours, rich deep blues, dense greens, glowing reds, high contrast, underexposed, low-key, dark rich shadows, fine crisp grain",+ negative: "washed-out pastel colours, faded, lifted blacks, overexposed, HDR, flat lighting",+ },+ {+ id: "cross-processed",+ name: "Cross-processed",+ group: "Slide",+ blurb: "Shifted colour: yellow-green highlights, cyan shadows, punchy contrast",+ recipe: "cross-processed slide film photograph, punchy yellow-green highlights, deep cyan shadows, high contrast, oversaturated shifted colours, crushed blacks, strong grain",+ negative: "natural colours, neutral white balance, soft low contrast, clean digital look, accurate skin tones",+ },+ // Black & white+ {+ id: "bw-grain",+ name: "Grainy 400",+ group: "Black & white",+ blurb: "Classic black and white: gritty grain, deep blacks, bright whites",+ recipe: "black and white film photograph, monochrome, gritty silver grain, deep blacks, bright whites, strong punchy contrast",+ negative: `${COLOUR_NEGATIVE}, sepia tint, smooth digital look`,+ mono: true,+ },+ {+ id: "bw-fine",+ name: "Fine grain 100",+ group: "Black & white",+ blurb: "Smooth, silvery black and white with a long tonal range",+ recipe: "fine-grain black and white film photograph, monochrome, smooth silky tonal range, silvery mid-greys, crisp detail, soft deep blacks",+ negative: `${COLOUR_NEGATIVE}, sepia tint, harsh grain, crushed shadows`,+ mono: true,+ },+ {+ id: "bw-pushed",+ name: "Pushed 3200",+ group: "Black & white",+ blurb: "Black and white pushed hard: coarse grain, crushed blacks, blown whites",+ recipe: "pushed black and white film photograph, monochrome, coarse heavy grain, crushed blacks, blown-out highlights, harsh gritty contrast",+ negative: `${COLOUR_NEGATIVE}, sepia tint, smooth clean digital look, soft low contrast`,+ mono: true,+ },+ {+ id: "sepia",+ name: "Sepia print",+ group: "Black & white",+ blurb: "An old photographic print toned warm brown",+ recipe: "antique sepia-toned photographic print, warm brown monochrome, soft faded contrast, fine paper texture, gentle dark vignette",+ negative: "color, colorful, saturated colors, red, green, blue, purple, pink, modern digital look",+ mono: true,+ },+ {+ id: "tintype",+ name: "Tintype",+ group: "Black & white",+ blurb: "A wet-plate portrait on metal with dark lacquered edges",+ recipe: "wet plate tintype photograph, monochrome metallic grey-brown tones, dark lacquered plate edges, uneven chemical streaks and swirls at the borders, soft glowing highlights, antique",+ negative: `${COLOUR_NEGATIVE}, modern digital look, clean straight edges`,+ mono: true,+ },+ {+ id: "daguerreotype",+ name: "Daguerreotype",+ group: "Black & white",+ blurb: "A silvery mirror-plate portrait with tarnished edges",+ recipe: "daguerreotype photograph on a silvered mirror plate, cool silvery monochrome, soft glowing highlights, tarnished dark edges, faint fine scratches, antique",+ negative: `${COLOUR_NEGATIVE}, modern digital look, clean edges`,+ mono: true,+ },+ {+ id: "glass-plate",+ name: "Glass plate",+ group: "Black & white",+ blurb: "An antique glass-plate print with chipped dark corners",+ recipe: "antique glass plate photograph print, silvery monochrome, soft glow, chipped dark corners, uneven emulsion along the edges, fine dust specks",+ negative: `${COLOUR_NEGATIVE}, modern digital look, clean edges`,+ mono: true,+ },+ // Instant+ {+ id: "instant-classic",+ name: "Vintage instant",+ group: "Instant",+ blurb: "Soft dreamy colour in a white instant-film frame",+ recipe: "vintage instant film photograph, soft dreamy colours, creamy warm highlights, gentle low contrast, slightly faded blacks, thick white instant-film border with a wider bottom edge",+ negative: "HDR, crisp digital look, high contrast, borderless full-bleed image, black border",+ },+ {+ id: "instant-expired",+ name: "Expired instant",+ group: "Instant",+ blurb: "Faded colour shifts and chemical blotches in a white frame",+ recipe: "expired instant film photograph, faded washed-out colours, magenta and yellow colour shifts, chemical blotches and uneven development at the edges, soft low contrast, white instant-film border",+ negative: "crisp clean image, accurate colours, HDR, digital look, borderless full-bleed image",+ },+ {+ id: "instant-mini",+ name: "Mini instant",+ group: "Instant",+ blurb: "Bright airy flash colour in a narrow white frame",+ recipe: "mini instant film print, the photograph framed by a plain white card border on all four sides, a slightly wider white strip along the bottom edge, bright airy colours, soft on-camera flash, gentle contrast",+ negative: "dark moody grade, HDR, heavy grain, borderless full-bleed image, black border, cropped border",+ },+ // Motion picture+ {+ id: "cinema-500",+ name: "Cinema 500",+ group: "Motion picture",+ blurb: "A movie still: teal shadows, warm skin, soft halation, fine grain",+ recipe: "35mm motion picture film frame, cinematic colour grade, cool teal-blue shadows, warm natural skin tones, soft glowing halation around highlights, fine organic film grain, rich deep blacks",+ negative: "video look, HDR, digital sharpening, flat lighting, oversaturated colours",+ },+ {+ id: "super-8",+ name: "Super 8",+ group: "Motion picture",+ blurb: "A home-movie frame: warm faded colour, heavy grain, rounded corners",+ recipe: "Super 8 home movie film frame, warm faded colours, heavy grain, soft blooming highlights, dim corners, rounded dark frame edges, nostalgic 1970s",+ negative: "crisp digital look, HDR, clean modern colour, sharp square corners",+ },+ // Toy & odd cameras+ {+ id: "toy-plastic",+ name: "Plastic toy camera",+ group: "Toy & odd cameras",+ blurb: "Heavy vignette and soft edges around a sharp centre",+ recipe: "plastic toy camera photograph, heavy dark vignette, soft smeared edges around a sharp centre, saturated colours, coarse grain",+ negative: "even sharpness to the corners, clean digital look, HDR, bright corners",+ },+ {+ id: "lomo",+ name: "Lo-fi compact",+ group: "Toy & odd cameras",+ blurb: "Punchy saturated colour inside a strong dark vignette",+ recipe: "lo-fi compact camera snapshot, punchy saturated colours, strong dark vignette, high contrast, deep shadows, coarse grain",+ negative: "muted colours, bright even corners, soft low contrast, clean digital look",+ },+ {+ id: "pinhole",+ name: "Pinhole",+ group: "Toy & odd cameras",+ blurb: "Soft dreamy focus and corners that fade to black",+ recipe: "pinhole camera photograph, soft dreamy focus across the whole frame, deep dark vignette fading to black at the corners, gentle glow, muted colours",+ negative: "crisp sharp detail, bright corners, HDR, digital sharpening",+ },+ {+ id: "fisheye-toy",+ name: "Toy fisheye",+ group: "Toy & odd cameras",+ blurb: "A round fisheye picture in a black surround",+ recipe: "toy fisheye camera photograph, circular fisheye image inside a black surround, strong barrel distortion bending straight lines, saturated colours, dark vignette",+ negative: "rectilinear lens, straight lines, full-frame rectangular image, flat perspective",+ },+ {+ id: "half-frame",+ name: "Half-frame diptych",+ group: "Toy & odd cameras",+ blurb: "Two tall frames side by side, as a half-frame camera prints them",+ recipe: "half-frame film diptych, two tall vertical frames side by side with a thin dark gap between them, the same moment from two slightly different angles, warm film colours, grain",+ negative: "single image, one frame, panorama, digital look",+ },+ {+ id: "pocket-110",+ name: "Pocket 110",+ group: "Toy & odd cameras",+ blurb: "A small-format snapshot: soft detail, faded warm colour",+ recipe: "110 pocket camera snapshot, small-format grain, soft slightly smeared detail, faded warm 1970s colours, gentle flash, rounded corners",+ negative: "crisp digital look, HDR, cold modern colour, razor sharp detail",+ },+ {+ id: "disposable",+ name: "Disposable",+ group: "Toy & odd cameras",+ blurb: "Harsh direct flash, saturated colour and a darker background",+ recipe: "cheap disposable film camera snapshot taken with a harsh direct on-camera flash, the subject's face and clothes blown bright and flat by the flash, a hard dark flash shadow on the wall right behind the subject, the background falling off darker, punchy saturated colours, plastic lens softness, coarse grain",+ negative: "soft studio lighting, HDR, cinematic grade, clean digital look, shallow depth of field",+ },+ {+ id: "digicam-2000s",+ name: "2000s digicam",+ group: "Toy & odd cameras",+ blurb: "Early compact digital: hard flash, cool tones, a date stamp",+ recipe: "early 2000s compact digital camera photo, harsh direct flash, cool slightly overexposed tones, crisp digital noise, small sensor look, an orange digital date stamp in the bottom right corner",+ negative: "film grain, cinematic colour grade, shallow depth of field, bokeh, warm film tones",+ },+ // Looks+ {+ id: "teal-orange",+ name: "Teal and orange",+ group: "Looks",+ blurb: "The blockbuster grade: teal shadows, warm skin and highlights",+ recipe: "teal and orange cinematic colour grade, deep teal shadows, warm orange skin tones and highlights, rich contrast, polished blockbuster look",+ negative: "teal skin, orange walls, teal walls, desaturated, flat grey, pastel",+ },+ // Broken film+ {+ id: "light-leaks",+ name: "Light leaks",+ group: "Broken film",+ blurb: "A warm orange-red leak glowing in from the right edge",+ recipe: "film photograph with a warm orange-red light leak glowing in from the right edge of the frame, faded warm colours, soft grain",+ negative: "clean even exposure, HDR, digital look, blue light leak",+ },+ {+ id: "fogged",+ name: "Fogged film",+ group: "Broken film",+ blurb: "A milky haze and a soft orange fog from the top edge",+ recipe: "fogged film photograph, milky haze over the whole frame, lifted hazy blacks, soft orange fog glow spreading down from the top edge, low contrast, grain",+ negative: "crisp clean contrast, deep blacks, HDR, digital look",+ },+ {+ id: "double-exposure",+ name: "Double exposure",+ group: "Broken film",+ blurb: "A faint city skyline blended across the left half of the frame",+ recipe: "double exposure film photograph, a faint second exposure of tall city skyscrapers at night blended across the left half of the frame, the subject's face clear and sharp, soft film grain",+ negative: "single clean exposure, digital collage, hard cut-out edges, HDR",+ },+ {+ id: "end-of-roll",+ name: "End of roll",+ group: "Broken film",+ blurb: "The last frame: a burnt orange-red edge and sprocket holes",+ recipe: "last frame at the end of a film roll, the right edge of the frame burned to glowing orange-red, a bright overexposed streak fading into the picture, a strip of film edge with sprocket holes along the right side",+ negative: "clean even exposure, digital look, HDR, full clean frame",+ },+ {+ id: "scratches",+ name: "Scratched print",+ group: "Broken film",+ blurb: "Fine white scratches, dust and hair marks over faded colour",+ recipe: "old damaged film print, fine white vertical scratches, dust specks and hair marks across the whole frame, faded colours, grain",+ negative: "clean pristine image, digital look, HDR, vivid saturated colours",+ },+];++const BY_ID = new Map(FILM_LOOKS.map((l) => [l.id, l]));++/** The models a film look is made for: MOSS-Image, on your GPU (oss-moss-image) and in the cloud (moss-image). */+export const takesFilmLooks = (model: { family?: string; kind?: string } | null | undefined): boolean => model?.family === "moss" && model.kind === "image";++/** The look with this id, if Fuobe has one. */+export const filmLook = (id: unknown): FilmLook | undefined => (typeof id === "string" ? BY_ID.get(id) : undefined);++/** The looks of each group, in the picker's order (empty groups left out). */+export function filmLookGroups(): { group: FilmLookGroup; looks: FilmLook[] }[] {+ return FILM_LOOK_GROUPS.map((group) => ({ group, looks: FILM_LOOKS.filter((l) => l.group === group) })).filter((g) => g.looks.length);+}++/** A look's thumbnail (public/previews/film-looks/<id>.<width>.avif and .webp, made from its best test render). */+export const filmLookThumb = (id: string, width: 320 | 640 = 320) => ({ avif: `/previews/film-looks/${id}.${width}.avif`, webp: `/previews/film-looks/${id}.${width}.webp` });++// ---------------------------------------------------------------------------+// Colour words out of a monochrome look's scene++/** Words that only ever name a colour. Black, white, grey and silver are tones: they stay. */+const HUES = [+ "red", "reds", "crimson", "scarlet", "burgundy", "maroon", "vermilion", "pink", "pinks", "fuchsia", "magenta",+ "yellow", "yellows", "mustard", "golden", "green", "greens", "teal", "turquoise", "cyan", "aquamarine",+ "blue", "blues", "navy", "cobalt", "azure", "indigo", "cerulean", "purple", "purples", "violet", "lavender", "lilac", "mauve",+ "brown", "browns", "beige", "auburn", "taupe", "terracotta", "ochre", "sienna", "umber", "blonde", "blond",+];+/**+ * Words that are colours only before a thing that wears or shows one ("camel wool coat", "emerald silk gown", "sage+ * walls"); elsewhere they are things themselves (a camel, an emerald ring's stone, sage leaves, champagne), so they stay.+ */+const THING_HUES = [+ "camel", "cream", "ivory", "emerald", "sapphire", "ruby", "jade", "amethyst", "gold", "sage", "olive", "mint", "lime", "lemon", "peach", "apricot", "coral",+ "salmon", "plum", "cherry", "wine", "rust", "copper", "bronze", "amber", "saffron", "khaki", "tan", "sand", "chocolate", "caramel", "cognac", "chestnut",+ "hazel", "honey", "champagne", "blush", "aqua", "orange",+];+const THINGS =+ "silk|satin|linen|wool|cashmere|leather|suede|velvet|cotton|tweed|denim|knit|lace|chiffon|tulle|dress|gown|coat|overcoat|trench|jacket|blazer|suit|shirt|blouse|top|tee|trousers|pants|jeans|skirt|scarf|shawl|hat|beret|shoes|heels|pumps|boots|loafers|sneakers|bag|handbag|clutch|tie|sweater|jumper|turtleneck|cardigan|vest|waistcoat|gloves|belt|wall|walls|door|doors|sofa|chair|curtains?|drapes|tiles?|backdrop|background|sky|light|glow|tones?|hues?|shades?|accents?|trim|fabric|paint|eyes|lips|lipstick|nails|eyeshadow|car|flowers?|petals?|roses?";+/** A hue's light/dark/pale qualifiers that go with it. */+const SHADE = "(?:(?:pale|light|dark|deep|bright|soft|muted|dusty|rich|vivid|warm|cool|neon|pastel|electric|burnt|hot)[\\s-]+)?";+/** "-coloured", "-toned", "-tinted", "-hued", "-ish" after a hue. */+const SUFFIX = "(?:[\\s-]*(?:colou?red|toned|tinted|hued|ish))?";+const HUE_WORDS = new RegExp(+ `\\b${SHADE}(?:(?:${HUES.join("|")}|(?<!\\b(?:an|some|two|three|\\d+)\\s)orange)${SUFFIX}|(?:${THING_HUES.join("|")})${SUFFIX}(?=[\\s-]+(?:(?:${HUES.join("|")}|${THING_HUES.join("|")}|and|or)[\\s,-]+)*(?:${THINGS})\\b))\\b`,+ "gi",+);+/** A closing list of colours ("… in sand, sage, ivory and gold."): two or more, after "in", at the end of a sentence. */+const ANY_HUE = `(?:${SHADE}(?:${[...HUES, ...THING_HUES].join("|")}))`;+const COLOUR_LIST = new RegExp(`\\s+in\\s+${ANY_HUE}(?:\\s*,\\s*${ANY_HUE})*\\s*(?:,\\s*)?(?:and|&)\\s+${ANY_HUE}(?=\\s*(?:[.;!?]|$))`, "gi");+/** Anything "-coloured", "-toned" or "-tinted" ("sand-coloured", "wine-toned"). */+const COLOURED = /\b[\p{L}]+[\s-](?:colou?red|toned|tinted|hued)\b/giu;+/** Whole colour phrases, said before the single words. */+const PHRASES: [RegExp, string][] = [+ [/\bgolden[\s-]hour(?:\s+(?:light|sun|sunlight|glow))?\b/gi, "low late-day sun"],+ [/\brose[\s-]gold\b/gi, "polished metal"],+ [/\b(?:in|with) (?:vivid|rich|bright|bold|warm|cool|pastel|muted|jewel|earthy) (?:colou?rs|tones|hues)\b/gi, ""],+ [/\b(?:vivid|vibrant|bright|bold|rich|saturated|pastel|jewel|earthy|warm|cool) (?:colou?rs|tones|hues|palette)\b/gi, ""],+ [/\b(?:multi-?colou?red|colou?rful|vibrant)\b/gi, ""],+ [/\bcolou?r palette of\b[^.,;]*/gi, ""],+ [/#[0-9a-f]{6}\b|#[0-9a-f]{3}\b/gi, ""],+];+/** "gold" and "golden" as a material: "gold drop earrings" → "metal drop earrings", so the jewellery stays. */+const GOLD_MATERIAL =+ /\b(?:gold|golden|brass|copper|bronze)(?=[\s-]+(?:[\p{L}]+[\s-]+)?(?:earrings?|necklace|pendant|chain|rings?|bracelets?|bangles?|cuffs?|hoops?|studs?|buttons?|buckles?|frames?|watch|dropper|lid|clasp|hardware|trim|leaf|jewellery|jewelry)\b)/giu;+/** Hair and eyes keep their tone: fair or dark hair, light or dark eyes. */+const FAIR_HAIR = /\b(?:(?:platinum|honey|ash|strawberry)[\s-])?blonde?(?=[\s-]+(?:[\p{L}]+[\s-]+)?(?:hair|waves|curls|locks|bob|ponytail|braids?|bun|lob)\b)/giu;+const DARK_HAIR = /\b(?:auburn|chestnut|brown|red|copper|ginger|chocolate|caramel|mahogany|burgundy)(?=[\s-]+(?:[\p{L}]+[\s-]+)?(?:hair|waves|curls|locks|bob|ponytail|braids?|bun|lob)\b)/giu;+const LIGHT_EYES = /\b(?:blue|green|grey|gray|hazel|amber|aqua|turquoise|emerald|sapphire|ice[\s-]blue)(?=[\s-]+eyes\b)/gi;+const DARK_EYES = /\b(?:brown|chocolate|honey|cognac)(?=[\s-]+eyes\b)/gi;++/** Tidy what taking words out leaves: doubled spaces and commas, "in and", a list that lost its items. */+function tidy(text: string): string {+ let t = text;+ for (let i = 0; i < 3; i++) {+ t = t+ .replace(/[ \t]{2,}/g, " ")+ .replace(/\s+([,.;:!?])/g, "$1")+ .replace(/,\s*(?:,\s*)+/g, ", ")+ .replace(/\b(?:and|or|with|in)\s*([,.;:])/gi, "$1")+ .replace(/,\s*(?:and|or)\s+(?=[,.;:]|$)/gi, "")+ .replace(/(^|[.;:]\s*),\s*/g, "$1")+ .replace(/\b(a|an|the)\s+(?=[,.;:]|$)/gi, "")+ .replace(/\b(a|an)\s+(?=(?:and|or)\b)/gi, "")+ .replace(/\ban (?=[^aeiou\s])/gi, (m) => (m[0] === "A" ? "A " : "a "))+ .replace(/\ba (?=[aeiou])/gi, (m) => (m[0] === "A" ? "An " : "an "))+ .replace(/,\s*([.;:])/g, "$1");+ }+ return t.replace(/\s{2,}/g, " ").trim();+}++/**+ * The scene without its colour words, for a monochrome look (the fallback when no LLM answers, and a last check on the+ * LLM's answer): hues and their shades, "-coloured" words, colour phrases and hex codes come out; tones (black, white,+ * grey, silver) and everything else stay. Hair keeps its shape ("auburn waves" → "waves"); gold jewellery stays metal.+ */+export function scrubColourWords(scene: string): string {+ let t = scene;+ for (const [re, to] of PHRASES) t = t.replace(re, to);+ t = t.replace(GOLD_MATERIAL, "metal").replace(FAIR_HAIR, "fair").replace(DARK_HAIR, "dark").replace(LIGHT_EYES, "light").replace(DARK_EYES, "dark");+ t = t.replace(COLOUR_LIST, "").replace(COLOURED, "").replace(HUE_WORDS, "");+ return tidy(t);+}++/** Whether words still name a colour a monochrome look would show. */+export const hasColourWords = (text: string): boolean => scrubColourWords(text) !== tidy(text);++// ---------------------------------------------------------------------------+// Applying a look++/** Negative terms joined without repeats (case-insensitive), in order. */+export function joinNegatives(...parts: (string | undefined | null)[]): string {+ const seen = new Set<string>();+ const out: string[] = [];+ for (const part of parts) {+ for (const raw of (part ?? "").split(",")) {+ const term = raw.trim();+ const key = term.toLowerCase();+ if (!term || seen.has(key)) continue;+ seen.add(key);+ out.push(term);+ }+ }+ return out.join(", ");+}++const sentence = (s: string) => {+ const t = s.trim().replace(/[.\s]+$/, "");+ return t ? `${t.charAt(0).toUpperCase()}${t.slice(1)}.` : "";+};++export interface AppliedFilmLook {+ /** What MOSS-Image reads: the recipe, the scene, the recipe again. */+ prompt: string;+ /** The person's negative (if any), the look's opposite, then MOSS-Image's base negative. */+ negative: string;+}++/**+ * A scene in a look: the sandwich and the negatives. `scene` is the person's words as the run sends them (after+ * Enhance), already without colour words for a monochrome look (scrubbed by the caller: the server asks an LLM first).+ */+export function applyFilmLook(look: FilmLook, scene: string, negative?: string | null): AppliedFilmLook {+ const recipe = sentence(look.recipe);+ const body = sentence(scene);+ return {+ prompt: [recipe, body, recipe].filter(Boolean).join(" "),+ negative: joinNegatives(negative, look.negative, MOSS_BASE_NEGATIVE),+ };+}diff --git a/src/server/assist/tools.ts b/src/server/assist/tools.tsindex fce5fd1e..9d0aff0a 100644--- a/src/server/assist/tools.ts+++ b/src/server/assist/tools.ts@@ -12,6 +12,8 @@ import { currentModelId } from "@/lib/catalog/replaced";import { fittedSettings } from "@/lib/catalog/fitted";import { opTakes } from "@/lib/catalog/route-takes";import { LAYOUT_PARAM, parseLayout } from "@/lib/layout-prompt";+import { FILM_LOOK_PARAM, FILM_LOOKS, filmLook, takesFilmLooks } from "@/lib/film-looks";+import { MOSS_RULES } from "../enhance";import { OPERATION_LABELS, type ChainSlot, type GenerationRequest, type MediaKind, type ModelDef, type Operation } from "@/lib/catalog/types";import { type PlannedJob, totalCost } from "@/lib/assist";import { STORYBOARD_MODELS } from "@/lib/catalog/storyboard";@@ -108,6 +110,11 @@ function summarize(m: ModelDef) {...(o.looks && { looks: "139 Soul looks: pass a look id as presetId (v1-general, v2-y2k-studio…), presetStrength 0–1 scales its LoRAs" }),// A model that places a layout's boxes (FLUX 3 Klein, MOSS-Image, Ideogram 4.x), and the weights' licence as information....(o.layout && { readsLayoutBoxes: o.layout }),+ // MOSS-Image: how it reads words, and its film looks (film_look), which Fuobe adds around the prompt at run time.+ ...(takesFilmLooks(m) && {+ promptRules: MOSS_RULES.join(" "),+ filmLooks: `film_look: one of ${FILM_LOOKS.map((l) => `${l.id} (${l.name})`).join(", ")}. Fuobe wraps the prompt in the look and adds its negative; write the scene only, with no film or camera look of your own (and no colours for a black-and-white one).`,+ }),...(m.licence && { licence: `${m.licence.licence}${m.licence.commercial === false ? " (non-commercial weights)" : m.licence.commercial === null ? " (revenue tiers decide commercial use)" : ""}` }),};}@@ -338,6 +345,10 @@ const Job = z.object({),negative_prompt: z.string().optional(),look: z.string().optional().describe("Fuobe Soul / Soul HD: the look's id from search_models (v1-general, v1-y2k, v2-y2k-studio…). Leave it out for Soul's default look."),+ film_look: z+ .string()+ .optional()+ .describe("MOSS-Image (oss-moss-image, moss-image), a picture from words: a film look id from search_models' filmLooks (night-halation, bw-grain, instant-classic…). Write the prompt as the scene only; Fuobe adds the look."),engine: z.enum(["open", "cloud"]).optional().describe("Fuobe Originals run on both engines: open = the user's GPU (free), cloud = hosted open weights (paid). Leave it out to follow the user's engine."),});type JobInput = z.infer<typeof Job>;@@ -392,6 +403,7 @@ export function asRequest(j: JobInput): GenerationRequest {const extra = {...(j.system && { system: j.system }),...(layout && { [LAYOUT_PARAM]: layout }),+ ...(filmLook(j.film_look) && { [FILM_LOOK_PARAM]: j.film_look }),// Hi3D: the refine's own resolution, or on an image-to-3D model the refine step after it....(j.mesh_resolution && { [j.model_id === HI3D_MODEL || j.op === HI3D_OP ? HI3D_PARAM : HI3D_CHAIN_PARAM]: j.mesh_resolution }),};diff --git a/src/server/enhance.ts b/src/server/enhance.tsindex f9dd07ad..747b73ed 100644--- a/src/server/enhance.ts+++ b/src/server/enhance.ts@@ -30,6 +30,31 @@ Rules:*/export interface EnhanceHints {ownStyle?: boolean;+ /**+ * The words are for MOSS-Image (MOSS_RULES). `filmLook`: a film look is picked, which Fuobe adds around the words after+ * the rewrite, so the rewrite names no look of its own; `mono` when that look is black and white (no colour words).+ */+ moss?: { filmLook?: boolean; mono?: boolean };+}++/**+ * How MOSS-Image reads a prompt (Fuobe's own tests of its film looks): plain prose; looks named by what shows, never by+ * a film or camera brand; the pose pinned down; an overlay said with what and where. MOSS runs at a low CFG, so the+ * negative field carries the opposite look, and the words name only what should be there.+ */+export const MOSS_RULES = [+ "MOSS-Image reads plain prose: whole sentences, no JSON, no tag lists.",+ "Describe a look by what it does to the picture (cool blue-teal shadows, warm orange highlights, fine grain, a soft red glow around lights, a dark vignette, a white border), never by a film stock or camera brand name: MOSS-Image ignores the names.",+ "Pin the subject down: where they stand or sit, where the hands and weight are, where they look.",+ "Say an overlay exactly: what it is and where in the frame (a faint city skyline across the left half, an orange light leak from the right edge).",+ "Name only what should be in the picture. What should not be there goes in the negative prompt.",+];++function mossRules(m: NonNullable<EnhanceHints["moss"]>): string {+ const rules = [...MOSS_RULES];+ if (m.filmLook) rules.push("A film look is added around these words afterwards: describe the scene, the people, the place and the light only. Name no film stock, camera, colour grade, grain or lens look.");+ if (m.mono) rules.push("The picture will be black and white: name no colours at all (hair and eyes as fair, dark or light), so none survive.");+ return `\n\nThe model is MOSS-Image:\n- ${rules.join("\n- ")}`;}function instruction(prompt: string, kind: MediaKind, op: Operation, hints: EnhanceHints = {}): string {@@ -44,7 +69,7 @@ function instruction(prompt: string, kind: MediaKind, op: Operation, hints: Enhaconst own = hints.ownStyle? "\n\nThe model applies its own visual style. Describe only the scene, the action, the camera and the sounds. Name no art style, lighting, lens or film look.": "";- return `Rewrite this as ${what}:\n\n${prompt}${own}`;+ return `Rewrite this as ${what}:\n\n${prompt}${own}${hints.moss ? mossRules(hints.moss) : ""}`;}/** A picture for a model that can see (Content Factory's reference frames): JPEG, PNG, GIF or WebP. */@@ -225,6 +250,8 @@ export function heuristicEnhance(prompt: string, kind: MediaKind, op: Operation,? `${p}. Cinematic shot, natural motion, smooth camera movement, realistic physics, soft volumetric light, shallow depth of field, rich detail, 24fps film look.`: `${p}. Natural, fluid motion that stays consistent with the first frame, smooth cinematic camera movement, stable identity and details.`;}+ // A film look goes around the words afterwards: the light and lens it brings would fight the look's own.+ if (hints.moss?.filmLook) return `${p}. Highly detailed, natural skin and material texture, thoughtful composition.`;return `${p}. Highly detailed, natural skin and material texture, cinematic lighting, thoughtful composition, shot on a full-frame camera with a 50mm lens, shallow depth of field.`;}diff --git a/src/server/film-look.ts b/src/server/film-look.tsnew file mode 100644index 00000000..202cdda0--- /dev/null+++ b/src/server/film-look.ts@@ -0,0 +1,49 @@+import "server-only";+import { applyFilmLook, filmLook, hasColourWords, scrubColourWords, type AppliedFilmLook } from "@/lib/film-looks";+import { llmText } from "./enhance";++/**+ * A MOSS-Image film look applied to a run's words just before it is sent (src/lib/film-looks.ts has the looks): the+ * sandwich and the negatives. A monochrome look first takes the colour words out of the scene: an LLM rewrites it (the+ * free helper's Enhance slot for an account or a visitor, the install's own AI helper otherwise), keeping everything+ * else; the word list cleans what it leaves, and is the whole pass when no LLM answers.+ */++const MONO_SYSTEM = `You prepare an image prompt for a black-and-white photograph. Rewrite the scene so that it names no colour at all.+Rules:+- Take out every colour word and colour phrase: hues, shades, tints, "-coloured" words, colourful, vibrant colours, colour palettes and hex codes.+- Hair and eyes keep their tone: fair or dark hair, light or dark eyes.+- Black, white and grey may stay. Gold or silver jewellery becomes metal jewellery.+- Keep everything else exactly as written: the people, their pose and where they look, the clothes and their materials, the place, the light, the framing and any quoted text.+- Describe only what is there. Never add words about colour or its absence, and never add a style or film look.+- Answer with the rewritten scene only: plain sentences, no quotes, no preamble.`;++/** Recent scrubs, so the jobs of one run (and a quick rerun) ask the LLM once. */+const MAX_CACHED = 50;+declare global {+ var __fuobeMonoScenes: Map<string, string> | undefined;+}++/** A scene without colour words: the LLM's rewrite, checked and cleaned by the word list, else the word list alone. */+export async function monoScene(scene: string, helper: { guestKey?: string; waitMs?: number } = {}): Promise<string> {+ const words = scene.trim();+ if (!words || !hasColourWords(words)) return words;+ const cache = (globalThis.__fuobeMonoScenes ??= new Map());+ const known = cache.get(words);+ if (known) return known;+ const fallback = scrubColourWords(words);+ const answer = await llmText(MONO_SYSTEM, words, { task: "enhance", waitMs: helper.waitMs ?? 20_000, guestKey: helper.guestKey }).catch(() => null);+ const rewritten = answer ? scrubColourWords(answer.trim().replace(/^["“]|["”]$/g, "")) : "";+ // An answer that lost much of the scene (or grew a new one) isn't trusted: the word list's version goes instead.+ const kept = rewritten && rewritten.length >= fallback.length * 0.6 && rewritten.length <= words.length * 1.4 ? rewritten : fallback;+ cache.set(words, kept);+ if (cache.size > MAX_CACHED) cache.delete(cache.keys().next().value!);+ return kept;+}++/** The run's words and negative in the picked look, or null for a look Fuobe doesn't have. */+export async function filmLookRun(id: string, scene: string, negative: string | undefined | null, helper: { guestKey?: string; waitMs?: number } = {}): Promise<AppliedFilmLook | null> {+ const look = filmLook(id);+ if (!look) return null;+ return applyFilmLook(look, look.mono ? await monoScene(scene, helper) : scene, negative);+}diff --git a/src/server/generations.ts b/src/server/generations.tsindex efded4b1..23b137bc 100644--- a/src/server/generations.ts+++ b/src/server/generations.ts@@ -78,6 +78,8 @@ import { createH3TwoKRun, createRegenerateRun, keepsH3Latent, regenHeld, regenSwimport { H3_2K_STEPS_NOTE, h3TwoKRequests, REGEN_COPY, REGEN_MODEL, regenerateGraphLoras, wantsH3TwoK } from "@/lib/catalog/regenerate";import { enhancePrompt, enhanceSoulWords, ideogramCaption } from "./enhance";import { kandinskyPrompt } from "@/lib/kandinsky-prompt";+import { filmLookRun } from "./film-look";+import { takesFilmLooks } from "@/lib/film-looks";import { carriesLayout } from "@/lib/layout-prompt";import { setResolver, watchGenerations, type LiveEvent } from "./live";import { provider, PROVIDERS, RETIRED_PROVIDER_ERROR } from "./providers";@@ -3592,7 +3594,11 @@ async function handOver(id: string, route: ModelRoute, providerId: ProviderId, p// Soul: only the user's words are expanded (60–120 words of subject, wardrobe, place, light); the look stays as it is.const longer = await enhanceSoulWords(words).catch(() => words);prompt = prompt.slice(0, at) + longer + prompt.slice(at + words.length);- } else prompt = await enhancePrompt(prompt, plan.model.kind, plan.op, { ownStyle: appliesOwnStyle(route) }).catch(() => prompt);+ } else {+ // MOSS-Image's own prompt rules; a picked film look goes around the words after, so the rewrite names none.+ const moss = takesFilmLooks(plan.model) ? { filmLook: !!plan.film, mono: !!plan.film?.mono } : undefined;+ prompt = await enhancePrompt(prompt, plan.model.kind, plan.op, { ownStyle: appliesOwnStyle(route), ...(moss && { moss }) }).catch(() => prompt);+ }update(id, { prompt });}// Ideogram 4 reads a JSON caption (src/lib/ideogram-caption.ts): one given as the prompt (a reused run) is kept, plain@@ -3635,13 +3641,25 @@ async function handOver(id: string, route: ModelRoute, providerId: ProviderId, p// Kandinsky 6.0 (both engines) reads spoken lines and the sound in tags of its own (src/lib/kandinsky-prompt.ts): quoted// words and a "Sound:" line become them for this run; the run keeps the words as typed, so Reuse shows them.if (plan.model.options.promptFormat === "kandinsky6" && prompt) prompt = kandinskyPrompt(prompt);+ // A MOSS-Image film look (src/server/film-look.ts): the look, the words (after any Enhance), the look again, and the+ // look's negative beside the run's. A monochrome look takes the colour words out of the scene first. Only this send+ // reads it: the run keeps the person's words as typed, and Reuse applies the look again.+ let negativePrompt = req.negativePrompt;+ if (plan.film && prompt) {+ if (plan.film.mono) update(id, { message: "Getting the words ready for the film look" });+ const look = await filmLookRun(plan.film.look, prompt, negativePrompt);+ if (look) {+ prompt = look.prompt;+ negativePrompt = look.negative;+ }+ }const input: GenInput = {...plan.params,// The clip's size is only ever its header's (below): a size the request states (params.sourceSize) prices the run// before it starts, never what an upscaler's factor is made from.sourceSize: undefined,prompt,- negativePrompt: req.negativePrompt,+ negativePrompt,images: (await Promise.all((req.inputs?.images ?? []).map((ref, i) => (i === 0 ? prepCropped(ref) : prep(ref))))).filter(Boolean) as string[],endImage: await prep(req.inputs?.endImage),mask: await prepMask(req.inputs?.mask),diff --git a/tests/assist-skills.test.ts b/tests/assist-skills.test.tsindex e6d6f9df..c6c835d1 100644--- a/tests/assist-skills.test.ts+++ b/tests/assist-skills.test.ts@@ -253,11 +253,11 @@ describe("context updates", () => {});describe("skills on the server", () => {- it("loads every built-in from skills/: 21, valid, unique, each with when-to-use and an icon", () => {+ it("loads every built-in from skills/: 22, valid, unique, each with when-to-use and an icon", () => {const list = skills.listSkills();const builtin = list.filter((s) => s.source === "builtin");- expect(builtin).toHaveLength(21);- expect(new Set(builtin.map((s) => s.name)).size).toBe(21);+ expect(builtin).toHaveLength(22);+ expect(new Set(builtin.map((s) => s.name)).size).toBe(22);for (const s of builtin) {expect(s.whenToUse, s.name).not.toBe("");expect(s.icon, s.name).toBeTruthy();diff --git a/tests/film-looks.test.ts b/tests/film-looks.test.tsnew file mode 100644index 00000000..5ea5b4e9--- /dev/null+++ b/tests/film-looks.test.ts@@ -0,0 +1,212 @@+import fs from "node:fs";+import { beforeAll, describe, expect, it, vi } from "vitest";+import { getModel, getPreset } from "@/lib/catalog";+import { buildPayload } from "@/lib/catalog/payload";+import { planGeneration } from "@/lib/catalog/plan";+import type { GenerationRequest, ModelRoute } from "@/lib/catalog/types";+import {+ applyFilmLook,+ FILM_LOOK_GROUPS,+ FILM_LOOKS,+ filmLook,+ filmLookGroups,+ filmLookThumb,+ hasColourWords,+ joinNegatives,+ MOSS_BASE_NEGATIVE,+ scrubColourWords,+ takesFilmLooks,+} from "@/lib/film-looks";+import { tempDir } from "./helpers/temp-dir";++// MOSS-Image's film looks (src/lib/film-looks.ts): the sandwich, the negatives, the colour scrub of a monochrome look, the+// plan that carries the look without sending it, and the run that applies it while the person's words stay as typed.+process.env.FUOBE_DATA_DIR = tempDir("fuobe-film-");+process.env.COMFYUI_URL = "http://127.0.0.1:9";++const llm = vi.hoisted(() => ({ answer: null as string | null, calls: [] as { system: string; user: string }[] }));+vi.mock("@/server/enhance", async (orig) => ({+ ...(await orig<typeof import("@/server/enhance")>()),+ llmText: async (system: string, user: string) => {+ llm.calls.push({ system, user });+ return llm.answer;+ },+}));++const SCENE = "A fashion model in her late twenties with long auburn waves and green eyes stands beside a tall arched window, wearing an emerald silk evening gown and gold drop earrings. Soft daylight falls across her face.";++describe("the looks", () => {+ it("are grouped in the picker's order, each with a unique id, a name, a blurb and its thumbnails", () => {+ expect(new Set(FILM_LOOKS.map((l) => l.id)).size).toBe(FILM_LOOKS.length);+ for (const l of FILM_LOOKS) {+ expect(FILM_LOOK_GROUPS, l.id).toContain(l.group);+ expect(l.name && l.blurb && l.recipe && l.negative, l.id).toBeTruthy();+ for (const w of [320, 640] as const) {+ const t = filmLookThumb(l.id, w);+ for (const file of [t.avif, t.webp]) expect(fs.existsSync(`public${file}`), file).toBe(true);+ }+ }+ const groups = filmLookGroups();+ expect(groups.map((g) => g.group)).toEqual(FILM_LOOK_GROUPS.filter((g) => FILM_LOOKS.some((l) => l.group === g)));+ expect(groups.flatMap((g) => g.looks)).toHaveLength(FILM_LOOKS.length);+ });++ it("say what shows, never a film or camera brand, and name nothing unwanted in the words MOSS-Image draws", () => {+ const brands = /\b(kodak|fuji(?:film)?|portra|velvia|ektar|ektachrome|kodachrome|cinestill|vision ?3|ilford|tri-?x|t-?max|hp5|polaroid|instax|holga|diana|lomo(?:graphy)?|lomochrome|leica|hasselblad|canon|nikon|agfa|instamatic|classic chrome)\b/i;+ const negated = /\b(no|not|without|never|none|free of|avoid)\b/i;+ for (const l of FILM_LOOKS) {+ expect(`${l.name} ${l.blurb} ${l.recipe}`, l.id).not.toMatch(brands);+ expect(l.recipe, l.id).not.toMatch(negated);+ }+ });++ it("is only MOSS-Image's, on both engines", () => {+ expect(["oss-moss-image", "moss-image"].map((id) => takesFilmLooks(getModel(id)))).toEqual([true, true]);+ expect(["oss-ideogram4", "nano-banana-pro", "oss-krea2-turbo"].map((id) => takesFilmLooks(getModel(id)))).toEqual([false, false, false]);+ expect(filmLook("night-halation")?.name).toBeTruthy();+ expect(filmLook("nope")).toBeUndefined();+ expect(filmLook(7)).toBeUndefined();+ });+});++describe("applying a look", () => {+ const look = FILM_LOOKS.find((l) => !l.mono)!;++ it("sandwiches the scene between the look said twice", () => {+ const a = applyFilmLook(look, "a model on a terrace in the afternoon sun.");+ const recipe = `${look.recipe.charAt(0).toUpperCase()}${look.recipe.slice(1)}.`;+ expect(a.prompt).toBe(`${recipe} A model on a terrace in the afternoon sun. ${recipe}`);+ expect(a.prompt.startsWith(recipe) && a.prompt.endsWith(recipe)).toBe(true);+ });++ it("puts the person's negative first, then the look's opposite, then MOSS-Image's base negative, without repeats", () => {+ const a = applyFilmLook(look, "a scene", "blurry, Watermark");+ expect(a.negative.startsWith("blurry, Watermark, ")).toBe(true);+ expect(a.negative).toContain(look.negative.split(",")[0].trim());+ expect(a.negative.endsWith("nsfw, worst quality, bad anatomy, jpeg artifact")).toBe(true);+ expect(a.negative.match(/watermark/gi)).toHaveLength(1);+ expect(applyFilmLook(look, "a scene").negative).toBe(joinNegatives(look.negative, MOSS_BASE_NEGATIVE));+ });++ it("gives a monochrome look's negative the colours, and its words none", () => {+ const mono = FILM_LOOKS.filter((l) => l.mono);+ expect(mono.length).toBeGreaterThan(0);+ for (const l of mono) {+ expect(l.negative, l.id).toMatch(/\bcolou?r/i);+ expect(applyFilmLook(l, scrubColourWords(SCENE)).prompt, l.id).not.toMatch(/auburn|green|emerald|\bgold\b/i);+ }+ });+});++describe("taking the colour words out", () => {+ it("removes hues, shades and -coloured words, keeps tones, and keeps hair, eyes and jewellery as tones and metal", () => {+ expect(scrubColourWords(SCENE)).toBe(+ "A fashion model in her late twenties with long dark waves and light eyes stands beside a tall arched window, wearing a silk evening gown and metal drop earrings. Soft daylight falls across her face.",+ );+ expect(scrubColourWords("An open-collar cream linen shirt, tailored sand-coloured trousers and brown suede loafers. Behind him, a deep blue sea, terracotta rooftops and a pale sky."))+ .toBe("An open-collar linen shirt, tailored trousers and suede loafers. Behind him, a sea, rooftops and a pale sky.");+ expect(scrubColourWords("A black turtleneck, a white wall and grey stone in golden hour light, in vivid colours.")).toBe("A black turtleneck, a white wall and grey stone in low late-day sun.");+ expect(scrubColourWords("A refined campaign in sand, sage, ivory and gold.")).toBe("A refined campaign.");+ expect(scrubColourWords("She wears an orange dress, a #FF8800 scarf and holds an orange.")).toBe("She wears a dress, a scarf and holds an orange.");+ });++ it("leaves things that only share a colour's name", () => {+ const things = "A camel walks across the sand holding a glass of champagne and a sprig of sage.";+ expect(scrubColourWords(things)).toBe(things);+ expect(hasColourWords(things)).toBe(false);+ expect(hasColourWords(SCENE)).toBe(true);+ });+});++describe("the plan", () => {+ const plan = (modelId: string, extra: Record<string, unknown>, prompt = "a model on a terrace") =>+ planGeneration({ feature: "image", modelId, op: "t2i", prompt, params: { aspectRatio: "3:4", extra } } as GenerationRequest, getModel, getPreset);++ it("carries the look on MOSS-Image without sending it, and keeps the person's words", () => {+ const p = plan("oss-moss-image", { filmLook: "bw-grain", quality: "standard" });+ expect(p.film).toEqual({ look: "bw-grain", mono: true });+ expect(p.prompt).toBe("a model on a terrace");+ expect(p.params.extra).not.toHaveProperty("filmLook");+ expect(p.params.extra).toMatchObject({ steps: 25, cfg: 2.5, sampler: "er_sde" });+ expect(plan("oss-moss-image", { filmLook: "night-halation" }).film).toEqual({ look: "night-halation", mono: false });+ });++ it("turns fal's own prompt expansion off for a look in the cloud, so the look's words reach MOSS-Image as written", () => {+ const p = plan("moss-image", { filmLook: "night-halation" });+ const route = getModel("moss-image")!.routes[0] as ModelRoute & { map: NonNullable<ModelRoute["map"]> };+ const out = buildPayload(route.map, { prompt: p.prompt, ...p.params });+ expect(out.enable_prompt_expansion).toBe(false);+ expect(out).not.toHaveProperty("filmLook");+ expect(out).not.toHaveProperty("promptHelper");+ });++ it("runs another model, or a layout, without the look and says so", () => {+ const other = plan("oss-krea2-turbo", { filmLook: "night-halation" });+ expect(other.film).toBeUndefined();+ expect(other.params.extra ?? {}).not.toHaveProperty("filmLook");+ expect(other.notes?.join(" ")).toMatch(/MOSS-Image film look/);+ const layout = { summary: { caption: "A poster", meta: [], canvas: "single" }, items: [{ label: "text", caption: "Bold", text: "SALE", box: [0.1, 0.1, 0.9, 0.3] }] };+ const laid = plan("oss-moss-image", { filmLook: "night-halation", layout }, "A poster");+ expect(laid.film).toBeUndefined();+ expect(laid.notes?.join(" ")).toMatch(/layout runs without the film look/);+ // An id Fuobe doesn't have is dropped quietly.+ expect(plan("oss-moss-image", { filmLook: "nope" }).film).toBeUndefined();+ });+});++describe("the run", () => {+ let sent: { prompt?: string; negativePrompt?: string }[] = [];+ beforeAll(async () => {+ const { setSetting } = await import("@/server/settings");+ setSetting("demoMode", "auto");+ const { PROVIDERS } = await import("@/server/providers");+ const submit = PROVIDERS.mock.submit.bind(PROVIDERS.mock);+ vi.spyOn(PROVIDERS.mock, "submit").mockImplementation(async (a) => {+ sent.push({ prompt: a.input.prompt, negativePrompt: a.input.negativePrompt });+ return submit(a);+ });+ });++ const run = async (req: Partial<GenerationRequest>) => {+ sent = [];+ const { createGenerations, getGeneration } = await import("@/server/generations");+ const [g] = createGenerations({ feature: "image", modelId: "moss-image", ...req } as GenerationRequest);+ await vi.waitFor(() => expect(getGeneration(g.id)?.status).not.toBe("queued"), { timeout: 5000 });+ return getGeneration(g.id)!;+ };++ it("sends the sandwich and the negatives, and keeps the person's prompt as typed", async () => {+ const look = filmLook("night-halation")!;+ const done = await run({ prompt: "a model on a wet street at night", negativePrompt: "blurry", params: { aspectRatio: "3:4", extra: { filmLook: look.id } } });+ expect(sent).toHaveLength(1);+ expect(sent[0].prompt).toBe(applyFilmLook(look, "a model on a wet street at night").prompt);+ expect(sent[0].negativePrompt).toBe(joinNegatives("blurry", look.negative, MOSS_BASE_NEGATIVE));+ expect(done.prompt).toBe("a model on a wet street at night");+ expect(done.request.params?.extra?.filmLook).toBe(look.id);+ });++ it("takes the colour words out for a monochrome look: the LLM's rewrite, cleaned; the word list when it gives none", async () => {+ const look = FILM_LOOKS.find((l) => l.mono)!;+ llm.answer = "A fashion model in her late twenties with long dark waves and light eyes stands beside a tall arched window, wearing a silk evening gown with a deep blue sash and metal drop earrings. Soft daylight falls across her face.";+ llm.calls = [];+ await run({ prompt: SCENE, params: { aspectRatio: "3:4", extra: { filmLook: look.id } } });+ expect(llm.calls).toHaveLength(1);+ expect(llm.calls[0].user).toBe(SCENE);+ // The LLM's leftover colour ("deep blue") is cleaned by the word list.+ expect(sent[0].prompt).toContain("wearing a silk evening gown with a sash and metal drop earrings");+ expect(sent[0].prompt).not.toMatch(/blue|auburn|emerald/);++ llm.answer = null;+ const other = `${SCENE} A red rose lies on the sill.`;+ await run({ prompt: other, params: { aspectRatio: "3:4", extra: { filmLook: look.id } } });+ expect(sent[0].prompt).toBe(applyFilmLook(look, scrubColourWords(other)).prompt);+ });++ it("leaves a scene with no colour words as it is, without asking the LLM", async () => {+ const look = FILM_LOOKS.find((l) => l.mono)!;+ llm.calls = [];+ await run({ prompt: "a model in a black coat on a grey street", params: { aspectRatio: "3:4", extra: { filmLook: look.id } } });+ expect(llm.calls).toEqual([]);+ expect(sent[0].prompt).toBe(applyFilmLook(look, "a model in a black coat on a grey street").prompt);+ });+});diff --git a/tests/skills-spec.test.ts b/tests/skills-spec.test.tsindex 0680cb0f..60a20c02 100644--- a/tests/skills-spec.test.ts+++ b/tests/skills-spec.test.ts@@ -59,8 +59,8 @@ function frontmatter(text: string) {}describe("skills follow the Agent Skills spec", () => {- it("finds the 21 built-in skills and the agent skill", () => {- expect(skillFiles).toHaveLength(22);+ it("finds the 22 built-in skills and the agent skill", () => {+ expect(skillFiles).toHaveLength(23);});for (const file of skillFiles) {