Skip to content

armgit / fuobe

Public Imported from GitHub
0

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

Any Angle: shoot a photo again from a new camera angle

Adarsh824fa98c32ae
diff --git a/CREDITS.md b/CREDITS.md
index bcd7cc46..60f0aa1d 100644
--- a/CREDITS.md
+++ b/CREDITS.md
@@ -13,7 +13,7 @@ Some licences ask the app that runs their model to say so.
- **MiniMax H3**: Fuobe Character swap, MiniMax H3, Open-H3 Regenerate, H3 Character Swap · Relay 2.0, H3 Person Removal · Relay 2.0, H3 Character Swap · studio segment, MiniMax H3 Text to Video + Audio (20 steps), MiniMax H3 Image to Video + Audio (20 steps), MiniMax H3 Start + End Frame to Video + Audio (20 steps), MiniMax H3 360-degree orbit of a still + Audio (Orbit LoRA, 28 steps)
- **Built with Llama**: HiDream-I1 Dev
- **Keep the licence text and NVIDIA's notices when you share the weights**: RE-USE (clean up voice), Clean the dialogue of a soundtrack and keep its music and effects (DBS + NVIDIA RE-USE)
-- **Built with DINOv3**: Pixal3D, TRELLIS.2, TRELLIS.2 Multi-view, Qwen-Image 2.1 → TRELLIS.2, TripoSplat
+- **Built with DINOv3**: Pixal3D, TRELLIS.2, TRELLIS.2 Multi-view, Qwen-Image 2.1 → TRELLIS.2, TripoSplat, Any Angle 3D view
## Attributions
@@ -25,7 +25,7 @@ Some licences ask the app that runs their model to say so.
## Open model licences
-158 models, one row for each set of open weights Fuobe runs: 89 allow commercial use, 32 with conditions, 23 are non-commercial and 14 aren't available everywhere.
+160 models, one row for each set of open weights Fuobe runs: 89 allow commercial use, 33 with conditions, 24 are non-commercial and 14 aren't available everywhere.
| Model | By | Kind | Licence | Note |
| --- | --- | --- | --- | --- |
@@ -164,6 +164,8 @@ Some licences ask the app that runs their model to say so.
| TRELLIS.2 Multi-view | Tencent ARC × Microsoft | 3D | [MIT (Pixal3D multi-view weights by TencentARC, TRELLIS.2 VAEs as repackaged by Comfy-Org, BiRefNet, microsoft/MoGe 2); the dino_v3_L_naf image encoder is DINOv3 ViT-L under the DINOv3 License (royalty-free, commercial use allowed; the app must show a "Built with DINOv3" notice)](https://huggingface.co/Comfy-Org/Pixal3D) | Conditions apply |
| Qwen-Image 2.1 → TRELLIS.2 | Alibaba Qwen × Microsoft | 3D | [MIT (TRELLIS.2 weights, DINOv3-NAF / TRELLIS VAEs as repackaged by Comfy-Org, BiRefNet); the dino_v3_L_naf image encoder is DINOv3 ViT-L under the DINOv3 License (royalty-free, commercial use allowed; the app must show a "Built with DINOv3" notice)](https://huggingface.co/Comfy-Org/TRELLIS.2) | Conditions apply |
| TripoSplat | Tripo (VAST) | 3D | [MIT (VAST-AI/TripoSplat weights); the dino_v3_vit_h image encoder is under the DINOv3 License (royalty-free, commercial use allowed, trade-control limits; the app must show a "Built with DINOv3" notice); FLUX.2 VAE Apache-2.0; BiRefNet MIT](https://huggingface.co/VAST-AI/TripoSplat) | Conditions apply |
+| Any Angle 3D view | Tripo (VAST) | 3D | [MIT (VAST-AI/TripoSplat weights); the dino_v3_vit_h image encoder is under the DINOv3 License (royalty-free, commercial use allowed, trade-control limits; the app must show a "Built with DINOv3" notice); FLUX.2 VAE Apache-2.0; BiRefNet MIT](https://huggingface.co/VAST-AI/TripoSplat) | Conditions apply |
+| Any Angle | Qwen (Alibaba) · lilylilith | Image | [Qwen Research License Agreement (Qwen-Image 2.1, Qwen3-VL 8B encoder, VAE): NON-COMMERCIAL, research and evaluation only; the AnyAngle LoRA (lilylilith/QI_2.1_AnyAngle) Apache-2.0](https://huggingface.co/Qwen/Qwen-Image-2.1/blob/main/LICENSE) | Non-commercial |
| MoGe 2 scene | Microsoft | 3D | [MIT (microsoft/MoGe 2 and 3, Comfy-Org/MoGe repack)](https://spdx.org/licenses/MIT.html) | |
| Wan 2.1 + Uni3C path | Alibaba (Wan, DAMO Uni3C) | Video | [Apache-2.0 (Wan 2.1 I2V 14B; Uni3C, alibaba-damo-academy/Uni3C — Kijai's repack repo carries no licence field)](https://spdx.org/licenses/Apache-2.0.html) | |
| FLUX.2 [klein] Try-On | Black Forest Labs × xocialize | Image | [Apache-2.0 (FLUX.2 [klein] 4B, try-on LoRA by xocialize); segformer_b2_clothes MIT; ComfyUI-RMBG code GPL-3.0](https://spdx.org/licenses/Apache-2.0.html) | |
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index c51a5c8a..e8aea96c 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -96,6 +96,7 @@ Feed, Library, studios (React Query caches patched by id; polls every 10 s while
| `clip-windows.ts` | Round 5 part 1 (fixes-5). The clip lengths each clip-edit model takes (`sourceSeconds`, `clipWindowProblem`: Happy Horse and Kling O3 4K edit 3–15 s, Runway Aleph 2 2–30 s, Wan 2.7 2–10 s, Gemini Omni Flash up to 10 s), shared by pricing, the composer, the server, Shorts and Mixed Media. Since the 2026-11-01 fix, `SOURCE_FRAMES`: the cloud's Wan 2.2 Fun VACE depth Originals (Fuobe Shorts, Evolution, Genjutsu Restyle) sent a clip whole take 17–241 frames and are billed on frames ÷ 16 (`billedClipSeconds`, from `params.sourceFps` or the header; 30 fps when unknown), on the cloud only. Grok Imagine video edit, which fal cuts to 8 s, has no window yet, so a longer clip isn't blocked and is priced in full |
| `mixed-media-looks.ts` | Round 5 part 1 (O9). `mixedLoras`: a Mixed Media look's Z-Image LoRAs from `MIXED_MEDIA_LOOK_LORAS` |
| `turnaround.ts` | Round 5 part 2 (N7-6). Turnaround video, pure (see Studios): the sides in the order the camera passes them and their angles (`TURN_SIDES`, `viewAzimuth`: front 0°, the person's own right side 90°, back 180°, left side 270°; `pathAzimuth` in the camera-path library's terms; `TURN_FRAMES` at 0, ¼, ½, ¾ and the end; `worldcastAnchor`, the one conversion WorldCast will use), the routes (`TURN_ROUTES`: `frames` on the GPU; `references`, `keyframes` and `camera` in the cloud; `defaultRoute`, `turnDuration`), what draws a missing side (`FILL_MODELS`: the Angles app's `qwen-multiple-angles` in the cloud, `oss-qwen-edit` with `ANGLES_2511_LORA` on the GPU; `ANGLES_SIDE_SIGN`, a guess until a real run) or a front from a sheet (`SHEET_FRONT_MODELS`), the words (`cameraWords`, `referencesPrompt`, `ORBIT_PROMPT`), the pictures a sheet or a character gives (`sheetPictures`, `elementPictures`, `startingViews`) and `planTurnaround` |
+| `any-angle.ts` | Any Angle (`app-any-angle`), pure: the presets (turns up to 60° each way, from above, from below, a close-up, a view from behind for people only), the camera each makes from a photo's measured front view (`cameraFor`, `customCamera`, `clampCustom`; a portrait's high angle stays at 35°), the desktop 3D view's camera (`orbitOf`, `fromOrbit`), the render size and the shot graph's settings (`renderSize`, `shotExtra`), the built view (`viewOf`), the contact sheet's layout (`sheetLayout`) and the mapping of Fuobe Angles' and Angles' controls for a later switch. The front view is measured on the build's turntable by `src/lib/any-angle-front.ts` (silhouette overlap and colour correlation against the photo's cut-out), on the server when the build succeeds (`src/server/any-angle.ts`, which also finds a photo's view again by its sha256 for the same owner or account) |
A **model** has one **route** per (operation, provider). A route's `FieldMap` translates Fuobe's canonical input (`prompt`, `images`, `image2`, `endImage`, `video`, `videos`, `audio`, `audios`, `aspectRatio`, `duration`, `voice`, `voiceAudio`, `dialogue`, `shots`, `draft`, `startTime` / `endTime`, `fps`, `palette`, `styleId`, `numLayers`, `sourceLanguage`, `targetLanguage`…) to the provider's field names. Dotted keys (`voice_settings.stability`) are written as nested objects; `setPath` ignores `__proto__`, `constructor` and `prototype`. `defaults` are sent unless the request sets them (applied before the canonical fields), `fixed` always wins (applied after). `sourceLanguage` may be `{key, values}`, matched to the API's list. `palette {key, format, background}` converts hex colours to each API's shape (Recraft on fal's `{r,g,b}` objects, Ideogram members with falling weights, plain lists; an `rgb`-array format is still supported, unused since Higgsfield's Recraft route went). `tracks` and `timeline` build fal FFmpeg compose timelines. Masks are converted to each API's convention (white = change, black = change, or alpha) by a small PNG codec (`src/server/png.ts`).
diff --git a/docs/research/fuobe-originals-recipes-5.json b/docs/research/fuobe-originals-recipes-5.json
index 82f78480..6259745a 100644
--- a/docs/research/fuobe-originals-recipes-5.json
+++ b/docs/research/fuobe-originals-recipes-5.json
@@ -24457,6 +24457,28 @@
"hostedEndpoint": "fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles",
"notes": "The camera-move LoRA behind Higgsfield Angles (higgsfield-originals-5.md §3.22). Its file is named 镜头转换.safetensors upstream; Fuobe keeps it under an ASCII name. It takes camera instructions in Chinese with English (rotate left / right by degrees, move forward or a close-up, bird's-eye or worm's-eye view, a wide-angle lens), which Fuobe Angles writes from its controls on the GPU. fal hosts the same LoRA (its LoRA gallery's multiple-angles route, lora_scale 1.25 and 6 steps by default) and builds the words itself. Strength 1.25, as fal and the public HF Space (linoyts/Qwen-Image-Edit-Angles) fuse it."
},
+ {
+ "key": "qwen-image-21-any-angle",
+ "name": "AnyAngle for Qwen-Image 2.1 (lilylilith)",
+ "url": "https://huggingface.co/lilylilith/QI_2.1_AnyAngle/resolve/main/QI2.1_AnyAngle.safetensors",
+ "page": "https://huggingface.co/lilylilith/QI_2.1_AnyAngle",
+ "file": "QI2.1_AnyAngle.safetensors",
+ "strength": 1.0,
+ "base": "qwen-image-2.1",
+ "licence": "Apache-2.0",
+ "commercial": true,
+ "hostedOk": true,
+ "download": "direct",
+ "released": "2026-09-28",
+ "revision": "5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae",
+ "sha256": "e4d7a0d44a45ed62daabd0f2484a1a59046618a4c47e76b1eab5e386a7a35d8a",
+ "sizeBytes": 119590312,
+ "checked": "2026-11-02",
+ "usedBy": [
+ "oss-any-angle"
+ ],
+ "notes": "Any Angle's repaint: a rough render of a 3D view of the photo (image 2) becomes a finished photo at that camera, with the face, outfit, light and room of the original (image 1). Rank 24, bf16, ComfyUI keys (core LoraLoaderModelOnly, no conversion). Its own prompt, at strength 1: \"Change the camera angle from <image2> to <image1>.\" The any-angle-shot graph loads it itself; as a recipe LoRA it is downloaded and hash-checked before a run. Not hosted with Qwen-Image 2.1 anywhere Fuobe calls, so Any Angle runs on a GPU only."
+ },
{
"key": "fusionix-i2v-14b",
"name": "FusioniX for Wan 2.1 I2V 14B (vrgamedevgirl84)",
diff --git a/public/previews/presets/app-any-angle.jpg b/public/previews/presets/app-any-angle.jpg
new file mode 100644
index 00000000..f6254ac3
Binary files /dev/null and b/public/previews/presets/app-any-angle.jpg differ
diff --git a/public/previews/presets/app-any-angle.mp4 b/public/previews/presets/app-any-angle.mp4
new file mode 100644
index 00000000..1997b72d
Binary files /dev/null and b/public/previews/presets/app-any-angle.mp4 differ
diff --git a/public/previews/presets/thumbs/app-any-angle.jpg b/public/previews/presets/thumbs/app-any-angle.jpg
new file mode 100644
index 00000000..9921ce20
Binary files /dev/null and b/public/previews/presets/thumbs/app-any-angle.jpg differ
diff --git a/scripts/comfy/build-library.mjs b/scripts/comfy/build-library.mjs
index bfd6f66a..4b1482c3 100644
--- a/scripts/comfy/build-library.mjs
+++ b/scripts/comfy/build-library.mjs
@@ -161,6 +161,8 @@ export const BINDING_KEYS = new Set([
'reuseModel', 'rate', 'roomToneDb', 'level', 'bedDb',
// Blockout to film: a near = dark depth pass (Blender's mist) inverted before VACE reads it
'invertDepth',
+ // Any Angle: the 3D view's file and each angle's camera
+ 'splatFile', 'cameraYaw', 'cameraPitch', 'cameraDistance', 'cameraFov', 'targetX', 'targetY', 'targetZ',
]);
// Sizes in GB: two decimals, and three where two would read 0 (a 4 MB DBS model), so no other entry's size changes.
diff --git a/scripts/comfy/hand-built/any-angle-3d.json b/scripts/comfy/hand-built/any-angle-3d.json
new file mode 100644
index 00000000..7581f372
--- /dev/null
+++ b/scripts/comfy/hand-built/any-angle-3d.json
@@ -0,0 +1,392 @@
+{
+ "1": {
+ "inputs": {
+ "image": "subject.png"
+ },
+ "class_type": "LoadImage",
+ "_meta": {
+ "title": "Photo"
+ }
+ },
+ "2": {
+ "inputs": {
+ "bg_removal_name": "birefnet.safetensors"
+ },
+ "class_type": "LoadBackgroundRemovalModel",
+ "_meta": {
+ "title": "Load Background Removal Model"
+ }
+ },
+ "3": {
+ "inputs": {
+ "bg_removal_model": [
+ "2",
+ 0
+ ],
+ "image": [
+ "1",
+ 0
+ ]
+ },
+ "class_type": "RemoveBackground",
+ "_meta": {
+ "title": "Remove Background"
+ }
+ },
+ "6": {
+ "inputs": {
+ "erode_radius": 1,
+ "size": 1024,
+ "image": [
+ "1",
+ 0
+ ],
+ "mask": [
+ "3",
+ 0
+ ]
+ },
+ "class_type": "TripoSplatPreprocessImage",
+ "_meta": {
+ "title": "TripoSplat Preprocess Image"
+ }
+ },
+ "7": {
+ "inputs": {
+ "clip_name": "dino_v3_vit_h.safetensors"
+ },
+ "class_type": "CLIPVisionLoader",
+ "_meta": {
+ "title": "Load CLIP Vision"
+ }
+ },
+ "8": {
+ "inputs": {
+ "vae_name": "flux2-vae.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "9": {
+ "inputs": {
+ "vae_name": "triposplat_vae_decoder_fp16.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "10": {
+ "inputs": {
+ "unet_name": "triposplat_fp16.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "11": {
+ "inputs": {
+ "clip_vision": [
+ "7",
+ 0
+ ],
+ "vae": [
+ "8",
+ 0
+ ],
+ "image": [
+ "6",
+ 0
+ ]
+ },
+ "class_type": "TripoSplatConditioning",
+ "_meta": {
+ "title": "TripoSplat Conditioning"
+ }
+ },
+ "12": {
+ "inputs": {
+ "seed": 46,
+ "steps": 20,
+ "cfg": 3,
+ "sampler_name": "dpmpp_2m",
+ "scheduler": "simple",
+ "denoise": 1,
+ "model": [
+ "10",
+ 0
+ ],
+ "positive": [
+ "11",
+ 0
+ ],
+ "negative": [
+ "11",
+ 1
+ ],
+ "latent_image": [
+ "11",
+ 2
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "13": {
+ "inputs": {
+ "num_gaussians": 262144,
+ "seed": 46,
+ "samples": [
+ "12",
+ 0
+ ],
+ "vae": [
+ "9",
+ 0
+ ]
+ },
+ "class_type": "VAEDecodeTripoSplat",
+ "_meta": {
+ "title": "TripoSplat Decode"
+ }
+ },
+ "15": {
+ "inputs": {
+ "format": "spz",
+ "splat": [
+ "13",
+ 0
+ ]
+ },
+ "class_type": "SplatToFile3D",
+ "_meta": {
+ "title": "Create 3D File (from Splat)"
+ }
+ },
+ "16": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "mesh": [
+ "15",
+ 0
+ ]
+ },
+ "class_type": "SaveGLB",
+ "_meta": {
+ "title": "Save the 3D view (.spz)"
+ }
+ },
+ "20": {
+ "inputs": {
+ "mask": [
+ "3",
+ 0
+ ]
+ },
+ "class_type": "MaskToImage",
+ "_meta": {
+ "title": "Cut-out as a picture"
+ }
+ },
+ "21": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "images": [
+ "20",
+ 0
+ ]
+ },
+ "class_type": "SaveImage",
+ "_meta": {
+ "title": "Save the cut-out"
+ }
+ },
+ "80": {
+ "inputs": {
+ "mode": "orbit",
+ "mode.yaw": 0,
+ "mode.pitch": 10,
+ "mode.distance": 2,
+ "target_x": 0,
+ "target_y": 0,
+ "target_z": 0,
+ "roll": 0,
+ "fov": 33,
+ "zoom": 1,
+ "camera_type": "perspective"
+ },
+ "class_type": "CreateCameraInfo",
+ "_meta": {
+ "title": "Create Camera Info"
+ }
+ },
+ "81": {
+ "inputs": {
+ "width": 512,
+ "height": 512,
+ "frames": 48,
+ "splat_scale": 1,
+ "sharpen": 2,
+ "headlight_shading": 0,
+ "opacity_threshold": 0,
+ "render_style": "color",
+ "background": "#101010",
+ "splat": [
+ "13",
+ 0
+ ],
+ "camera_info": [
+ "80",
+ 0
+ ]
+ },
+ "class_type": "RenderSplat",
+ "_meta": {
+ "title": "Render Splat"
+ }
+ },
+ "82": {
+ "inputs": {
+ "fps": 12,
+ "images": [
+ "81",
+ 0
+ ]
+ },
+ "class_type": "CreateVideo",
+ "_meta": {
+ "title": "Create Video"
+ }
+ },
+ "83": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "format": "auto",
+ "format.codec": "auto",
+ "video": [
+ "82",
+ 0
+ ]
+ },
+ "class_type": "SaveVideo",
+ "_meta": {
+ "title": "Save the turntable"
+ }
+ },
+ "84": {
+ "inputs": {
+ "upscale_method": "area",
+ "width": 192,
+ "height": 192,
+ "crop": "disabled",
+ "image": [
+ "81",
+ 0
+ ]
+ },
+ "class_type": "ImageScale",
+ "_meta": {
+ "title": "Turntable at 192 px"
+ }
+ },
+ "85": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "fps": 12,
+ "lossless": true,
+ "quality": 100,
+ "method": "default",
+ "images": [
+ "84",
+ 0
+ ]
+ },
+ "class_type": "SaveAnimatedWEBP",
+ "_meta": {
+ "title": "Save the sweep"
+ }
+ },
+ "86": {
+ "inputs": {
+ "mask": [
+ "81",
+ 1
+ ]
+ },
+ "class_type": "MaskToImage",
+ "_meta": {
+ "title": "Turntable coverage"
+ }
+ },
+ "87": {
+ "inputs": {
+ "upscale_method": "area",
+ "width": 192,
+ "height": 192,
+ "crop": "disabled",
+ "image": [
+ "86",
+ 0
+ ]
+ },
+ "class_type": "ImageScale",
+ "_meta": {
+ "title": "Coverage at 192 px"
+ }
+ },
+ "88": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "fps": 12,
+ "lossless": true,
+ "quality": 100,
+ "method": "default",
+ "images": [
+ "87",
+ 0
+ ]
+ },
+ "class_type": "SaveAnimatedWEBP",
+ "_meta": {
+ "title": "Save the sweep's coverage"
+ }
+ },
+ "90": {
+ "inputs": {
+ "resolution": 256,
+ "kernel": 5,
+ "smooth": 0,
+ "level": 0.4,
+ "min_component": 500,
+ "min_opacity": 0.02,
+ "color_sharpen": 2,
+ "splat": [
+ "13",
+ 0
+ ]
+ },
+ "class_type": "SplatToMesh",
+ "_meta": {
+ "title": "Splat to Mesh"
+ }
+ },
+ "91": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "mesh": [
+ "90",
+ 0
+ ]
+ },
+ "class_type": "SaveGLB",
+ "_meta": {
+ "title": "Save the 3D model (.glb)"
+ }
+ }
+}
diff --git a/scripts/comfy/hand-built/any-angle-shot.json b/scripts/comfy/hand-built/any-angle-shot.json
new file mode 100644
index 00000000..8209d35b
--- /dev/null
+++ b/scripts/comfy/hand-built/any-angle-shot.json
@@ -0,0 +1,229 @@
+{
+ "1": {
+ "inputs": {
+ "image": "subject.png"
+ },
+ "class_type": "LoadImage",
+ "_meta": {
+ "title": "Photo (image 1)"
+ }
+ },
+ "2": {
+ "inputs": {
+ "model_file": "3d/fuobe_splat.spz",
+ "image": {
+ "image": "subject.png",
+ "mask": "subject.png",
+ "normal": "subject.png",
+ "recording": "",
+ "camera_info": null
+ },
+ "width": 1024,
+ "height": 1024
+ },
+ "class_type": "Load3D",
+ "_meta": {
+ "title": "Load the 3D view"
+ }
+ },
+ "13": {
+ "inputs": {
+ "model_3d": [
+ "2",
+ 6
+ ]
+ },
+ "class_type": "File3DToSplat",
+ "_meta": {
+ "title": "Get Splat"
+ }
+ },
+ "20": {
+ "inputs": {
+ "mode": "orbit",
+ "mode.yaw": 125,
+ "mode.pitch": 10,
+ "mode.distance": 1.83,
+ "target_x": 0,
+ "target_y": 0,
+ "target_z": 0,
+ "roll": 0,
+ "fov": 33,
+ "zoom": 1,
+ "camera_type": "perspective"
+ },
+ "class_type": "CreateCameraInfo",
+ "_meta": {
+ "title": "Create Camera Info"
+ }
+ },
+ "30": {
+ "inputs": {
+ "width": 1536,
+ "height": 1152,
+ "frames": 0,
+ "splat_scale": 1,
+ "sharpen": 2,
+ "headlight_shading": 0,
+ "opacity_threshold": 0,
+ "render_style": "color",
+ "background": "#000000",
+ "splat": [
+ "13",
+ 0
+ ],
+ "camera_info": [
+ "20",
+ 0
+ ]
+ },
+ "class_type": "RenderSplat",
+ "_meta": {
+ "title": "Render Splat"
+ }
+ },
+ "50": {
+ "inputs": {
+ "unet_name": "qwen_image_2.1_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "51": {
+ "inputs": {
+ "lora_name": "QI2.1_AnyAngle.safetensors",
+ "strength_model": 1,
+ "model": [
+ "50",
+ 0
+ ]
+ },
+ "class_type": "LoraLoaderModelOnly",
+ "_meta": {
+ "title": "AnyAngle LoRA"
+ }
+ },
+ "52": {
+ "inputs": {
+ "device": "auto",
+ "dtype": "default",
+ "model": [
+ "51",
+ 0
+ ]
+ },
+ "class_type": "QwenImage21Cache",
+ "_meta": {
+ "title": "Qwen-Image 2.1 Cache"
+ }
+ },
+ "53": {
+ "inputs": {
+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",
+ "type": "qwen_image",
+ "device": "default"
+ },
+ "class_type": "CLIPLoader",
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ },
+ "54": {
+ "inputs": {
+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "55": {
+ "inputs": {
+ "prompt": "Change the camera angle from <image2> to <image1>.",
+ "negative_prompt": "",
+ "resolution": 1024,
+ "clip": [
+ "53",
+ 0
+ ],
+ "vae": [
+ "54",
+ 0
+ ],
+ "images.image_1": [
+ "1",
+ 0
+ ],
+ "images.image_2": [
+ "30",
+ 0
+ ]
+ },
+ "class_type": "TextEncodeQwenImage21",
+ "_meta": {
+ "title": "Text Encode (Qwen-Image 2.1)"
+ }
+ },
+ "56": {
+ "inputs": {
+ "seed": 46,
+ "steps": 25,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1,
+ "model": [
+ "52",
+ 0
+ ],
+ "positive": [
+ "55",
+ 0
+ ],
+ "negative": [
+ "55",
+ 1
+ ],
+ "latent_image": [
+ "55",
+ 2
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "57": {
+ "inputs": {
+ "samples": [
+ "56",
+ 0
+ ],
+ "vae": [
+ "54",
+ 0
+ ]
+ },
+ "class_type": "VAEDecode",
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "58": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-shot",
+ "images": [
+ "57",
+ 0
+ ]
+ },
+ "class_type": "SaveImage",
+ "_meta": {
+ "title": "Save the angle"
+ }
+ }
+}
diff --git a/scripts/comfy/library.spec.mjs b/scripts/comfy/library.spec.mjs
index fc72fb1b..026d50f7 100644
--- a/scripts/comfy/library.spec.mjs
+++ b/scripts/comfy/library.spec.mjs
@@ -134,6 +134,13 @@
// draftSize* (OpenH3RegenPrepareDraft's size: "768p (1344x768)" for H3 drafts, "576p (1024x576)" for other
// models, whatever the shape: the pack upscales to 16:9 or 9:16 only; regenerate.ts draftSizeFor)
// startSigma (OpenH3RegenSigmas start noise: the Creativity control, 0 = the release 0.909 grid)
+// Keys added with Any Angle (any-angle-3d, any-angle-shot), each angle's camera from src/lib/catalog/any-angle.ts (params.extra):
+// splatFile* (Load3D model_file: the 3D build's .spz, uploaded like any input; Load3D's own check
+// takes any file in the input folder. The provider points its image entry at the photo)
+// cameraYaw, cameraPitch, cameraDistance, cameraFov (CreateCameraInfo orbit: degrees, degrees, splat units, degrees)
+// targetX, targetY, targetZ (CreateCameraInfo look-at point: a close-up aims at the face's height)
+// Output roles added with Any Angle: "sweep" and "sweep-mask" (the turntable at 192 px as lossless animated WebP, colour and
+// coverage, that the server measures the photo's front view on), "mesh" (a GLB made from a splat, for the 3D viewer).
import fs from 'node:fs';
@@ -365,6 +372,9 @@ export const KNOWN_MODELS = {
'dino_v3_vit_h.safetensors': { folder: 'clip_vision', url: 'https://huggingface.co/VAST-AI/TripoSplat/resolve/main/clip_vision/dino_v3_vit_h.safetensors' },
'triposplat_vae_decoder_fp16.safetensors': { folder: 'vae', url: 'https://huggingface.co/VAST-AI/TripoSplat/resolve/main/vae/triposplat_vae_decoder_fp16.safetensors' },
'triposplat_fp16.safetensors': { folder: 'diffusion_models', url: 'https://huggingface.co/VAST-AI/TripoSplat/resolve/main/diffusion_models/triposplat_fp16.safetensors' },
+ // Any Angle: lilylilith's AnyAngle LoRA for Qwen-Image 2.1 (Apache-2.0, rank 24, ComfyUI keys), at the revision whose file
+ // was measured (119,590,312 bytes).
+ 'QI2.1_AnyAngle.safetensors': { folder: 'loras', url: 'https://huggingface.co/lilylilith/QI_2.1_AnyAngle/resolve/5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae/QI2.1_AnyAngle.safetensors' },
// round 4 (r4/video-finish): the chunked SeedVR2 graph is hand-built, so its files are named here (same files as the template).
'seedvr2_3b_int8_convrot.safetensors': { folder: 'diffusion_models', url: 'https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_3b_int8_convrot.safetensors' },
'seedvr2_ema_vae_fp16.safetensors': { folder: 'vae', url: 'https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/vae/seedvr2_ema_vae_fp16.safetensors' },
@@ -4337,6 +4347,63 @@ export const SPEC = [
'numGaussians up to 1,048,576 (262,144 by default); seed drives both the sampler and the decoder. RenderSplat also takes a look_at camera, so a view picked in the browser can be rendered on the server. ' +
'3.78 GB of weights (TripoSplat 0.74, DINOv3 ViT-H 1.68, TripoSplat VAE decoder 0.58, FLUX.2 VAE 0.34, BiRefNet 0.44).',
},
+ {
+ // Any Angle (app-any-angle): the 3D view of one photo, built once and saved. Measured on an RTX 5090 (any-angle GPU test).
+ id: 'any-angle-3d',
+ title: 'Any Angle: a photo to a 3D view of its subject (TripoSplat), with a turntable, the sweep its front view is measured on and a GLB',
+ capability: 'splat',
+ handBuilt: 'hand-built/any-angle-3d.json',
+ bindings: {
+ // Only the photo: the seeds, the Gaussians and the 48 frames stay as the graph has them (the same photo, the same view).
+ image: [b('1', 'image')],
+ },
+ outputs: [
+ { node: '16', kind: 'model3d', role: 'splat' },
+ { node: '83', kind: 'video', role: 'turntable' },
+ { node: '85', kind: 'image', role: 'sweep' },
+ { node: '88', kind: 'image', role: 'sweep-mask' },
+ { node: '21', kind: 'image', role: 'matte' },
+ { node: '91', kind: 'model3d', role: 'mesh' },
+ ],
+ defaults: {},
+ vramGb: 8,
+ license:
+ 'MIT (VAST-AI/TripoSplat weights); the dino_v3_vit_h image encoder is under the DINOv3 License (royalty-free, commercial use allowed, trade-control limits; the app must show a "Built with DINOv3" notice); FLUX.2 VAE Apache-2.0; BiRefNet MIT',
+ notes:
+ 'Step 1 of Any Angle, run once per photo (the server keeps the result by the photo\'s sha256; feature any-angle-step, out of Library). image-to-splat-triposplat\'s chain with the cut-out always on ' +
+ '(without it a turned camera shows the photo as a flat card with black wedges), seeds fixed at 46 for the sampler and the decoder (the same photo gives the same 3D view), 20 steps, cfg 3, dpmpp_2m, 262,144 Gaussians. ' +
+ 'Outputs: the splat as .spz (role splat, about 3 MB: every angle reloads it), a 48-frame turntable from yaw 0 at pitch 10, distance 2, fov 33, 512 px, 12 fps (role turntable, shown while picking), ' +
+ 'the same frames at 192 px as lossless animated WebP, colour (role sweep) and RenderSplat\'s coverage mask (role sweep-mask), the BiRefNet cut-out (role matte) and a GLB from core SplatToMesh at 256 (role mesh, the desktop drag view). ' +
+ 'The server compares the sweep with the cut-out photo (silhouette overlap and colour correlation, the GPU test\'s measure) to find the photo\'s front yaw and distance: ' +
+ 'TripoSplat drops its own camera estimate and puts each subject in a pose of its own (the test found yaw 125, 75 and 90 on three photos). ' +
+ 'GPU test (RTX 5090): cut-out 0.8-1.3 s, TripoSplat 1.0 + 18-19.4 + 0.4 s, .spz save under 0.05 s, 48 frames at 512 px 20-37 s, mesh 0.4-0.5 s; about 8.7 GiB peak.',
+ },
+ {
+ // Any Angle (app-any-angle): one angle from the saved 3D view, painted back into a photo by Qwen-Image 2.1 + the AnyAngle LoRA.
+ id: 'any-angle-shot',
+ title: 'Any Angle: one camera angle of a photo, the 3D view rendered there and repainted by Qwen-Image 2.1 + the AnyAngle LoRA',
+ capability: 'edit',
+ handBuilt: 'hand-built/any-angle-shot.json',
+ bindings: {
+ image: [b('1', 'image')], splatFile: [b('2', 'model_file')],
+ cameraYaw: [b('20', 'mode.yaw')], cameraPitch: [b('20', 'mode.pitch')], cameraDistance: [b('20', 'mode.distance')], cameraFov: [b('20', 'fov')],
+ targetX: [b('20', 'target_x')], targetY: [b('20', 'target_y')], targetZ: [b('20', 'target_z')],
+ width: [b('30', 'width')], height: [b('30', 'height')], seed: [b('56', 'seed')], steps: [b('56', 'steps')], cfg: [b('56', 'cfg')],
+ },
+ outputs: [{ node: '58', kind: 'image' }],
+ defaults: { steps: 25, cfg: 1 },
+ limits: { maxWidth: 2048, maxHeight: 2048, dimensionMultiple: 8 },
+ vramGb: 32,
+ license:
+ 'Qwen Research License Agreement (Qwen-Image 2.1, Qwen3-VL 8B encoder, VAE): NON-COMMERCIAL, research and evaluation only; the AnyAngle LoRA (lilylilith/QI_2.1_AnyAngle) Apache-2.0',
+ notes:
+ 'Step 2 of Any Angle, one job per angle. The saved .spz goes in like any input (splatFile) and Load3D reads it without the browser: its image entry points at the photo (the provider fills it), ' +
+ 'then File3DToSplat. CreateCameraInfo orbit takes the camera Fuobe works out (the photo\'s measured front view plus the preset\'s turn, height and distance; a close-up aims at the face\'s height), ' +
+ 'RenderSplat renders it at the photo\'s shape (up to 2048 px, black background). Qwen-Image 2.1 int8 + the AnyAngle LoRA at 1.0, loaded here (one model loader, so no request LoRA lands on another), ' +
+ 'TextEncodeQwenImage21 with the LoRA\'s own prompt "Change the camera angle from <image2> to <image1>.", image 1 the original photo, image 2 the render, resolution 1024 (about 1 MP out: 1184x896 from a 1536x1152 photo), ' +
+ 'KSampler 25 steps, cfg 1, euler, simple, seed 46. GPU test (RTX 5090): reload + render 2.3 s (a rebuild would be about 20 s), text encode 5.4 s, sampler 22.6 s, about 30 s an angle, peak 28.4-29.2 GiB (card total, with the desktop): vramGb 32, since a 24 GB card has no room to spare. ' +
+ 'Tested against the alternatives: the other image order gives back the original angle, cfg 3 is 5x slower and no better, bf16 is 2x slower, the photo behind the render adds a ghost second person, grey is no better than black.',
+ },
{
// N7-5: Cinema's "Film this path" on the open engine (docs/research/new-models-7.md §3.6, the wan21-i2v-uni3c-path table).
id: 'wan21-i2v-uni3c-path',
diff --git a/src/app/(studio)/apps/[id]/page.tsx b/src/app/(studio)/apps/[id]/page.tsx
index 397df18e..45908e5a 100644
--- a/src/app/(studio)/apps/[id]/page.tsx
+++ b/src/app/(studio)/apps/[id]/page.tsx
@@ -3,10 +3,12 @@ import { notFound } from "next/navigation";
import { Suspense } from "react";
import { Studio } from "@/components/studio/studio";
import { CleanVoiceTool } from "@/components/audio-tools/clean-voice-tool";
+import { AnyAngleGate } from "@/components/any-angle/any-angle-tool";
import { RelightGate } from "@/components/relight/relight-gate";
import { APPS, getModel, getPreset } from "@/lib/catalog";
import { withRecipe } from "@/lib/catalog/preset-recipes";
import { appStudio } from "@/lib/studios";
+import { anyAngleToolLive } from "@/server/any-angle-live";
import { relightToolLive } from "@/server/relight";
export function generateStaticParams() {
@@ -25,6 +27,9 @@ async function AppStudio({ params }: { params: PageProps<"/apps/[id]">["params"]
if (!preset || preset.type !== "app") notFound();
// An app that is a tool of its own (Clean up voice): the same tool as its Audio mode, under the app's name.
if (preset.tool === "clean-voice") return <CleanVoiceTool app={{ name: preset.name, description: preset.description }} />;
+ // Any Angle: build a 3D view of the photo once, then pick camera angles from it. Open to everyone once its workflows
+ // have passed their check on a GPU; the owner gets it before then.
+ if (preset.tool === "any-angle") return <AnyAngleGate live={anyAngleToolLive()} app={{ name: preset.name }} />;
// The app opens on the model its preview was made with, its own route one pick away.
const studio = <Studio config={withRecipe(appStudio(preset), (m) => !!getModel(m))} />;
// Relight: tap the photo to place lights, a live preview, then Generate lighting and an instant Intensity blend. The
diff --git a/src/app/api/generations/route.ts b/src/app/api/generations/route.ts
index 9ffa90ce..a13963eb 100644
--- a/src/app/api/generations/route.ts
+++ b/src/app/api/generations/route.ts
@@ -1,5 +1,5 @@
import { connection } from "next/server";
-import { CONNECT_GPU_HEADER, CONNECT_NEEDS_HEADER, GUEST_RUN_MESSAGE, OWN_GPU_TOOL_MESSAGE } from "@/lib/guest-access";
+import { ACTIVE_RUNS_CODE, CONNECT_GPU_HEADER, CONNECT_NEEDS_HEADER, GUEST_RUN_MESSAGE, OWN_GPU_TOOL_MESSAGE } from "@/lib/guest-access";
import { missingFilesMessage } from "@/lib/missing-files";
import { ADD_KEY_HEADER } from "@/lib/your-keys";
import { requestViewer, validToken } from "@/server/auth";
@@ -8,11 +8,13 @@ import { computerScope, ISOLATED_ON_COMPUTER, workerFor } from "@/server/provide
import { getSetting } from "@/server/settings";
import { RUNS_ON_COMPUTER_NOTE } from "@/lib/relay";
import { OPERATION_LABELS } from "@/lib/catalog/types";
+import { ANY_ANGLE } from "@/lib/catalog/any-angle";
import { relightRunTitle } from "@/lib/relight/engine";
import { ACCOUNT_LIMITS, ACCOUNT_MESSAGES, accountTotalBytes, accountUsage, diskHasRoom, filesFullMessage } from "@/server/account-files";
import { accountInputProblem } from "@/server/account-inputs";
import { db } from "@/server/db";
-import { accountLoraFix, accountRun, AccountRunError, asAccount, asVisitor, createGenerations, listGenerations, outputKind, previewGeneration, type AccountRunRefusal } from "@/server/generations";
+import { findView, requestViewKey } from "@/server/any-angle";
+import { accountLoraFix, accountRun, AccountRunError, asAccount, asVisitor, createGenerations, getGeneration, listGenerations, outputKind, previewGeneration, type AccountRunRefusal } from "@/server/generations";
import { ensureTrashPurge, listOptionsFrom } from "@/server/library";
import { hit, unhit } from "@/server/rate";
import { GenerationRequestSchema } from "@/server/request-schema";
@@ -112,7 +114,7 @@ export async function POST(request: Request) {
// Room on the server, room in the account's files, and a fair share of runs.
if (!diskHasRoom()) return refuse(503, ACCOUNT_MESSAGES.diskLow);
if (accountUsage(account.id).total >= accountTotalBytes(account.id)) return refuse(413, filesFullMessage(account.id));
- if (activeRuns(account.id) >= ACCOUNT_LIMITS.activeRuns) return refuse(429, ACCOUNT_MESSAGES.activeRuns, {}, { "Retry-After": "30" });
+ if (activeRuns(account.id) >= ACCOUNT_LIMITS.activeRuns) return refuse(429, ACCOUNT_MESSAGES.activeRuns, { code: ACTIVE_RUNS_CODE }, { "Retry-After": "30" });
const rate = hit(`run:${account.id}`, ACCOUNT_LIMITS.runsPerHour, 60 * 60_000);
if (!rate.ok) return refuse(429, ACCOUNT_MESSAGES.runRate, {}, { "Retry-After": String(rate.retryAfterS) });
if ((req.params?.numOutputs ?? 1) > ACCOUNT_LIMITS.outputsPerRun) {
@@ -126,6 +128,22 @@ export async function POST(request: Request) {
return refuse(problem.status, problem.error, { code: problem.code });
}
}
+ // Any Angle builds a photo's 3D view once for the owner or an account (src/server/any-angle.ts): a second build of the
+ // same photo, under any file name, gets the first one (running or done) and costs nothing.
+ if (!preview && req.modelId === ANY_ANGLE.buildModel) {
+ const key = await onOwn(() => requestViewKey(req));
+ if (key) {
+ const built = findView(key, account?.id);
+ const g = built ? getGeneration(built) : null;
+ if (g) {
+ if (account) unhit(`run:${account.id}`);
+ return Response.json({ items: [g] }, { status: 201 });
+ }
+ // The build takes nothing but the photo (fixed seeds, src/lib/catalog/any-angle.ts): other params are dropped, so
+ // the view a key finds is always the one this request would build.
+ req = { ...req, params: { extra: { viewKey: key } } };
+ }
+ }
try {
if (preview) {
// Hosted runs: a visitor's run that would go to this install's GPUs is priced there, with the billing service's
@@ -150,7 +168,7 @@ export async function POST(request: Request) {
const lim = onPool.policy.limits;
if (lim.activeRuns > 0 && activeRuns(account.id) >= lim.activeRuns) {
unhit(`run:${account.id}`);
- return refuse(429, ACCOUNT_MESSAGES.activeRuns, {}, { "Retry-After": "30" });
+ return refuse(429, ACCOUNT_MESSAGES.activeRuns, { code: ACTIVE_RUNS_CODE }, { "Retry-After": "30" });
}
if (lim.outputsPerRun > 0 && (req.params?.numOutputs ?? 1) > lim.outputsPerRun) {
req = { ...req, params: { ...req.params, numOutputs: lim.outputsPerRun } };
@@ -187,7 +205,8 @@ export async function POST(request: Request) {
}
// A 3D model from someone else's ComfyUI is finished on this server (decimate, web GLB, turntable): accounts
// don't get Image to 3D until that finish runs under an account's own limits.
- if (account && outputKind(planned.op, planned.model) === "model3d") {
+ // (Any Angle's 3D view is a splat and its turntable: nothing to finish, so an account builds it on its own GPU.)
+ if (account && outputKind(planned.op, planned.model) === "model3d" && planned.model.id !== ANY_ANGLE.buildModel) {
unhit(`run:${account.id}`);
return Response.json({ error: OWN_GPU_TOOL_MESSAGE, code: "own-gpu-tool" }, { status: 403 });
}
@@ -226,7 +245,7 @@ export async function POST(request: Request) {
if (account && activeRuns(account.id) >= ACCOUNT_LIMITS.activeRuns) {
unhit(`run:${account.id}`);
if (stamp?.hold) queueRelease(stamp.hold);
- return refuse(429, ACCOUNT_MESSAGES.activeRuns, {}, { "Retry-After": "30" });
+ return refuse(429, ACCOUNT_MESSAGES.activeRuns, { code: ACTIVE_RUNS_CODE }, { "Retry-After": "30" });
}
const make = () => createGenerations(req);
let items: ReturnType<typeof createGenerations>;
diff --git a/src/components/any-angle/any-angle-tool.tsx b/src/components/any-angle/any-angle-tool.tsx
new file mode 100644
index 00000000..de899fc3
--- /dev/null
+++ b/src/components/any-angle/any-angle-tool.tsx
@@ -0,0 +1,760 @@
+"use client";
+
+import { Box, Check, ChevronRight, Clapperboard, Download, Images, LayoutGrid, Library, Loader2, RefreshCw, Rotate3d, Sparkles, Upload, X } from "lucide-react";
+import Link from "next/link";
+import { createElement, useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
+import { toast } from "sonner";
+import { Button } from "@/components/ui/button";
+import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
+import { Segmented } from "@/components/faceless/controls";
+import { Panel, ToolHero, ToolShell } from "@/components/av/tool-shell";
+import { useGeneration, useGenerationList } from "@/components/av/use-generation";
+import { ACCEPT, LibraryGrid } from "@/components/studio/media-slot";
+import { loadModelViewer } from "@/components/model3d/model-viewer";
+import { askToSignUp, uploadFile, useAskBeforeUpload, useCreateGeneration, useEngine, useGenerations, useIsGuest, useIsOwner } from "@/lib/api";
+import { ACTIVE_RUNS_CODE } from "@/lib/guest-access";
+import {
+ ANY_ANGLE,
+ asSubject,
+ CUSTOM_LIMITS,
+ cameraFor,
+ clampCustom,
+ customCamera,
+ customLabel,
+ fromOrbit,
+ maxPitchFor,
+ NO_SUBJECT_MESSAGE,
+ orbitOf,
+ presetsFor,
+ renderSize,
+ sheetLayout,
+ shotExtra,
+ viewOf,
+ type AngleId,
+ type AnyAngleView,
+ type Camera,
+ type CustomAngle,
+} from "@/lib/catalog/any-angle";
+import type { Generation, GenerationRequest } from "@/lib/catalog/types";
+import { downloadHref } from "@/lib/library";
+import { presetCover } from "@/lib/preset-covers";
+import { toastError } from "@/lib/refusals";
+import { cn } from "@/lib/utils";
+
+/**
+ * Any Angle (app-any-angle): one photo, a 3D view of it built once, then the same photo from the cameras picked. Phones
+ * first: the angles are tap chips, several at a time, and each angle is its own run whose card fills in when it is done.
+ * On a desktop the 3D model can also be turned by hand ("Use this view"). The cameras come from the photo's front view,
+ * which the server measured when the 3D view was built (src/lib/catalog/any-angle.ts, src/server/any-angle.ts).
+ */
+
+const LEAD = "Pick a new camera angle for your photo. We build a 3D view of it first, then shoot it again from where you choose.";
+
+interface Photo {
+ ref: string;
+ preview: string;
+ name?: string;
+ uploading?: boolean;
+}
+
+/** A pick: a preset, or a camera turned by hand on the desktop view. */
+type AnglePick = { key: AngleId; label: string } | { key: string; label: string; custom: CustomAngle };
+
+const isCustom = (p: AnglePick): p is Extract<AnglePick, { custom: CustomAngle }> => "custom" in p;
+const busy = (g?: Generation | null) => !!g && (g.status === "queued" || g.status === "running");
+const photoOf = (g: Pick<Generation, "request">) => g.request.inputs?.images?.[0];
+const newSeed = () => Math.floor(Math.random() * 2 ** 31);
+const pause = (ms: number) => new Promise((r) => setTimeout(r, ms));
+
+function shotRequest(photo: string, view: AnyAngleView, camera: Camera, label: string, seed: number): GenerationRequest {
+ return {
+ feature: ANY_ANGLE.feature,
+ modelId: ANY_ANGLE.shotModel,
+ op: "edit",
+ engine: "open",
+ prompt: label,
+ inputs: { images: [photo] },
+ params: { seed, extra: shotExtra(camera, renderSize(view.size.width, view.size.height), view.splat) },
+ };
+}
+
+/** ?image= from a Library result's "New angle" or Image to 3D's "Shoot it from any angle", read once after hydration. */
+function useHandoff(take: (p: Photo) => void) {
+ useEffect(() => {
+ const url = new URLSearchParams(window.location.search).get("image");
+ if (url?.startsWith("/api/files/")) take({ ref: url, preview: url, name: decodeURIComponent(url.split("/").pop() ?? "") });
+ // Once, on arrival.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, []);
+}
+
+function AddPhoto({ onPick }: { onPick: (p: Photo) => void }) {
+ const [over, setOver] = useState(false);
+ const [picking, setPicking] = useState(false);
+ const askFirst = useAskBeforeUpload();
+ const inputId = useId();
+ const take = (f: File | undefined) => {
+ if (!f || askFirst()) return;
+ if (!f.type.startsWith("image/")) return void toast("A photo only: a JPEG, PNG or WebP");
+ const preview = URL.createObjectURL(f);
+ onPick({ ref: "", preview, name: f.name, uploading: true });
+ uploadFile(f).then(
+ (a) => onPick({ ref: a.url, preview: a.url, name: f.name }),
+ (e) => {
+ onPick({ ref: "", preview: "", name: undefined });
+ toastError(e);
+ },
+ );
+ };
+ return (
+ <div
+ className={cn(
+ "flex flex-col items-center justify-center gap-3 rounded-2xl border-2 border-dashed border-border-strong bg-background px-4 py-8 text-center transition-colors sm:py-10",
+ over && "border-primary bg-brand-faint",
+ )}
+ onDragOver={(e) => {
+ e.preventDefault();
+ setOver(true);
+ }}
+ onDragLeave={() => setOver(false)}
+ onDrop={(e) => {
+ e.preventDefault();
+ setOver(false);
+ take(e.dataTransfer.files?.[0]);
+ }}
+ >
+ <span className="grid size-12 place-items-center rounded-2xl bg-brand-faint text-brand-text">{over ? <Upload className="size-5" /> : <Rotate3d className="size-5" />}</span>
+ <div>
+ <p className="text-[15px] font-medium">Add a photo to turn the camera around</p>
+ <p className="mt-1 text-[13px] text-muted-foreground">One person or one product, in any setting</p>
+ </div>
+ <div className="flex flex-wrap items-center justify-center gap-1.5">
+ <Button size="sm" className="rounded-full" onClick={() => askFirst() || document.getElementById(inputId)?.click()}>
+ <Upload className="size-3.5" /> Upload
+ </Button>
+ <Popover open={picking} onOpenChange={setPicking}>
+ <PopoverTrigger asChild>
+ <Button variant="ghost" size="sm" className="rounded-full">
+ <Library className="size-3.5" /> Pick from Library
+ </Button>
+ </PopoverTrigger>
+ <PopoverContent className="w-[min(92vw,360px)] p-2" collisionPadding={12}>
+ <p className="px-1 pb-2 text-[13px] font-medium">From your library</p>
+ {picking && (
+ <LibraryGrid
+ kinds={["image"]}
+ onPick={(v) => {
+ onPick({ ref: v.ref, preview: v.preview, name: v.name });
+ setPicking(false);
+ }}
+ />
+ )}
+ </PopoverContent>
+ </Popover>
+ </div>
+ <input
+ id={inputId}
+ type="file"
+ accept={ACCEPT.image}
+ hidden
+ onChange={(e) => {
+ take(e.target.files?.[0]);
+ e.target.value = "";
+ }}
+ />
+ </div>
+ );
+}
+
+/**
+ * The photo, always the main picture. Once the 3D view is built, "3D view" shows its turntable small in the corner,
+ * starting where the photo was taken.
+ */
+function Stage({ photo, view, building, onRemove }: { photo: Photo; view: AnyAngleView | null; building: Generation | null | undefined; onRemove: () => void }) {
+ const [turning, setTurning] = useState(false);
+ const front = view?.front.yaw ?? 0;
+ const startAtFront = (e: React.SyntheticEvent<HTMLVideoElement>) => {
+ const v = e.currentTarget;
+ if (Number.isFinite(v.duration) && v.duration > 0) v.currentTime = ((((front % 360) + 360) % 360) / 360) * v.duration;
+ };
+ const progress = building && busy(building) ? Math.round((building.progress ?? 0) * 100) : null;
+ return (
+ <div className="relative overflow-hidden rounded-2xl bg-media">
+ {photo.preview ? (
+ // eslint-disable-next-line @next/next/no-img-element
+ <img src={photo.preview} alt="Your photo" className="mx-auto max-h-[52svh] w-full object-contain" />
+ ) : null}
+ {view?.turntable && turning && (
+ <video
+ key={view.turntable}
+ src={view.turntable}
+ autoPlay
+ loop
+ muted
+ playsInline
+ onLoadedMetadata={startAtFront}
+ className="absolute bottom-3 left-3 aspect-square w-[34%] max-w-[180px] rounded-xl bg-black object-contain shadow-soft ring-1 ring-white/15"
+ aria-label="Your 3D view, turning"
+ />
+ )}
+ {view?.turntable && progress === null && (
+ <Button
+ variant="secondary"
+ size="sm"
+ aria-pressed={turning}
+ className="absolute top-3 left-3 min-h-11 rounded-full bg-background/85 px-3.5 backdrop-blur"
+ onClick={() => setTurning((t) => !t)}
+ >
+ <Rotate3d className="size-3.5" /> 3D view
+ </Button>
+ )}
+ {(photo.uploading || progress !== null) && (
+ <div className="absolute inset-x-3 bottom-3 rounded-full bg-background/90 px-3 py-1.5 text-[12px] font-medium shadow-soft" role="status">
+ <Loader2 className="mr-1.5 inline size-3.5 animate-spin" />
+ {photo.uploading ? "Uploading…" : `Building your 3D view… ${progress ? `${progress}%` : ""}`}
+ </div>
+ )}
+ <Button variant="secondary" size="icon" className="absolute top-3 right-3 size-11 rounded-full bg-background/85" aria-label="Remove the photo" onClick={onRemove}>
+ <X className="size-4" />
+ </Button>
+ </div>
+ );
+}
+
+/** The angles as tap chips, two to a row on a phone: several may be picked. */
+function AngleChips({ picks, options, onToggle }: { picks: AnglePick[]; options: AnglePick[]; onToggle: (p: AnglePick) => void }) {
+ const on = new Set(picks.map((p) => p.key));
+ return (
+ <div className="grid grid-cols-2 gap-2 sm:grid-cols-4" role="group" aria-label="Angles">
+ {options.map((p) => (
+ <button
+ key={p.key}
+ type="button"
+ aria-pressed={on.has(p.key)}
+ onClick={() => onToggle(p)}
+ className={cn(
+ "flex min-h-11 items-center justify-between gap-2 rounded-xl border px-3 py-2 text-left text-[13px] font-medium transition outline-none focus-visible:ring-2 focus-visible:ring-ring",
+ on.has(p.key) ? "border-primary bg-brand-faint text-foreground" : "border-border bg-background text-muted-foreground hover:text-foreground",
+ )}
+ >
+ <span className="min-w-0 truncate">{p.label}</span>
+ {on.has(p.key) && <Check className="size-4 shrink-0 text-brand-text" />}
+ </button>
+ ))}
+ </div>
+ );
+}
+
+type OrbitEl = HTMLElement & { getCameraOrbit?: () => { theta: number; phi: number; radius: number } };
+
+/** Desktop: the 3D model turned by hand, and "Use this view" adds that camera to the picks. */
+function DragView({ view, onUse }: { view: AnyAngleView; onUse: (a: CustomAngle) => void }) {
+ const [ready, setReady] = useState(false);
+ const [failed, setFailed] = useState(false);
+ const [el, setEl] = useState<OrbitEl | null>(null);
+ useEffect(() => {
+ let live = true;
+ loadModelViewer().then(
+ () => live && setReady(true),
+ () => live && setFailed(true),
+ );
+ return () => {
+ live = false;
+ };
+ }, []);
+ const { front } = view;
+ const use = () => {
+ const o = el?.getCameraOrbit?.();
+ if (!o) return;
+ const deg = (r: number) => (r * 180) / Math.PI;
+ onUse(fromOrbit(front, { theta: deg(o.theta), phi: deg(o.phi), radius: o.radius }));
+ };
+ if (failed || !view.mesh) return null;
+ // Only as far as a new angle can go: the turn each side of the front view, and no higher than the high angle allows.
+ const turn = front.person ? CUSTOM_LIMITS.yawPeople : CUSTOM_LIMITS.yawObjects;
+ const top = Math.max(5, 90 - maxPitchFor(front));
+ const low = Math.min(150, 90 - (front.pitch + CUSTOM_LIMITS.pitchMin));
+ return (
+ <Panel title="Turn it yourself" aside={<span className="text-[12px] text-muted-foreground">Drag to turn. Scroll to move closer.</span>} className="hidden md:block">
+ <div className="relative mx-auto aspect-[4/3] max-w-[480px] overflow-hidden rounded-xl bg-media">
+ {ready ? (
+ createElement("model-viewer", {
+ ref: setEl,
+ src: view.mesh,
+ alt: "The 3D view of your photo",
+ "camera-controls": "",
+ "interaction-prompt": "none",
+ "camera-orbit": orbitOf(front),
+ "camera-target": "0m 0m 0m",
+ "field-of-view": `${front.fov}deg`,
+ "min-field-of-view": `${front.fov}deg`,
+ "max-field-of-view": `${front.fov}deg`,
+ "min-camera-orbit": `${(front.yaw - turn).toFixed(1)}deg ${top.toFixed(1)}deg ${(front.distance * CUSTOM_LIMITS.distanceMin).toFixed(2)}m`,
+ "max-camera-orbit": `${(front.yaw + turn).toFixed(1)}deg ${low.toFixed(1)}deg ${(front.distance * CUSTOM_LIMITS.distanceMax).toFixed(2)}m`,
+ "environment-image": "neutral",
+ "tone-mapping": "neutral",
+ style: { width: "100%", height: "100%", background: "transparent" },
+ })
+ ) : (
+ <div className="grid size-full place-items-center" role="status" aria-label="Loading the 3D view">
+ <Loader2 className="size-4 animate-spin text-muted-foreground" />
+ </div>
+ )}
+ </div>
+ <div className="mx-auto mt-3 flex max-w-[480px] justify-end">
+ <Button variant="outline" size="sm" className="rounded-full" onClick={use} disabled={!ready}>
+ <Box className="size-3.5" /> Use this view
+ </Button>
+ </div>
+ </Panel>
+ );
+}
+
+/** One angle: its picture when it is done, the original a tap away, and what to do next. */
+function ShotCard({ g, original, onAgain }: { g: Generation; original: string; onAgain: (g: Generation) => void }) {
+ const [before, setBefore] = useState(false);
+ const out = g.status === "succeeded" ? g.outputs.find((o) => o.kind === "image") : undefined;
+ const label = g.prompt || "New angle";
+ return (
+ <article className="w-[min(78vw,320px)] shrink-0 snap-start overflow-hidden rounded-2xl border bg-background shadow-soft">
+ <div className="relative aspect-[4/3] bg-media">
+ {out ? (
+ // eslint-disable-next-line @next/next/no-img-element
+ <img src={before ? original : out.url} alt={before ? "The original photo" : label} className="size-full object-contain" />
+ ) : g.status === "failed" || g.status === "canceled" ? (
+ <p className="grid size-full place-items-center p-4 text-center text-[13px] text-muted-foreground">{g.error ?? "This angle didn't finish"}</p>
+ ) : (
+ <div className="grid size-full place-items-center" role="status">
+ <span className="inline-flex items-center gap-2 text-[13px] text-muted-foreground">
+ <Loader2 className="size-3.5 animate-spin" /> Making this angle{g.progress ? ` · ${Math.round(g.progress * 100)}%` : "…"}
+ </span>
+ </div>
+ )}
+ {out && (
+ <div role="radiogroup" aria-label="Show" className="absolute top-2 left-2 inline-flex rounded-full bg-background/85 p-0.5 text-[12px] font-medium shadow-soft backdrop-blur">
+ {(["After", "Before"] as const).map((k) => (
+ <button key={k} type="button" role="radio" aria-checked={before === (k === "Before")} onClick={() => setBefore(k === "Before")} className={cn("min-h-11 rounded-full px-3", before === (k === "Before") ? "bg-foreground text-background" : "text-muted-foreground")}>
+ {k}
+ </button>
+ ))}
+ </div>
+ )}
+ </div>
+ <div className="space-y-2 p-3">
+ <p className="truncate text-[13px] font-medium">{label}</p>
+ <div className="flex flex-wrap gap-1.5">
+ {(out || g.status === "failed") && (
+ <Button variant="outline" size="sm" className="rounded-full" onClick={() => onAgain(g)}>
+ <RefreshCw className="size-3.5" /> {out ? "Make another" : "Try again"}
+ </Button>
+ )}
+ {out && (
+ <>
+ <Button variant="outline" size="sm" className="rounded-full" asChild>
+ <Link href={`/video?image=${encodeURIComponent(out.url)}`} prefetch={false}>
+ <Clapperboard className="size-3.5" /> Animate
+ </Link>
+ </Button>
+ <Button variant="outline" size="icon-sm" className="rounded-full" asChild>
+ <a href={downloadHref(out.url, `${label}.png`)} download aria-label={`Download ${label}`}>
+ <Download className="size-3.5" />
+ </a>
+ </Button>
+ </>
+ )}
+ </div>
+ </div>
+ </article>
+ );
+}
+
+/** "All angles": the original large and every angle that finished, on one sheet (an angle that failed is left out). */
+function ContactSheet({ ids, original }: { ids: string[]; original: string }) {
+ const list = useGenerationList(ids);
+ const items = list.data ?? [];
+ const settled = items.length === ids.length && !items.some(busy);
+ const done = items.filter((g) => g.status === "succeeded" && g.outputs.some((o) => o.kind === "image"));
+ const [sheet, setSheet] = useState<string | null>(null);
+ const key = settled ? done.map((g) => g.id).join(",") : "";
+ useEffect(() => {
+ if (!key || !done.length) return;
+ let live = true;
+ let made: string | null = null;
+ const load = (src: string) =>
+ new Promise<HTMLImageElement>((res, rej) => {
+ const img = new Image();
+ img.onload = () => res(img);
+ img.onerror = rej;
+ img.src = src;
+ });
+ (async () => {
+ const [first, ...rest] = await Promise.all([load(original), ...done.map((g) => load(g.outputs.find((o) => o.kind === "image")!.url))]);
+ const shape = { width: rest[0].naturalWidth, height: rest[0].naturalHeight };
+ const layout = sheetLayout(shape, done.map((g) => g.prompt || "New angle"));
+ const c = document.createElement("canvas");
+ c.width = layout.width;
+ c.height = layout.height;
+ const x = c.getContext("2d");
+ if (!x) return;
+ x.fillStyle = "#111";
+ x.fillRect(0, 0, c.width, c.height);
+ x.font = "500 22px system-ui, sans-serif";
+ x.textBaseline = "middle";
+ for (const t of layout.tiles) {
+ const img = t.index < 0 ? first : rest[t.index];
+ // Fill the tile, cropped to its shape.
+ const k = Math.max(t.w / img.naturalWidth, t.h / img.naturalHeight);
+ const sw = t.w / k;
+ const sh = t.h / k;
+ x.drawImage(img, (img.naturalWidth - sw) / 2, (img.naturalHeight - sh) / 2, sw, sh, t.x, t.y, t.w, t.h);
+ x.fillStyle = "#f5f5f5";
+ x.fillText(t.label, t.x + 4, t.y + t.h + 22);
+ }
+ const blob = await new Promise<Blob | null>((r) => c.toBlob(r, "image/jpeg", 0.92));
+ if (!blob || !live) return;
+ made = URL.createObjectURL(blob);
+ setSheet(made);
+ })().catch(() => live && setSheet(null));
+ return () => {
+ live = false;
+ if (made) URL.revokeObjectURL(made);
+ };
+ // The finished angles' ids say when to draw it again.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [key, original]);
+ if (!settled) {
+ const left = items.filter(busy).length || ids.length;
+ return (
+ <p className="inline-flex items-center gap-2 text-[13px] text-muted-foreground" role="status">
+ <Loader2 className="size-3.5 animate-spin" /> All angles: {left} to go
+ </p>
+ );
+ }
+ if (!sheet) return null;
+ return (
+ <Panel title="All angles" aside={<Button variant="outline" size="sm" className="rounded-full" asChild><a href={sheet} download="All angles.jpg"><Download className="size-3.5" /> Download</a></Button>}>
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+ <img src={sheet} alt="Your photo and every angle on one sheet" className="w-full rounded-xl" />
+ </Panel>
+ );
+}
+
+function Crumbs({ name }: { name: string }) {
+ return (
+ <nav aria-label="Breadcrumb" className="hidden items-center gap-1 text-[13px] text-muted-foreground sm:flex">
+ <Link href="/apps" className="hover:text-foreground">
+ Apps
+ </Link>
+ <ChevronRight className="size-3.5" />
+ <span className="text-foreground">{name}</span>
+ </nav>
+ );
+}
+
+/** The app's cover: one photo shot again from the left, from above and close up. */
+function Cover() {
+ const cover = presetCover(ANY_ANGLE.appId);
+ if (!cover) return null;
+ const alt = "One photo shot again from the left, from above and close up";
+ return cover.video ? (
+ <video src={cover.video} poster={cover.poster} autoPlay loop muted playsInline className="mt-6 aspect-[4/3] w-full max-w-[640px] rounded-2xl bg-media object-cover shadow-soft" aria-label={alt} />
+ ) : (
+ // eslint-disable-next-line @next/next/no-img-element
+ <img src={cover.poster} alt={alt} className="mt-6 w-full max-w-[640px] rounded-2xl shadow-soft" />
+ );
+}
+
+/**
+ * The Any Angle app's page: the tool once its workflows have passed their check on a GPU (`live`, the manifest's
+ * `validated`), and for the studio's owner before then; everyone else sees the app's cover until it opens.
+ */
+export function AnyAngleGate({ live, app }: { live: boolean; app: { name: string } }) {
+ const owner = useIsOwner();
+ if (live || owner) return <AnyAngleTool app={app} />;
+ return (
+ <ToolShell title="Apps" engineSwitch={false} header={<Crumbs name={app.name} />}>
+ <ToolHero title={app.name} subtitle={LEAD}>
+ <Cover />
+ <p className="mt-4 rounded-full bg-brand-faint px-3 py-1.5 text-[13px] font-medium text-brand-text">Opening soon</p>
+ </ToolHero>
+ </ToolShell>
+ );
+}
+
+export function AnyAngleTool({ app }: { app?: { name: string } }) {
+ const [, , mode] = useEngine();
+ const guest = useIsGuest();
+ const create = useCreateGeneration();
+ const [photo, setPhoto] = useState<Photo | null>(null);
+ const [buildId, setBuildId] = useState<string | null>(null);
+ const [subject, setSubject] = useState<"person" | "object" | null>(null);
+ const [picks, setPicks] = useState<AnglePick[]>([]);
+ const [customs, setCustoms] = useState<AnglePick[]>([]);
+ const [sheetIds, setSheetIds] = useState<string[] | null>(null);
+ const [sending, setSending] = useState(false);
+ /** Angles asked for while the 3D view builds: they start as soon as it is ready. */
+ const [asked, setWaiting] = useState<"picked" | "all" | null>(null);
+ // Runs that wait for a place stop when the visitor leaves the page.
+ const mounted = useRef(true);
+ useEffect(() => {
+ mounted.current = true;
+ return () => {
+ mounted.current = false;
+ };
+ }, []);
+
+ const take = useCallback((p: Photo) => {
+ setPhoto(p.ref || p.uploading ? p : null);
+ if (!p.uploading) {
+ setBuildId(null);
+ setSubject(null);
+ setPicks([]);
+ setCustoms([]);
+ setSheetIds(null);
+ setWaiting(null);
+ }
+ }, []);
+ useHandoff(take);
+
+ // A 3D view already built (or building) from this photo: no need to build it again.
+ const builds = useGenerations({ features: [ANY_ANGLE.stepFeature], limit: 50 });
+ const ref = photo && !photo.uploading ? photo.ref : "";
+ const earlier = useMemo(() => (ref ? builds.data?.find((g) => photoOf(g) === ref && g.modelId === ANY_ANGLE.buildModel && g.status !== "failed" && g.status !== "canceled") : undefined), [builds.data, ref]);
+ const id = buildId ?? earlier?.id ?? null;
+ const build = useGeneration(id).data;
+ const measured = build?.status === "succeeded" ? viewOf(build) : null;
+ const view = useMemo(() => (measured && subject ? { ...measured, front: asSubject(measured.front, subject === "person") } : measured), [measured, subject]);
+ const person = view?.front.person ?? true;
+
+ const options: AnglePick[] = useMemo(() => [...presetsFor({ person }).map((p) => ({ key: p.id, label: p.label })), ...customs], [person, customs]);
+ const picked = picks.filter((p) => options.some((o) => o.key === p.key));
+ const results = useGenerations({ features: [ANY_ANGLE.feature], limit: 60 });
+ const shots = useMemo(() => (ref ? (results.data ?? []).filter((g) => photoOf(g) === ref) : []), [results.data, ref]);
+
+ const cloudOnly = mode === "cloud";
+ const ready = !!view && !!ref;
+ // A build that failed takes the angles waiting for it with it.
+ const waiting = build?.status === "failed" || build?.status === "canceled" ? null : asked;
+
+ const buildView = () => {
+ if (guest) return askToSignUp("run");
+ if (!ref) return;
+ create.mutate(
+ { feature: ANY_ANGLE.stepFeature, modelId: ANY_ANGLE.buildModel, op: "splat", engine: "open", inputs: { images: [ref] } },
+ { onSuccess: (items) => setBuildId(items[0]?.id ?? null), onError: (e) => toastError(e) },
+ );
+ };
+
+ /** Each angle is its own run, sent one after another; a full queue waits for a place. */
+ const send = async (reqs: GenerationRequest[]): Promise<string[]> => {
+ const made: string[] = [];
+ setSending(true);
+ try {
+ for (const r of reqs) {
+ for (let tries = 0; ; tries++) {
+ try {
+ const items = await create.mutateAsync(r);
+ if (items[0]) made.push(items[0].id);
+ break;
+ } catch (e) {
+ // Runs on your own GPU go a few at a time: the next one waits for a place (any other refusal, the hourly
+ // limit included, is said at once), and stops waiting when the page is left.
+ if ((e as { code?: string }).code === ACTIVE_RUNS_CODE && tries < 40 && mounted.current) {
+ await pause(15_000);
+ if (!mounted.current) return made;
+ continue;
+ }
+ if (mounted.current) toastError(e);
+ return made;
+ }
+ }
+ }
+ } finally {
+ setSending(false);
+ }
+ return made;
+ };
+
+ const cameraOf = (p: AnglePick): Camera | null => {
+ if (!view) return null;
+ if (isCustom(p)) return customCamera(view.front, p.custom);
+ const preset = presetsFor(view.front).find((x) => x.id === p.key);
+ return preset ? cameraFor(view.front, preset) : null;
+ };
+
+ const make = async (list: AnglePick[], all = false) => {
+ if (guest) return askToSignUp("run");
+ if (!view || !ref || !list.length) return;
+ const reqs = list.flatMap((p) => {
+ const cam = cameraOf(p);
+ return cam ? [shotRequest(ref, view, cam, p.label, ANY_ANGLE.seed)] : [];
+ });
+ if (all) setSheetIds(null);
+ const ids = await send(reqs);
+ if (!mounted.current) return;
+ if (all && ids.length) setSheetIds(ids);
+ setPicks([]);
+ };
+
+ // A pick the photo can't take (the view from behind, once the photo shows a product) is left out (`picked`), and said.
+ const gone = picks.filter((p) => !options.some((o) => o.key === p.key)).map((p) => p.label).join(", ");
+ const said = useRef("");
+ useEffect(() => {
+ if (gone && gone !== said.current) toast(`${gone} is for people, so it's left out for this photo`);
+ said.current = gone;
+ }, [gone]);
+
+ // Angles asked for while the 3D view was building start when it is ready.
+ useEffect(() => {
+ if (!waiting || !ready) return;
+ // eslint-disable-next-line react-hooks/set-state-in-effect -- the runs start when the server's 3D view is done
+ setWaiting(null);
+ void make(waiting === "all" ? options.filter((o) => !isCustom(o)) : picked, waiting === "all");
+ // Once, when the view is ready.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [waiting, ready]);
+
+ const again = (g: Generation) => {
+ if (guest) return askToSignUp("run");
+ void send([{ ...g.request, account: undefined, params: { ...g.request.params, seed: newSeed() } } as GenerationRequest]);
+ };
+
+ const toggle = (p: AnglePick) => setPicks((cur) => (cur.some((x) => x.key === p.key) ? cur.filter((x) => x.key !== p.key) : [...cur, p]));
+ const takeView = (a: CustomAngle) => {
+ if (!view) return;
+ const c = clampCustom(view.front, a);
+ const p: AnglePick = { key: `custom-${c.yaw}-${c.pitch}-${c.distance}`, label: customLabel(c), custom: c };
+ setCustoms((cur) => (cur.some((x) => x.key === p.key) ? cur : [...cur, p]));
+ setPicks((cur) => (cur.some((x) => x.key === p.key) ? cur : [...cur, p]));
+ };
+
+ const n = picked.length;
+ const failedBuild = build?.status === "failed" || build?.status === "canceled";
+ // No subject in the photo: building again gives the same answer, so another photo is the way on.
+ const noSubject = failedBuild && build?.error === NO_SUBJECT_MESSAGE;
+ const building = busy(build);
+ /** Make now, or (while the view builds) as soon as it is ready. */
+ const start = (what: "picked" | "all") => {
+ if (guest) return askToSignUp("run");
+ if (ready) return void make(what === "all" ? options.filter((o) => !isCustom(o)) : picked, what === "all");
+ if (building) setWaiting(what);
+ };
+ const waitingCount = waiting === "all" ? options.filter((o) => !isCustom(o)).length : waiting ? n : 0;
+
+ return (
+ <ToolShell
+ title="Apps"
+ engineSwitch={false}
+ header={<Crumbs name={app?.name ?? "Any Angle"} />}
+ >
+ {!photo && (
+ <ToolHero title={app?.name ?? "Any Angle"} subtitle={LEAD}>
+ <Cover />
+ </ToolHero>
+ )}
+ <div className={cn("mx-auto max-w-[860px] space-y-3", photo ? "pt-4" : "mt-6")}>
+ {!photo ? (
+ <AddPhoto onPick={take} />
+ ) : (
+ <Stage photo={photo} view={view} building={build} onRemove={() => take({ ref: "", preview: "" })} />
+ )}
+
+ {photo && cloudOnly && (
+ <Panel>
+ <p className="text-[13px] text-muted-foreground">
+ <span className="font-medium text-foreground">Any Angle runs on a GPU.</span> This studio is set to cloud models only, so it can&apos;t run here.
+ </p>
+ </Panel>
+ )}
+
+ {photo && !cloudOnly && !view && (
+ <Panel>
+ <div className="flex flex-col gap-3 sm:flex-row sm:items-center">
+ <p className="min-w-0 flex-1 text-[13px] text-muted-foreground" aria-live="polite">
+ {photo.uploading
+ ? "Uploading your photo…"
+ : building
+ ? waiting
+ ? `Building your 3D view. Your ${waitingCount === 1 ? "angle starts" : `${waitingCount} angles start`} as soon as it's ready.`
+ : "Building your 3D view. It takes about two minutes, once per photo. Pick your angles now: they start as soon as it's ready."
+ : failedBuild
+ ? (build?.error ?? "The 3D view didn't finish. Try again.")
+ : "First we build a 3D view of your photo. It takes about two minutes, once per photo."}
+ </p>
+ {!building &&
+ (noSubject ? (
+ <Button size="lg" className="shrink-0 rounded-full" onClick={() => take({ ref: "", preview: "" })}>
+ <Upload className="size-4" /> Choose another photo
+ </Button>
+ ) : (
+ <Button
+ size="lg"
+ className="shrink-0 rounded-full"
+ disabled={!ref || create.isPending}
+ onClick={() => {
+ if (failedBuild) setBuildId(null);
+ setWaiting(null);
+ buildView();
+ }}
+ >
+ {create.isPending ? <Loader2 className="size-4 animate-spin" /> : <Rotate3d className="size-4" />} {failedBuild ? "Try again" : "Build 3D view"}
+ </Button>
+ ))}
+ </div>
+ </Panel>
+ )}
+
+ {photo && !cloudOnly && (
+ <Panel
+ title="Angles"
+ aside={
+ view ? (
+ <Segmented
+ label="What the photo shows"
+ value={subject ?? (measured?.front.person ? "person" : "object")}
+ onChange={(v) => setSubject(v)}
+ options={[
+ { value: "person", label: "Person" },
+ { value: "object", label: "Product" },
+ ]}
+ />
+ ) : undefined
+ }
+ >
+ <AngleChips picks={picked} options={options} onToggle={toggle} />
+ <div className="mt-3 flex flex-col-reverse gap-2 sm:flex-row sm:items-center sm:justify-end">
+ <Button variant="outline" size="lg" className="rounded-full" disabled={!(ready || building) || !!waiting || sending} onClick={() => start("all")}>
+ <LayoutGrid className="size-4" /> All angles
+ </Button>
+ <Button size="lg" className="rounded-full" disabled={!(ready || building) || !n || !!waiting || sending} onClick={() => start("picked")}>
+ {sending || waiting ? <Loader2 className="size-4 animate-spin" /> : <Sparkles className="size-4" />}{" "}
+ {waiting ? "Starts when your 3D view is ready" : n > 1 ? `Make ${n} angles` : "Make this angle"}
+ </Button>
+ </div>
+ </Panel>
+ )}
+
+ {view && ref && <DragView view={view} onUse={takeView} />}
+
+ {/* The 3D view's image encoder asks for this notice (DINOv3 License). */}
+ {photo && !cloudOnly && <p className="text-[11px] text-muted-foreground">Built with DINOv3</p>}
+
+ {sheetIds && ref && <ContactSheet ids={sheetIds} original={ref} />}
+
+ {shots.length > 0 && ref && (
+ <section aria-labelledby="any-angle-results" className="pt-2">
+ <h3 id="any-angle-results" className="mb-2 inline-flex items-center gap-1.5 text-[13px] font-semibold">
+ <Images className="size-3.5" /> Your angles
+ </h3>
+ <div className="-mx-3 flex snap-x gap-3 overflow-x-auto px-3 pb-2 sm:-mx-6 sm:px-6">
+ {shots.map((g) => (
+ <ShotCard key={g.id} g={g} original={ref} onAgain={again} />
+ ))}
+ </div>
+ <p className="mt-1 text-[12px] text-muted-foreground">Every angle is also in your Library.</p>
+ </section>
+ )}
+ </div>
+ </ToolShell>
+ );
+}
diff --git a/src/components/model3d/model-card.tsx b/src/components/model3d/model-card.tsx
index 3f18663a..bff45763 100644
--- a/src/components/model3d/model-card.tsx
+++ b/src/components/model3d/model-card.tsx
@@ -7,6 +7,7 @@ import { toast } from "sonner";
import { Button } from "@/components/ui/button";
import { uploadFile, useHydrated } from "@/lib/api";
import { animateSpinHref, animationName, model3dView, stillOf, type Model3dView } from "@/lib/av/model3d";
+import { anyAngleHref } from "@/lib/catalog/any-angle";
import type { Generation } from "@/lib/catalog/types";
import { cn } from "@/lib/utils";
import { toastError } from "@/lib/refusals";
@@ -149,7 +150,8 @@ export function ModelCard({ g, info, cloudAllowed }: { g: Generation; info: Reco
const rigSource = view.rigged ? (g.request.inputs?.model3d ?? view.glb) : view.glb;
// The radio buttons in the corner: the preview and the 3D view, a rig's clips, or a splat's video and picture.
// A rig's clip is picked by its key ("main", "walking", "running"); "3d" is the model itself.
- const choices: { key: string; label: string; on: boolean }[] = view.splat
+ // A splat with a GLB made from it opens that in the viewer, as any model does.
+ const choices: { key: string; label: string; on: boolean }[] = view.splat && !view.glb
? clip
? [
{ key: "preview", label: "Turntable", on: show === "preview" },
@@ -264,18 +266,27 @@ export function ModelCard({ g, info, cloudAllowed }: { g: Generation; info: Reco
{g.modelName}
{g.prompt && !view.rigged ? ` · ${g.prompt}` : ""}
</p>
- {view.splat && (
+ {view.splat && !view.glb && (
<p className="text-[12px] text-muted-foreground">
Fuobe doesn&apos;t draw splats yet: {clip ? "the turntable shows it turning" : "the picture is what the model saw"}. Open the .{view.splat.format} in a Gaussian-splat viewer (SuperSplat, for one) to look around it.
</p>
)}
<div className="flex flex-wrap gap-1.5">
{view.splat ? (
- <Button asChild variant="outline" size="sm" className="rounded-full">
- <a href={view.splat.url} download={`${name}.${view.splat.format}`}>
- <Download className="size-3.5" /> .{view.splat.format}
- </a>
- </Button>
+ <>
+ {view.glb && (
+ <Button asChild variant="outline" size="sm" className="rounded-full">
+ <a href={view.glb} download={`${name}.glb`}>
+ <Download className="size-3.5" /> 3D model (.glb)
+ </a>
+ </Button>
+ )}
+ <Button asChild variant="outline" size="sm" className="rounded-full">
+ <a href={view.splat.url} download={`${name}.${view.splat.format}`}>
+ <Download className="size-3.5" /> {view.glb ? `3D splat (.${view.splat.format})` : `.${view.splat.format}`}
+ </a>
+ </Button>
+ </>
) : (
view.glb && (
<Button asChild variant="outline" size="sm" className="rounded-full">
@@ -326,6 +337,13 @@ export function ModelCard({ g, info, cloudAllowed }: { g: Generation; info: Reco
<PersonStanding className="size-3.5" /> {view.rigged ? "Another animation" : "Rig & animate"}
</Button>
)}
+ {view.splat && view.photo && (
+ <Button asChild variant="outline" size="sm" className="rounded-full">
+ <Link href={anyAngleHref(view.photo)} prefetch={false}>
+ <Rotate3d className="size-3.5" /> Shoot it from any angle
+ </Link>
+ </Button>
+ )}
{spin && (
<Button asChild size="sm" className="rounded-full">
<Link href={spin} prefetch={false}>
diff --git a/src/components/studio/result-actions.tsx b/src/components/studio/result-actions.tsx
index 5c8c1ef7..0f633486 100644
--- a/src/components/studio/result-actions.tsx
+++ b/src/components/studio/result-actions.tsx
@@ -27,6 +27,7 @@ import {
Pin,
Repeat,
RotateCcw,
+ Rotate3d,
Share2,
SlidersHorizontal,
SlidersVertical,
@@ -82,6 +83,7 @@ import { toastError } from "@/lib/refusals";
export const ACTION_ICONS: Record<OutputActionId, LucideIcon> = {
animate: Clapperboard,
+ "new-angle": Rotate3d,
edit: Wand2,
"live-edit": Zap,
upscale: ZoomIn,
diff --git a/src/lib/any-angle-front.ts b/src/lib/any-angle-front.ts
new file mode 100644
index 00000000..f1442906
--- /dev/null
+++ b/src/lib/any-angle-front.ts
@@ -0,0 +1,315 @@
+/**
+ * Any Angle's front view, measured per photo (pure; the server decodes the pictures with sharp and calls it).
+ *
+ * TripoSplat drops its own camera estimate, and turns every subject into a pose of its own, so the camera that sees the
+ * 3D copy as the photo does is found by looking: the 3D build renders a turntable (48 frames at a fixed height and
+ * distance, src/lib/catalog/any-angle.ts SWEEP) and each frame is compared with the photo's cut-out by the overlap of
+ * the two silhouettes and the colour correlation inside them, both cropped to the subject and scaled to one height
+ * (the measure the GPU test calibrated). The best frame gives the turn (refined between frames),
+ * and the silhouettes' heights give the distance at which the subject fills the frame as it fills the photo.
+ *
+ * The cut-out also tells a person from an object: a head on a narrower neck over wider shoulders. Its middle gives the
+ * close-up's aim, and its size how much of the photo the face takes (a portrait keeps its high angle lower).
+ */
+import { SWEEP, wrapYaw, type FrontView } from "./catalog/any-angle";
+
+/** One channel (a mask: 0–255) or three (RGB), row by row. */
+export interface Picture {
+ width: number;
+ height: number;
+ channels: 1 | 3;
+ data: Uint8Array | Uint8ClampedArray;
+}
+
+export interface SweepFrame {
+ rgb: Picture;
+ mask: Picture;
+}
+
+/** The scale every silhouette is compared at. */
+const CROP_H = 160;
+
+interface Box {
+ x0: number;
+ y0: number;
+ x1: number;
+ y1: number;
+}
+
+/** The box of the mask's pixels above half (null when there are too few to measure). */
+export function maskBox(m: Picture, min = 30): Box | null {
+ let x0 = m.width;
+ let y0 = m.height;
+ let x1 = -1;
+ let y1 = -1;
+ let n = 0;
+ for (let y = 0; y < m.height; y++) {
+ for (let x = 0; x < m.width; x++) {
+ if (m.data[(y * m.width + x) * m.channels] > 127) {
+ n++;
+ if (x < x0) x0 = x;
+ if (x > x1) x1 = x;
+ if (y < y0) y0 = y;
+ if (y > y1) y1 = y;
+ }
+ }
+ }
+ return n >= min ? { x0, y0, x1: x1 + 1, y1: y1 + 1 } : null;
+}
+
+/** A box of a picture scaled to w × h by averaging (area): channels as floats 0–1. */
+function resample(p: Picture, b: Box, w: number, h: number): Float32Array {
+ const c = p.channels;
+ const out = new Float32Array(w * h * c);
+ const sx = (b.x1 - b.x0) / w;
+ const sy = (b.y1 - b.y0) / h;
+ for (let y = 0; y < h; y++) {
+ const ya = b.y0 + y * sy;
+ const yb = Math.max(ya + 1e-6, b.y0 + (y + 1) * sy);
+ for (let x = 0; x < w; x++) {
+ const xa = b.x0 + x * sx;
+ const xb = Math.max(xa + 1e-6, b.x0 + (x + 1) * sx);
+ const acc = [0, 0, 0];
+ let wsum = 0;
+ for (let yy = Math.floor(ya); yy < Math.ceil(yb); yy++) {
+ const wy = Math.min(yb, yy + 1) - Math.max(ya, yy);
+ if (wy <= 0 || yy < 0 || yy >= p.height) continue;
+ for (let xx = Math.floor(xa); xx < Math.ceil(xb); xx++) {
+ const wx = Math.min(xb, xx + 1) - Math.max(xa, xx);
+ if (wx <= 0 || xx < 0 || xx >= p.width) continue;
+ const k = (yy * p.width + xx) * c;
+ for (let ch = 0; ch < c; ch++) acc[ch] += p.data[k + ch] * wx * wy;
+ wsum += wx * wy;
+ }
+ }
+ for (let ch = 0; ch < c; ch++) out[(y * w + x) * c + ch] = wsum ? acc[ch] / wsum / 255 : 0;
+ }
+ }
+ return out;
+}
+
+/** sRGB (0–1) to CIE L*a*b* (D65). */
+function lab(r: number, g: number, b: number): [number, number, number] {
+ const lin = (u: number) => (u <= 0.04045 ? u / 12.92 : ((u + 0.055) / 1.055) ** 2.4);
+ const R = lin(r);
+ const G = lin(g);
+ const B = lin(b);
+ const f = (t: number) => (t > 0.008856 ? Math.cbrt(t) : 7.787 * t + 16 / 116);
+ const X = f((0.4124 * R + 0.3576 * G + 0.1805 * B) / 0.95047);
+ const Y = f(0.2126 * R + 0.7152 * G + 0.0722 * B);
+ const Z = f((0.0193 * R + 0.1192 * G + 0.9505 * B) / 1.08883);
+ return [116 * Y - 16, 500 * (X - Y), 200 * (Y - Z)];
+}
+
+/** A subject cropped to its box and scaled to CROP_H high: colour in Lab, the silhouette, and the box it came from. */
+interface Crop {
+ w: number;
+ lab: Float32Array;
+ mask: Uint8Array;
+ box: Box;
+}
+
+function crop(rgb: Picture, mask: Picture, alpha: boolean): Crop | null {
+ const box = maskBox(mask);
+ if (!box) return null;
+ const w = Math.max(1, Math.round(((box.x1 - box.x0) * CROP_H) / (box.y1 - box.y0)));
+ const col = resample(rgb, box, w, CROP_H);
+ const m = resample(mask, box, w, CROP_H);
+ const sil = new Uint8Array(w * CROP_H);
+ const out = new Float32Array(w * CROP_H * 3);
+ for (let i = 0; i < w * CROP_H; i++) {
+ sil[i] = m[i * mask.channels] > 0.5 ? 1 : 0;
+ // The photo is compared as its cut-out (black outside the subject), as the render shows it.
+ const a = alpha ? m[i * mask.channels] : 1;
+ const [L, A, B] = lab(col[i * 3] * a, col[i * 3 + 1] * a, col[i * 3 + 2] * a);
+ out[i * 3] = L;
+ out[i * 3 + 1] = A;
+ out[i * 3 + 2] = B;
+ }
+ return { w, lab: out, mask: sil, box };
+}
+
+/** Silhouette overlap and colour correlation of two crops, centred side by side. */
+export function compare(a: Crop, b: Crop): { iou: number; ncc: number } {
+ const W = 2 * Math.max(a.w, b.w) + 4;
+ const ox = (W - a.w) >> 1;
+ const bx = (W - b.w) >> 1;
+ let inter = 0;
+ let union = 0;
+ const both: number[] = [];
+ for (let y = 0; y < CROP_H; y++) {
+ for (let x = 0; x < W; x++) {
+ const ia = x - ox;
+ const ib = x - bx;
+ const ma = ia >= 0 && ia < a.w ? a.mask[y * a.w + ia] : 0;
+ const mb = ib >= 0 && ib < b.w ? b.mask[y * b.w + ib] : 0;
+ if (ma || mb) union++;
+ if (ma && mb) {
+ inter++;
+ both.push(y * a.w + ia, y * b.w + ib);
+ }
+ }
+ }
+ const iou = union ? inter / union : 0;
+ const n = both.length / 2;
+ if (n < 50) return { iou, ncc: 0 };
+ const ma = [0, 0, 0];
+ const mb = [0, 0, 0];
+ for (let i = 0; i < n; i++) {
+ for (let c = 0; c < 3; c++) {
+ ma[c] += a.lab[both[2 * i] * 3 + c];
+ mb[c] += b.lab[both[2 * i + 1] * 3 + c];
+ }
+ }
+ for (let c = 0; c < 3; c++) {
+ ma[c] /= n;
+ mb[c] /= n;
+ }
+ let ab = 0;
+ let aa = 0;
+ let bb = 0;
+ for (let i = 0; i < n; i++) {
+ for (let c = 0; c < 3; c++) {
+ const u = a.lab[both[2 * i] * 3 + c] - ma[c];
+ const v = b.lab[both[2 * i + 1] * 3 + c] - mb[c];
+ ab += u * v;
+ aa += u * u;
+ bb += v * v;
+ }
+ }
+ return { iou, ncc: ab / (Math.sqrt(aa * bb) + 1e-6) };
+}
+
+/** What the cut-out says about a head: where its middle is, and how tall it is (rows of the mask). */
+export interface Head {
+ /** The head's middle, as a share of the subject's height from its top. */
+ middle: number;
+ /** The head's height (crown to neck) as a share of the photo's height. */
+ share: number;
+}
+
+/**
+ * A head on shoulders in a cut-out: under the top, a row much narrower than the solid blob above it (the neck), with a
+ * part much wider below (the shoulders). A bag's handle (thin straps above the body) isn't solid, and a bottle's cap
+ * isn't wider than its neck, so neither counts. Null when there is none.
+ */
+export function findHead(mask: Picture): Head | null {
+ const box = maskBox(mask);
+ if (!box) return null;
+ const H = box.y1 - box.y0;
+ if (H < 40) return null;
+ const count = new Float32Array(H);
+ const extent = new Float32Array(H);
+ for (let y = 0; y < H; y++) {
+ let n = 0;
+ let lo = -1;
+ let hi = -1;
+ const row = (box.y0 + y) * mask.width;
+ for (let x = box.x0; x < box.x1; x++) {
+ if (mask.data[(row + x) * mask.channels] > 127) {
+ n++;
+ if (lo < 0) lo = x;
+ hi = x;
+ }
+ }
+ count[y] = n;
+ extent[y] = lo < 0 ? 0 : hi - lo + 1;
+ }
+ // Smooth the widths over about 2% of the height (hair and edges are ragged).
+ const r = Math.max(1, Math.round(H * 0.01));
+ const smooth = new Float32Array(H);
+ for (let y = 0; y < H; y++) {
+ let s = 0;
+ let k = 0;
+ for (let d = -r; d <= r; d++) {
+ if (y + d >= 0 && y + d < H) {
+ s += count[y + d];
+ k++;
+ }
+ }
+ smooth[y] = s / k;
+ }
+ // The neck: the row least wide against the widest above it, under a solid blob (every row at least 60% filled between
+ // its edges) and over rows a fifth wider; a row nearer the top wins a close call (a waist is lower down).
+ let best: { y: number; cost: number } | null = null;
+ let head = 0;
+ let solidMin = 1;
+ for (let y = 0; y < Math.round(H * 0.6); y++) {
+ if (y >= Math.round(H * 0.05) && head > 0) {
+ const neck = smooth[y];
+ let below = 0;
+ for (let t = y + 1; t < Math.min(H, y + Math.round(H * 0.25)); t++) below = Math.max(below, smooth[t]);
+ const ratio = neck / head;
+ const cost = ratio + 0.3 * (y / H);
+ if (neck > 0 && ratio <= 0.9 && below >= 1.2 * neck && solidMin >= 0.6 && (!best || cost < best.cost)) best = { y, cost };
+ }
+ head = Math.max(head, smooth[y]);
+ // The crown's first rows are a few strands of hair: they don't count against the blob.
+ if (y >= Math.round(H * 0.02) && extent[y] > 0) solidMin = Math.min(solidMin, count[y] / extent[y]);
+ }
+ if (!best) return null;
+ // The face: halfway from the crown to the neck.
+ return { middle: (best.y * 0.5) / H, share: best.y / mask.height };
+}
+
+/**
+ * Measure the front view: the photo (RGB) and its cut-out, against the turntable's frames (RGB and coverage masks,
+ * frame k at SWEEP.yaw + 360·k/n). Null when nothing could be compared.
+ */
+export function measureFront(photo: { rgb: Picture; mask: Picture }, frames: SweepFrame[], sweep: { yaw: number; pitch: number; distance: number; fov: number } = SWEEP): FrontView | null {
+ const ref = crop(photo.rgb, photo.mask, true);
+ if (!ref || !frames.length) return null;
+ const scores: number[] = [];
+ const crops: (Crop | null)[] = [];
+ for (const f of frames) {
+ const c = crop(f.rgb, f.mask, false);
+ crops.push(c);
+ if (!c) {
+ scores.push(-Infinity);
+ continue;
+ }
+ const { iou, ncc } = compare(ref, c);
+ scores.push(0.5 * iou + 0.5 * ncc);
+ }
+ let k = 0;
+ for (let i = 1; i < scores.length; i++) if (scores[i] > scores[k]) k = i;
+ const best = crops[k];
+ if (!best || !Number.isFinite(scores[k])) return null;
+ const n = frames.length;
+ const step = 360 / n;
+ // Between frames: the top of a parabola through the best frame and its neighbours.
+ const a = scores[(k - 1 + n) % n];
+ const c = scores[(k + 1) % n];
+ const curve = a - 2 * scores[k] + c;
+ const shift = Number.isFinite(a) && Number.isFinite(c) && curve < 0 ? Math.max(-0.5, Math.min(0.5, (0.5 * (a - c)) / curve)) : 0;
+ const yaw = wrapYaw(sweep.yaw + (k + shift) * step);
+ // The distance at which the subject fills the frame's short side as it fills the photo's.
+ const frame = frames[k].mask;
+ const shortP = Math.min(photo.mask.width, photo.mask.height);
+ const shortR = Math.min(frame.width, frame.height);
+ const fillP = (ref.box.y1 - ref.box.y0) / shortP;
+ const fillR = (best.box.y1 - best.box.y0) / shortR;
+ const distance = (sweep.distance * fillR) / fillP;
+ // The face: its place on the photo's silhouette, at the same place on the frame's, back into the 3D view's height.
+ const f = shortR / 2 / Math.tan((sweep.fov * Math.PI) / 360);
+ const p = (sweep.pitch * Math.PI) / 180;
+ // A row of the frame back to a height in the 3D view (a point on the upright axis through the target).
+ const heightAt = (row: number) => {
+ const off = frame.height / 2 - row;
+ return (off * sweep.distance) / (f * Math.cos(p) + off * Math.sin(p));
+ };
+ const head = findHead(photo.mask);
+ const faceY = head ? heightAt(best.box.y0 + head.middle * (best.box.y1 - best.box.y0)) : 0;
+ const r3 = (n: number) => Math.round(n * 1000) / 1000;
+ return {
+ yaw: Math.round(yaw * 10) / 10,
+ pitch: sweep.pitch,
+ distance: Math.round(distance * 100) / 100,
+ fov: sweep.fov,
+ faceY: r3(faceY),
+ person: !!head,
+ headShare: head ? r3(head.share) : 0,
+ score: r3(scores[k]),
+ span: [r3(heightAt(best.box.y1)), r3(heightAt(best.box.y0))],
+ };
+}
diff --git a/src/lib/api.ts b/src/lib/api.ts
index 51c75b28..c3cc2ad3 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -47,7 +47,10 @@ export interface Asset {
async function json<T>(res: Response): Promise<T> {
const body = (await res.json().catch(() => ({}))) as T & { error?: string };
// With its status, so a refusal or a missing thing isn't retried (src/app/providers.tsx).
- if (!res.ok) throw responseError(res, Object.assign(new Error(body.error ?? "Something went wrong. Please try again."), { status: res.status }));
+ // Its code too, when the refusal has one (a run that waits for a place: ACTIVE_RUNS_CODE).
+ const given = (body as { code?: unknown }).code;
+ const code = typeof given === "string" ? given : undefined;
+ if (!res.ok) throw responseError(res, Object.assign(new Error(body.error ?? "Something went wrong. Please try again."), { status: res.status }, code && { code }));
return body;
}
diff --git a/src/lib/av/model3d.ts b/src/lib/av/model3d.ts
index fa64fdc5..e85c4600 100644
--- a/src/lib/av/model3d.ts
+++ b/src/lib/av/model3d.ts
@@ -184,7 +184,7 @@ export function viewerGlb(o: { url: string; meta?: Record<string, unknown> }): s
}
export interface Model3dView {
- /** The original GLB (the download). */
+ /** The original GLB (the download): a splat's is the mesh made from it, when there is one. */
glb?: string;
/** The GLB to show in a viewer: the web GLB when there is one, else `glb`. */
web?: string;
@@ -227,7 +227,10 @@ export function stillOf(g: Pick<Generation, "request">): string | undefined {
}
export function model3dView(g: Pick<Generation, "outputs" | "request">): Model3dView {
- const mesh = g.outputs.find((o) => o.kind === "model3d");
+ // The model itself; a splat's GLB made from it (role "mesh") is what the viewer shows of a splat.
+ const files = g.outputs.filter((o) => o.kind === "model3d");
+ const mesh = files.find((o) => o.meta?.role !== "mesh") ?? files[0];
+ const fromSplat = files.find((o) => o !== mesh && o.meta?.role === "mesh");
const meta = (mesh?.meta ?? {}) as Record<string, unknown>;
const str = (v: unknown) => (typeof v === "string" && v ? v : undefined);
const videos = g.outputs.filter((o) => o.kind === "video");
@@ -240,8 +243,8 @@ export function model3dView(g: Pick<Generation, "outputs" | "request">): Model3d
const format = splatFormatOf(mesh);
const splat = mesh && format ? { url: mesh.url, format } : undefined;
return {
- glb: splat ? undefined : mesh?.url,
- web: mesh && !splat ? viewerGlb(mesh) : undefined,
+ glb: splat ? fromSplat?.url : mesh?.url,
+ web: mesh && !splat ? viewerGlb(mesh) : fromSplat?.url,
splat,
turntable: str(meta.turntable) ?? str(meta.video) ?? video?.url,
rendering: pending ? { queued: finish.turntable === "queued", progress: typeof finish.turntableProgress === "number" ? finish.turntableProgress : 0 } : undefined,
diff --git a/src/lib/catalog/any-angle.ts b/src/lib/catalog/any-angle.ts
new file mode 100644
index 00000000..98dd5fc2
--- /dev/null
+++ b/src/lib/catalog/any-angle.ts
@@ -0,0 +1,319 @@
+/**
+ * Any Angle: one photo becomes a rough 3D view of the subject once (TripoSplat, graph any-angle-3d), and each angle is
+ * that view rendered from a chosen camera and painted back into a finished photo by Qwen-Image 2.1 with the AnyAngle
+ * LoRA (graph any-angle-shot). This file holds the camera side: the presets, the camera each one makes from a photo's
+ * measured front view, and the limits the tests on the GPU set. Pure (no I/O): the page, the server and the tests
+ * share it. The front view itself is measured by src/lib/any-angle-front.ts.
+ *
+ * Camera conventions (core CreateCameraInfo, orbit mode): yaw 0 puts the camera on +Z looking at the target, a larger
+ * yaw moves it to its own right (90 = +X), positive pitch is above. The 3D view lives in about [-0.5, 0.5]³.
+ * TripoSplat puts every subject in a pose of its own, so the yaw, height and distance that match the photo are measured
+ * per photo (the GPU test found yaw 125, 75 and 90 on three photos); "Left 30°" is that front yaw minus 30.
+ */
+
+export const ANY_ANGLE = {
+ appId: "app-any-angle",
+ /** The angles (Library) and the 3D build (a helper step, kept out of Library). */
+ feature: "any-angle",
+ stepFeature: "any-angle-step",
+ shotModel: "oss-any-angle",
+ buildModel: "oss-any-angle-3d",
+ shotGraph: "any-angle-shot",
+ buildGraph: "any-angle-3d",
+ /** Bumped when the 3D build or the front measurement changes: a saved view of an older version is built again. */
+ version: 1,
+ /** The 3D build's seeds (sampler and decoder), fixed so the same photo gives the same 3D view. */
+ buildSeed: 46,
+ /** The angle's seed unless "Make another" asks for a new one. */
+ seed: 46,
+ fov: 33,
+ /** The LoRA's own prompt; the original is image 1, the render image 2 (the other order gives back the original angle). */
+ prompt: "Change the camera angle from <image2> to <image1>.",
+ loraFile: "QI2.1_AnyAngle.safetensors",
+ loraKey: "qwen-image-21-any-angle",
+ /** The render's longest side (RenderSplat takes up to 2048, in steps of 8). */
+ maxRender: 2048,
+} as const;
+
+/** Words for a build whose front view couldn't be measured (no subject the turntable and the photo share): the page offers another photo. */
+export const NO_SUBJECT_MESSAGE = "We couldn't find one clear subject in this photo. Try a photo of one person or one product.";
+
+/**
+ * The 3D build's turntable: 48 frames at 12 fps (a 4 s clip shown while picking), rendered from yaw 0 at a fixed height
+ * and distance. The same frames, scaled to 192 px, are the sweep the front view is measured on.
+ */
+export const SWEEP = { frames: 48, yaw: 0, pitch: 10, distance: 2, size: 192, fps: 12, fov: ANY_ANGLE.fov } as const;
+
+/** A photo's front view: the camera that sees the 3D copy as the photo shows the subject. */
+export interface FrontView {
+ yaw: number;
+ /** The turntable's height (10°): the measure finds the turn and the distance, not the height. */
+ pitch: number;
+ distance: number;
+ fov: number;
+ /** Where a close-up aims: the face's height in the 3D view (0 = the middle). */
+ faceY: number;
+ /** A head on shoulders was found in the cut-out: the view from behind is offered. */
+ person: boolean;
+ /** The head's share of the photo's height (0 when none was found): a big head keeps the high angle lower. */
+ headShare: number;
+ /** How well the best turntable frame matched the photo (0–1). */
+ score: number;
+ /** The subject's lowest and highest points in the 3D view (a close-up's aim when no head was found). */
+ span: [number, number];
+}
+
+export interface Camera {
+ yaw: number;
+ pitch: number;
+ distance: number;
+ fov: number;
+ target: [number, number, number];
+}
+
+export type AngleId = "left-30" | "left-60" | "right-30" | "right-60" | "above" | "below" | "close-up" | "behind";
+
+export interface AnglePreset {
+ id: AngleId;
+ label: string;
+ /** Turn from the front view (negative: the camera moves to the left). */
+ yaw: number;
+ /** Height above the front view, in degrees. */
+ pitch: number;
+ /** Times the front view's distance (the close-up's comes from the head's size). */
+ distance: number;
+ aim: "middle" | "face";
+ /** Offered only when the photo shows a person (the unseen back of an object comes out wrong). */
+ people?: true;
+}
+
+/**
+ * The presets, as tested on the GPU: turns up to 60° each way, a high and a low angle, a close-up aimed at the face, and a
+ * view from behind at three quarters (people only). Over-the-shoulder, wide and straight-behind views weren't tested, so
+ * they aren't offered. Heights add to the front view's 10°: from above lands at 40° (35° on a portrait), from below at
+ * -15°, as tested.
+ */
+export const ANGLE_PRESETS: readonly AnglePreset[] = [
+ { id: "left-30", label: "Left 30°", yaw: -30, pitch: 0, distance: 1, aim: "middle" },
+ { id: "left-60", label: "Left 60°", yaw: -60, pitch: 0, distance: 1, aim: "middle" },
+ { id: "right-30", label: "Right 30°", yaw: 30, pitch: 0, distance: 1, aim: "middle" },
+ { id: "right-60", label: "Right 60°", yaw: 60, pitch: 0, distance: 1, aim: "middle" },
+ { id: "above", label: "From above", yaw: 0, pitch: 30, distance: 1.05, aim: "middle" },
+ { id: "below", label: "From below", yaw: 0, pitch: -25, distance: 0.95, aim: "middle" },
+ { id: "close-up", label: "Close-up", yaw: 0, pitch: 5, distance: 0.5, aim: "face" },
+ { id: "behind", label: "From behind", yaw: 135, pitch: 5, distance: 1, aim: "middle", people: true },
+];
+
+/** A portrait's high angle stays at most this far above level: at +40 over the front only the top of the head shows. */
+export const PORTRAIT_MAX_PITCH = 35;
+/** A head taller than this share of the photo makes it a portrait. */
+export const PORTRAIT_HEAD_SHARE = 0.2;
+/** A close-up frames the head at about this share of the picture's height. */
+const CLOSE_UP_HEAD_SHARE = 0.45;
+
+/** Limits of a camera picked by hand (the desktop's drag view), relative to the front view. */
+export const CUSTOM_LIMITS = { pitchMin: -25, pitchMax: 40, distanceMin: 0.33, distanceMax: 1.5, yawPeople: 150, yawObjects: 90 } as const;
+
+const round = (n: number, d = 2) => Math.round(n * 10 ** d) / 10 ** d;
+const clamp = (n: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, n));
+
+/** A yaw in (-180, 180]. */
+export function wrapYaw(y: number): number {
+ const w = ((((y + 180) % 360) + 360) % 360) - 180;
+ return w === -180 ? 180 : w;
+}
+
+export const presetById = (id: string): AnglePreset | undefined => ANGLE_PRESETS.find((p) => p.id === id);
+
+/**
+ * The front view as the visitor says what the photo shows (Person or Object): an object has no view from behind and its
+ * close-up aims at its middle; a person whose head the cut-out didn't show gets a close-up a little under the top.
+ */
+export function asSubject(front: FrontView, person: boolean): FrontView {
+ if (person === front.person) return front;
+ if (!person) return { ...front, person: false, faceY: 0, headShare: 0 };
+ const [low, high] = front.span;
+ return { ...front, person: true, faceY: Math.round((high - 0.15 * (high - low)) * 1000) / 1000 };
+}
+
+/** The presets a photo offers: the view from behind only when it shows a person. */
+export const presetsFor = (front: Pick<FrontView, "person">): AnglePreset[] => ANGLE_PRESETS.filter((p) => !p.people || front.person);
+
+/** The close-up's distance factor: the head at about 45% of the picture, never nearer than a third of the front view. */
+export function closeUpFactor(front: Pick<FrontView, "person" | "headShare">): number {
+ if (!front.person || !(front.headShare > 0)) return 0.5;
+ return round(clamp(front.headShare / CLOSE_UP_HEAD_SHARE, 0.33, 0.75));
+}
+
+/** The highest a camera goes on this photo (absolute degrees): lower on a portrait. */
+export const maxPitchFor = (front: Pick<FrontView, "headShare" | "pitch">): number =>
+ front.headShare > PORTRAIT_HEAD_SHARE ? PORTRAIT_MAX_PITCH : front.pitch + CUSTOM_LIMITS.pitchMax;
+
+/** The camera a preset makes on a photo whose front view was measured. */
+export function cameraFor(front: FrontView, preset: AnglePreset): Camera {
+ const factor = preset.id === "close-up" ? closeUpFactor(front) : preset.distance;
+ const pitch = Math.min(front.pitch + preset.pitch, preset.pitch > 0 ? maxPitchFor(front) : 89);
+ return {
+ yaw: round(wrapYaw(front.yaw + preset.yaw), 1),
+ pitch: round(clamp(pitch, -89, 89), 1),
+ distance: round(front.distance * factor),
+ fov: front.fov,
+ target: [0, preset.aim === "face" ? round(front.faceY, 3) : 0, 0],
+ };
+}
+
+/** A camera picked by hand, relative to the front view (turn, height, distance factor). */
+export interface CustomAngle {
+ yaw: number;
+ pitch: number;
+ distance: number;
+}
+
+/** A hand-picked camera kept inside what works: the height and distance the tests covered, no back views of objects. */
+export function clampCustom(front: Pick<FrontView, "person" | "headShare" | "pitch">, a: CustomAngle): CustomAngle {
+ const turn = front.person ? CUSTOM_LIMITS.yawPeople : CUSTOM_LIMITS.yawObjects;
+ const top = maxPitchFor(front) - front.pitch;
+ return {
+ yaw: round(clamp(wrapYaw(a.yaw), -turn, turn), 1),
+ pitch: round(clamp(a.pitch, CUSTOM_LIMITS.pitchMin, Math.max(CUSTOM_LIMITS.pitchMin, Math.min(CUSTOM_LIMITS.pitchMax, top))), 1),
+ distance: round(clamp(a.distance, CUSTOM_LIMITS.distanceMin, CUSTOM_LIMITS.distanceMax)),
+ };
+}
+
+export function customCamera(front: FrontView, a: CustomAngle): Camera {
+ const c = clampCustom(front, a);
+ return {
+ yaw: round(wrapYaw(front.yaw + c.yaw), 1),
+ pitch: round(clamp(front.pitch + c.pitch, -89, 89), 1),
+ distance: round(front.distance * c.distance),
+ fov: front.fov,
+ target: [0, 0, 0],
+ };
+}
+
+/** A hand-picked camera in plain words: "Custom · 40° right, slightly above". */
+export function customLabel(a: CustomAngle): string {
+ const parts: string[] = [];
+ const turn = Math.round(wrapYaw(a.yaw));
+ if (Math.abs(turn) >= 5) parts.push(`${Math.abs(turn)}° ${turn < 0 ? "left" : "right"}`);
+ if (a.pitch >= 15) parts.push("from above");
+ else if (a.pitch >= 5) parts.push("slightly above");
+ else if (a.pitch <= -15) parts.push("from below");
+ else if (a.pitch <= -5) parts.push("slightly below");
+ if (a.distance <= 0.8) parts.push("closer");
+ else if (a.distance >= 1.2) parts.push("further back");
+ return `Custom · ${parts.length ? parts.join(", ") : "front"}`;
+}
+
+/**
+ * The desktop drag view's camera (model-viewer's orbit: theta from +Z towards +X, phi from straight up, radius) as a
+ * turn, height and distance factor relative to the front view. The 3D model shares the render's axes and units.
+ */
+export function fromOrbit(front: Pick<FrontView, "yaw" | "pitch" | "distance">, orbit: { theta: number; phi: number; radius: number }): CustomAngle {
+ return {
+ yaw: round(wrapYaw(orbit.theta - front.yaw), 1),
+ pitch: round(90 - orbit.phi - front.pitch, 1),
+ distance: round(orbit.radius / front.distance),
+ };
+}
+
+/** The front view as model-viewer's camera-orbit ("125deg 80deg 1.83m"). */
+export const orbitOf = (front: Pick<FrontView, "yaw" | "pitch" | "distance">): string => `${round(front.yaw, 1)}deg ${round(90 - front.pitch, 1)}deg ${round(front.distance)}m`;
+
+/** The render's size: the photo's shape, at most 2048 px on the long side, in steps of 8. */
+export function renderSize(width: number, height: number): { width: number; height: number } {
+ const k = Math.min(1, ANY_ANGLE.maxRender / Math.max(width, height));
+ const fit = (n: number) => Math.max(64, Math.floor((n * k) / 8) * 8);
+ return { width: fit(width), height: fit(height) };
+}
+
+/** The graph's settings for one angle (params.extra of an any-angle-shot run). */
+export function shotExtra(camera: Camera, size: { width: number; height: number }, splat: string): Record<string, number | string> {
+ return {
+ splatFile: splat,
+ cameraYaw: camera.yaw,
+ cameraPitch: camera.pitch,
+ cameraDistance: camera.distance,
+ cameraFov: camera.fov,
+ targetX: camera.target[0],
+ targetY: camera.target[1],
+ targetZ: camera.target[2],
+ width: size.width,
+ height: size.height,
+ };
+}
+
+/**
+ * The later switch of Fuobe Angles and Angles to this engine (only after the head-to-head on their own set): their
+ * controls as a turn, height and distance factor. Fuobe Angles: rotate_right_left is positive to the left; height
+ * -1 / 0 / 1 is from above / level / from below; move forward 0 / 5 / 10. Angles: horizontal_angle 0–315, vertical
+ * -30…60, zoom 0 / 5 / 10 (wide, medium, close-up).
+ */
+export function fromFuobeAngles(o: { rotate_right_left?: number; vertical_angle?: number; move_forward?: number }): CustomAngle {
+ const v = o.vertical_angle ?? 0;
+ const f = o.move_forward ?? 0;
+ return { yaw: -(o.rotate_right_left ?? 0), pitch: v < 0 ? 40 : v > 0 ? -25 : 0, distance: f >= 10 ? 0.5 : f >= 5 ? 0.75 : 1 };
+}
+
+export function fromAnglesApp(o: { horizontal_angle?: number; vertical_angle?: number; zoom?: number }): CustomAngle {
+ const h = o.horizontal_angle ?? 0;
+ const z = o.zoom ?? 5;
+ return { yaw: h > 180 ? h - 360 : h, pitch: o.vertical_angle ?? 0, distance: z >= 10 ? 0.5 : z <= 0 ? 1.6 : 1 };
+}
+
+/** The contact sheet of "All angles": the original as a large tile, then the angles in a grid of `columns`. */
+export interface SheetLayout {
+ width: number;
+ height: number;
+ tiles: { x: number; y: number; w: number; h: number; label: string; index: number }[];
+}
+
+/**
+ * Lay out a contact sheet for pictures of one shape (w × h): the original on the left at twice a tile's size, the
+ * angles that finished in two rows to its right, each with a caption band. Angles that failed are simply not there.
+ */
+export function sheetLayout(shape: { width: number; height: number }, labels: string[], o: { tile?: number; gap?: number; caption?: number } = {}): SheetLayout {
+ const tileW = o.tile ?? 480;
+ const gap = o.gap ?? 16;
+ const caption = o.caption ?? 44;
+ const tileH = Math.round((tileW * shape.height) / shape.width);
+ const n = labels.length;
+ const columns = Math.max(1, Math.ceil(n / 2));
+ const rows = n > columns ? 2 : 1;
+ const cellH = tileH + caption;
+ const bigH = rows * cellH + (rows - 1) * gap - caption;
+ const bigW = Math.round((bigH * shape.width) / shape.height);
+ const tiles: SheetLayout["tiles"] = [{ x: gap, y: gap, w: bigW, h: bigH, label: "Original", index: -1 }];
+ labels.forEach((label, i) => {
+ const r = Math.floor(i / columns);
+ const c = i % columns;
+ tiles.push({ x: gap * 2 + bigW + c * (tileW + gap), y: gap + r * (cellH + gap), w: tileW, h: tileH, label, index: i });
+ });
+ const width = gap * 2 + bigW + (n ? gap + columns * (tileW + gap) - gap : 0);
+ const height = gap * 2 + Math.max(bigH + caption, rows * cellH + (rows - 1) * gap);
+ return { width, height, tiles };
+}
+
+/** The Any Angle page with a picture in it (Library's "New angle", Image to 3D's "Shoot it from any angle"). */
+export const anyAngleHref = (image: string): string => `/apps/${ANY_ANGLE.appId}?image=${encodeURIComponent(image)}`;
+
+/** A finished 3D view as the page reads it (the build's outputs): its files, the photo's front view and size. */
+export interface AnyAngleView {
+ splat: string;
+ turntable?: string;
+ mesh?: string;
+ front: FrontView;
+ size: { width: number; height: number };
+}
+
+type ViewOutput = { url: string; meta?: Record<string, unknown> };
+const roleOf = (outputs: ViewOutput[], role: string) => outputs.find((o) => o.meta?.role === role);
+
+/** The 3D view a build made, once its front view was measured (the splat output's meta.front and meta.size). */
+export function viewOf(g: { outputs: ViewOutput[] }): AnyAngleView | null {
+ const splat = roleOf(g.outputs, "splat");
+ const front = splat?.meta?.front as FrontView | undefined;
+ const size = splat?.meta?.size as AnyAngleView["size"] | undefined;
+ if (!splat || !front || !size?.width || !size.height) return null;
+ return { splat: splat.url, turntable: roleOf(g.outputs, "turntable")?.url, mesh: roleOf(g.outputs, "mesh")?.url, front, size };
+}
diff --git a/src/lib/catalog/apps.ts b/src/lib/catalog/apps.ts
index 508c18dc..6e577029 100644
--- a/src/lib/catalog/apps.ts
+++ b/src/lib/catalog/apps.ts
@@ -372,6 +372,24 @@ export const APPS: Preset[] = [
parity:
"Follows your camera settings. Your words add detail when it runs on your GPU.",
}),
+ // Any Angle: a tool of its own (src/components/any-angle/any-angle-tool.tsx, src/lib/catalog/any-angle.ts). The photo
+ // becomes a 3D view once (TripoSplat), each angle is that view rendered at the camera picked and repainted by
+ // Qwen-Image 2.1 with the AnyAngle LoRA. GPU only: no hosted Qwen-Image 2.1 takes the LoRA.
+ app({
+ id: "app-any-angle",
+ name: "Any Angle",
+ category: "Camera",
+ description: "Turn the camera around your photo. Same face, same outfit, same place",
+ icon: "Rotate3d",
+ hue: 170,
+ badges: ["new"],
+ tool: "any-angle",
+ inputs: [{ key: "image", label: "Photo", hint: "One person or one product, in any setting", accept: "image", required: true }],
+ prompt: "Change the camera angle",
+ cloud: null,
+ open: { modelId: "oss-any-angle", op: "edit" },
+ parity: "Runs on your GPU. It builds a 3D view of your photo first, then shoots it again from the camera you pick.",
+ }),
app({
name: "Shots",
category: "Camera",
diff --git a/src/lib/catalog/lora-library.generated.ts b/src/lib/catalog/lora-library.generated.ts
index 7b14247e..42ff76da 100644
--- a/src/lib/catalog/lora-library.generated.ts
+++ b/src/lib/catalog/lora-library.generated.ts
@@ -3172,6 +3172,28 @@ export const LORA_LIBRARY: LoraEntry[] = [
"hostedEndpoint": "fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles",
"notes": "The camera-move LoRA behind Higgsfield Angles (higgsfield-originals-5.md §3.22). Its file is named 镜头转换.safetensors upstream; Fuobe keeps it under an ASCII name. It takes camera instructions in Chinese with English (rotate left / right by degrees, move forward or a close-up, bird's-eye or worm's-eye view, a wide-angle lens), which Fuobe Angles writes from its controls on the GPU. fal hosts the same LoRA (its LoRA gallery's multiple-angles route, lora_scale 1.25 and 6 steps by default) and builds the words itself. Strength 1.25, as fal and the public HF Space (linoyts/Qwen-Image-Edit-Angles) fuse it."
},
+ {
+ "key": "qwen-image-21-any-angle",
+ "name": "AnyAngle for Qwen-Image 2.1 (lilylilith)",
+ "file": "QI2.1_AnyAngle.safetensors",
+ "url": "https://huggingface.co/lilylilith/QI_2.1_AnyAngle/resolve/5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae/QI2.1_AnyAngle.safetensors",
+ "page": "https://huggingface.co/lilylilith/QI_2.1_AnyAngle",
+ "strength": 1.0,
+ "base": "qwen-image-2.1",
+ "download": "direct",
+ "group": "adapter",
+ "version": "5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae",
+ "sha256": "e4d7a0d44a45ed62daabd0f2484a1a59046618a4c47e76b1eab5e386a7a35d8a",
+ "sizeBytes": 119590312,
+ "licence": {
+ "commercial": true,
+ "hostedOk": true,
+ "snapshotDate": "2026-11-02",
+ "name": "Apache-2.0"
+ },
+ "released": "2026-09-28",
+ "notes": "Any Angle's repaint: a rough render of a 3D view of the photo (image 2) becomes a finished photo at that camera, with the face, outfit, light and room of the original (image 1). Rank 24, bf16, ComfyUI keys (core LoraLoaderModelOnly, no conversion). Its own prompt, at strength 1: \"Change the camera angle from <image2> to <image1>.\" The any-angle-shot graph loads it itself; as a recipe LoRA it is downloaded and hash-checked before a run. Not hosted with Qwen-Image 2.1 anywhere Fuobe calls, so Any Angle runs on a GPU only."
+ },
{
"key": "fusionix-i2v-14b",
"name": "FusioniX for Wan 2.1 I2V 14B (vrgamedevgirl84)",
diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.ts
index d82c62b7..96908780 100644
--- a/src/lib/catalog/models.ts
+++ b/src/lib/catalog/models.ts
@@ -3,7 +3,8 @@ import { DEFAULT_FPS_TARGET, FPS_TARGETS, SLOW_MOTION } from "@/lib/av/fps";
import { ASR_LANGUAGES, WHISPER_LANGUAGES } from "../speech-languages";
import { PROMPT_HELPER_PARAM } from "@/lib/comfy";
import { loraEntry, loraRef } from "./loras";
-import { ANGLES_LORA, MOSAIC_SCALE, MOSAIC_TARGET, SPEAK_GRAPH, SPEAK_LORA, SPEAK_PROMPT } from "./open-tools";
+import { ANGLES_LORA, ANY_ANGLE_LORA, MOSAIC_SCALE, MOSAIC_TARGET, SPEAK_GRAPH, SPEAK_LORA, SPEAK_PROMPT } from "./open-tools";
+import { ANY_ANGLE } from "./any-angle";
import { CINEMA_CROP, SOUL_ASPECTS, SOUL_TIERS } from "./soul";
import { RESTORE, offlineRestorePrompt } from "./restore";
import { REGEN_COPY, REGEN_DEFAULT_TIER, REGEN_MODEL, REGEN_OFFERED, REGEN_TIERS, REGEN_WORKFLOW } from "./regenerate";
@@ -1875,6 +1876,32 @@ const open: ModelDef[] = [
sliders: [{ param: "numGaussians", label: "Gaussians", min: 32768, max: 1048576, step: 32768, default: 262144 }],
},
}),
+ // Any Angle (app-any-angle, src/lib/catalog/any-angle.ts): two helpers its page runs, hidden from the pickers. The 3D view of
+ // a photo, built once (TripoSplat with the cut-out, fixed seeds, a turntable the front view is measured on, a GLB)…
+ o({
+ id: ANY_ANGLE.buildModel,
+ name: "Any Angle 3D view",
+ vendor: "Tripo (VAST)",
+ family: "tripo",
+ kind: "model3d",
+ tagline: "A 3D view of the photo's subject for picking camera angles · 8 GB GPU · MIT · Built with DINOv3",
+ routes: [comfy("splat", ANY_ANGLE.buildGraph, "BiRefNet cut-out → TripoSplat (seed 46) → .spz, a 48-frame turntable, its sweep and a GLB")],
+ options: { maxImages: 1, promptless: true },
+ hidden: true,
+ }),
+ // …and one angle from it: the view rendered at the camera, repainted by Qwen-Image 2.1 with the AnyAngle LoRA (its own
+ // prompt, so no words of the visitor's). No hosted Qwen-Image 2.1 takes the LoRA, so it runs on a GPU only.
+ o({
+ id: ANY_ANGLE.shotModel,
+ name: "Any Angle",
+ vendor: "Qwen (Alibaba) · lilylilith",
+ family: "qwen-image",
+ kind: "image",
+ tagline: "The same photo from a camera you pick: a 3D view rendered there and repainted · Qwen-Image 2.1 + AnyAngle LoRA · 32 GB GPU · non-commercial weights",
+ routes: [comfy("edit", ANY_ANGLE.shotGraph, "the saved 3D view rendered at the camera → Qwen-Image 2.1 int8 + AnyAngle LoRA, 25 steps, cfg 1")],
+ options: { maxImages: 1, seed: true, promptless: true, ...(ANY_ANGLE_LORA && { loras: [ANY_ANGLE_LORA] }) },
+ hidden: true,
+ }),
// Round 4 (r4/cinema-3d): Cinema Studio's "Create 3D scene". The mesh is in the photo's own camera space
// (glTF axes, metres), so the viewer starts where the photo was taken.
o({
diff --git a/src/lib/catalog/open-tools.ts b/src/lib/catalog/open-tools.ts
index 8a2f7534..51cb5ad6 100644
--- a/src/lib/catalog/open-tools.ts
+++ b/src/lib/catalog/open-tools.ts
@@ -24,6 +24,13 @@ export const SPEAK_MOTION_ORIGINAL = "fuobe-speak-motion";
const ANGLES_ENTRY = loraEntry("qwen-edit-2509-multiple-angles");
export const ANGLES_LORA: LoraRef | undefined = ANGLES_ENTRY && loraRef(ANGLES_ENTRY);
+/**
+ * lilylilith's AnyAngle LoRA for Qwen-Image 2.1 at 1.0 (Any Angle, src/lib/catalog/any-angle.ts): its graph loads it
+ * itself; as the recipe's LoRA it is downloaded and checked before a run.
+ */
+const ANY_ANGLE_ENTRY = loraEntry("qwen-image-21-any-angle");
+export const ANY_ANGLE_LORA: LoraRef | undefined = ANY_ANGLE_ENTRY && loraRef(ANY_ANGLE_ENTRY);
+
/**
* fal's Multiple-Angles LoRA for Qwen-Image-Edit 2511 (its `<sks>` pose words): the Angles app's open route, Cinema's
* recomposition and Soul Location's other views on the GPU, next to Fuobe Angles' 2509 recipe (its own app until the angles
diff --git a/src/lib/catalog/preset-recipe-routes.ts b/src/lib/catalog/preset-recipe-routes.ts
index 88a81ab5..7d1915e1 100644
--- a/src/lib/catalog/preset-recipe-routes.ts
+++ b/src/lib/catalog/preset-recipe-routes.ts
@@ -47,6 +47,7 @@ export type RecipeKind = "h3" | "orbit" | "qwen";
* - Remove Background, Upscale, Vectorize, Video Background Remover, Image to 3D: tools whose result (a cut-out, more
* pixels, an SVG, a matte, a mesh) only their own model makes; their previews show the idea.
* - Clean up voice: a tool of its own (RE-USE), with nothing to recast.
+ * - Any Angle: a tool of its own (a 3D view of the photo, then each angle from it on the GPU).
*/
export const OWN_ROUTE_APPS: ReadonlySet<string> = new Set([
"app-fuobe-angles",
@@ -63,6 +64,7 @@ export const OWN_ROUTE_APPS: ReadonlySet<string> = new Set([
"app-video-background-remover",
"app-image-to-3d",
"app-clean-up-voice",
+ "app-any-angle",
]);
/**
diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.ts
index 41dff2ba..5003c26e 100644
--- a/src/lib/catalog/types.ts
+++ b/src/lib/catalog/types.ts
@@ -1399,8 +1399,8 @@ export interface Preset {
grade?: string;
/** Fuobe DoP's relight effects: a step that makes the start frame first, on each engine (src/lib/catalog/dop.ts). */
prestep?: PresetPrestep;
- /** An app that is a tool of its own: its page renders that tool rather than the composer (Clean up voice, Relight). */
- tool?: "clean-voice" | "relight";
+ /** An app that is a tool of its own: its page renders that tool rather than the composer (Clean up voice, Relight, Any Angle). */
+ tool?: "clean-voice" | "relight" | "any-angle";
/** The recipe its preview was made with (src/lib/catalog/preset-recipe-book.json): the route it opens on follows it. */
recipe?: PresetRecipeBook;
}
diff --git a/src/lib/comfy.ts b/src/lib/comfy.ts
index fcd74300..6de6e3da 100644
--- a/src/lib/comfy.ts
+++ b/src/lib/comfy.ts
@@ -90,7 +90,11 @@ export interface ManifestOutput {
| "matte"
| "preview"
| "master"
- | "report";
+ | "report"
+ // Any Angle: the turntable at 192 px (colour, and its coverage) the front view is measured on, and a GLB made from a splat.
+ | "sweep"
+ | "sweep-mask"
+ | "mesh";
}
export interface ManifestWorkflow {
@@ -158,6 +162,22 @@ export function applyBindings(
return { workflow: out, missing };
}
+/**
+ * Load3D reads a saved 3D file without the browser (Any Angle's saved view): its picture entries, which the viewer's
+ * capture fills in the editor, point at the run's own photo (any file it sent works; nothing else is read from the folder).
+ */
+export function withLoad3dImages(wf: ComfyWorkflow, image: string | undefined): ComfyWorkflow {
+ if (!image) return wf;
+ let out = wf;
+ for (const [id, n] of Object.entries(wf)) {
+ const entry = n.inputs.image;
+ if (n.class_type !== "Load3D" || !entry || typeof entry !== "object" || Array.isArray(entry)) continue;
+ if (out === wf) out = cloneWorkflow(wf);
+ out[id].inputs.image = { ...(entry as Record<string, unknown>), image, mask: image, normal: image, recording: "" };
+ }
+ return out;
+}
+
const MODEL_LOADERS = new Set(["UNETLoader", "CheckpointLoaderSimple", "UnetLoaderGGUF", "ImageOnlyCheckpointLoader"]);
/** Whether a graph has a diffusion model loader LoRAs can be attached after (wrapper graphs load models their own way). */
diff --git a/src/lib/guest-access.ts b/src/lib/guest-access.ts
index c09b412f..db25b7b1 100644
--- a/src/lib/guest-access.ts
+++ b/src/lib/guest-access.ts
@@ -262,6 +262,9 @@ export function ownGpuRun(method: string, pathname: string): boolean {
return method === "POST" && pathname === "/api/generations";
}
+/** The code on an account's run refused because its runs going are at the limit: the next one may wait for a place and send again. */
+export const ACTIVE_RUNS_CODE = "active-runs";
+
export const OWN_GPU_TOOL_MESSAGE = "This tool isn't available here. Try the Image, Video or Audio studio, or an app, effect or camera motion.";
/** Set on an account's refused run: the client shows "Connect your GPU to run this". */
diff --git a/src/lib/local-comfy.ts b/src/lib/local-comfy.ts
index eb716820..65de22c2 100644
--- a/src/lib/local-comfy.ts
+++ b/src/lib/local-comfy.ts
@@ -140,6 +140,12 @@ export function graphProblem(graph: Record<string, { class_type?: unknown; input
for (const k of keys) {
const v = node?.inputs?.[k];
if (v === undefined || Array.isArray(v)) continue;
+ // Load3D's picture entries (Any Angle's saved view): each a file this run sent, or empty.
+ if (cls === "Load3D" && k === "image" && v && typeof v === "object") {
+ const bad = Object.entries(v as Record<string, unknown>).find(([f, x]) => f !== "camera_info" && x !== "" && x !== null && (typeof x !== "string" || !staged.includes(x)));
+ if (bad) return `Node ${id} (${cls}) reads ${typeof bad[1] === "string" ? `“${bad[1].slice(0, 80)}”` : "a value"}, which this run didn't send`;
+ continue;
+ }
if (typeof v !== "string" || !staged.includes(v.replace(/ \[input\]$/, ""))) return `Node ${id} (${cls}) reads ${typeof v === "string" ? `“${v.slice(0, 80)}”` : "a value"}, which this run didn't send`;
}
}
diff --git a/src/lib/output-actions.ts b/src/lib/output-actions.ts
index adad6b3a..01c4985e 100644
--- a/src/lib/output-actions.ts
+++ b/src/lib/output-actions.ts
@@ -14,9 +14,11 @@ import { decodeMoss, LAYOUT_PARAM, readLayout, type LayoutDraft } from "./layout
import { REMOVE_DIALOGUE_FEATURE } from "./av/remove-dialogue";
import { canRerender, REGEN_OFFERED, regenerateFamily, regenerateHref, rerenderLabel } from "./catalog/regenerate";
import { CLEAN_FEATURE } from "./av/clean-voice";
+import { anyAngleHref } from "./catalog/any-angle";
export type OutputActionId =
| "animate"
+ | "new-angle"
| "edit"
| "live-edit"
| "relight"
@@ -124,6 +126,8 @@ export function outputActions(g: Generation, index: number, ctx: ActionContext =
link("relight", "Relight", `/apps/app-relight?image=${q(o.url)}&gen=${q(g.id)}`);
link("live-edit", "Change it as you type", `/live-edit?image=${q(o.url)}&gen=${q(g.id)}&from=library`);
link("upscale", "Upscale", `/upscale?image=${q(o.url)}`);
+ // Any Angle: the same photo from another camera (its 3D view is built once per photo).
+ link("new-angle", "New angle", anyAngleHref(o.url));
link("reference", "Use as reference", `/image?ref=${q(o.url)}`);
link("grade", "Color grade", `/color-grade?image=${q(o.url)}`);
link("layers", "Open in Layers", layersHref(g, o.url));
diff --git a/src/lib/preset-covers.generated.ts b/src/lib/preset-covers.generated.ts
index 914386b3..72ba746f 100644
--- a/src/lib/preset-covers.generated.ts
+++ b/src/lib/preset-covers.generated.ts
@@ -18,6 +18,7 @@ export const PRESET_COVERS: Record<string, PresetCoverEntry> = {
"app-ai-influencer": "7ebfff3e",
"app-ai-stylist": ["636887ff","4c5398e9"],
"app-angles": ["ef8588d2","75a696f0"],
+ "app-any-angle": ["a5ee2f2e","179ee01c"],
"app-asmr-add-on": ["c5ef11ee","9b3e4516"],
"app-asmr-classic": ["cb4166ca","78e03e27"],
"app-asmr-host": "42ffa436",
diff --git a/src/lib/preset-featured.ts b/src/lib/preset-featured.ts
index 307eaf0f..c1d53f33 100644
--- a/src/lib/preset-featured.ts
+++ b/src/lib/preset-featured.ts
@@ -15,7 +15,7 @@ const ORDER: Record<"app" | "motion" | "effect", string[]> = {
app-video-face-swap app-video-background-remover app-clean-up-voice app-breakdown
`,
`
- app-hairstyle-try-on app-fuobe-angles app-product-placement app-link-to-video-ad app-style-snap app-urban-cuts
+ app-hairstyle-try-on app-fuobe-angles app-any-angle app-product-placement app-link-to-video-ad app-style-snap app-urban-cuts
app-signboard app-j-poster app-giallo-horror app-face-swap app-character-swap app-headshot-generator
app-skin-enhancer app-zooms app-what-s-next app-packshot app-billboard-ad app-macro-scene app-asmr-promo
app-ai-stylist app-colorize app-bring-to-life app-dance app-clipcut app-sticker-match-cut app-latex app-sand-worm
diff --git a/src/lib/preset-previews.generated.ts b/src/lib/preset-previews.generated.ts
index 5886e218..2da53035 100644
--- a/src/lib/preset-previews.generated.ts
+++ b/src/lib/preset-previews.generated.ts
@@ -91,6 +91,14 @@ export const PRESET_PREVIEWS: Record<string, PresetPreviewMedia> = {
"model": "minimax-h3",
"variant": "lean-json"
},
+ "app-any-angle": {
+ "poster": "/previews/presets/app-any-angle.jpg?v=a5ee2f2e",
+ "video": "/previews/presets/app-any-angle.mp4?v=179ee01c",
+ "run": "comfyui-previews-2026-11",
+ "engine": "comfyui",
+ "model": "oss-any-angle",
+ "variant": ""
+ },
"app-asmr-add-on": {
"poster": "/previews/presets/app-asmr-add-on.jpg?v=c5ef11ee",
"video": "/previews/presets/app-asmr-add-on.mp4?v=9b3e4516",
diff --git a/src/server/any-angle-live.ts b/src/server/any-angle-live.ts
new file mode 100644
index 00000000..442e7dca
--- /dev/null
+++ b/src/server/any-angle-live.ts
@@ -0,0 +1,19 @@
+import "server-only";
+import fs from "node:fs";
+import path from "node:path";
+import { ANY_ANGLE } from "@/lib/catalog/any-angle";
+
+const MANIFEST = path.join(process.cwd(), "workflows", "comfyui", "manifest.json");
+
+/**
+ * Whether the Any Angle app is open to everyone: both its workflows (the 3D view and one angle) have passed their check
+ * on a GPU (the manifest's `validated`). Until then the studio's owner gets the tool and everyone else its cover.
+ */
+export function anyAngleToolLive(manifest = MANIFEST): boolean {
+ try {
+ const m = JSON.parse(fs.readFileSync(manifest, "utf8")) as { workflows?: { id?: string; validated?: boolean }[] };
+ return [ANY_ANGLE.buildGraph, ANY_ANGLE.shotGraph].every((id) => m.workflows?.some((w) => w.id === id && w.validated === true));
+ } catch {
+ return false;
+ }
+}
diff --git a/src/server/any-angle.ts b/src/server/any-angle.ts
new file mode 100644
index 00000000..e0a8a4f5
--- /dev/null
+++ b/src/server/any-angle.ts
@@ -0,0 +1,150 @@
+import "server-only";
+import crypto from "node:crypto";
+import { ANY_ANGLE, type FrontView } from "@/lib/catalog/any-angle";
+
+export { NO_SUBJECT_MESSAGE } from "@/lib/catalog/any-angle";
+import { measureFront, type Picture, type SweepFrame } from "@/lib/any-angle-front";
+import type { GenerationRequest, OutputFile } from "@/lib/catalog/types";
+import { db } from "./db";
+import { readRef } from "./storage";
+
+/**
+ * Any Angle on the server (src/lib/catalog/any-angle.ts): the 3D view of a photo is built once per photo and person
+ * (A8), and when it is done its front view is measured on the turntable it rendered.
+ *
+ * - The view's key is the photo's sha256 with what makes the view (the build's version, the cut-out, the seeds). The 3D
+ * build's request carries it (params.extra.viewKey); POST /api/generations answers a second build of the same photo
+ * for the same owner or account with the first one (still running, or done), whatever the photo's file is called.
+ * - When the build succeeds, measureView reads its sweep (the turntable at 192 px, colour and coverage) and the cut-out,
+ * finds the camera that sees the 3D copy as the photo does (src/lib/any-angle-front.ts), and the splat's output keeps
+ * it as meta.front, with the photo's size (meta.size): every angle's camera starts from there.
+ */
+
+/** What changes the 3D view besides the photo: a view built another way is built again. */
+const VIEW_RECIPE = `v${ANY_ANGLE.version}:cut:s${ANY_ANGLE.buildSeed}`;
+
+export const viewKeyOf = (photo: Buffer): string => `${crypto.createHash("sha256").update(photo).digest("hex")}:${VIEW_RECIPE}`;
+
+/** The key of the photo a build request names (its first image), or null when it can't be read. */
+export async function requestViewKey(req: Pick<GenerationRequest, "inputs">): Promise<string | null> {
+ const photo = req.inputs?.images?.[0];
+ if (!photo) return null;
+ try {
+ return viewKeyOf((await readRef(photo)).data);
+ } catch {
+ return null;
+ }
+}
+
+/**
+ * The 3D view already built (or building) from this key for this owner (account undefined) or account: the newest one
+ * that hasn't failed, been canceled or been deleted. Its id; the route reads it as the caller's generation.
+ */
+export function findView(key: string, account: string | undefined): string | null {
+ const who = account ? "json_extract(g.request_json, '$.account') = ?" : "json_extract(g.request_json, '$.account') IS NULL";
+ const rows = db()
+ .prepare(
+ `SELECT g.id FROM generations g LEFT JOIN generation_trash t ON t.generation_id = g.id
+ WHERE g.model_id = ? AND g.status IN ('queued', 'running', 'succeeded') AND t.generation_id IS NULL
+ AND json_extract(g.request_json, '$.params.extra.viewKey') = ? AND ${who}
+ ORDER BY g.created_at DESC LIMIT 1`,
+ )
+ .all(ANY_ANGLE.buildModel, key, ...(account ? [account] : [])) as { id: string }[];
+ return rows[0]?.id ?? null;
+}
+
+type Sharp = typeof import("sharp").default;
+
+/** A still (PNG, JPEG…) as RGB or one channel: at most `size.max` px on its long side, or exactly `size`. */
+async function still(sharp: Sharp, data: Buffer, channels: 1 | 3, size: { max: number } | { width: number; height: number }): Promise<Picture> {
+ let s = sharp(data).rotate();
+ s = "max" in size ? s.resize({ width: size.max, height: size.max, fit: "inside", withoutEnlargement: true }) : s.resize({ width: size.width, height: size.height, fit: "fill" });
+ s = channels === 1 ? s.removeAlpha().greyscale() : s.removeAlpha().toColourspace("srgb");
+ const { data: px, info } = await s.raw().toBuffer({ resolveWithObject: true });
+ return { width: info.width, height: info.height, channels: info.channels === 1 ? 1 : 3, data: px };
+}
+
+/** The photo (RGB, at most 512 px) and its cut-out at the same size: what the turntable is compared with. */
+export async function photoPictures(photo: Buffer, matte: Buffer): Promise<{ rgb: Picture; mask: Picture }> {
+ const sharp = (await import("sharp")).default;
+ const rgb = await still(sharp, photo, 3, { max: 512 });
+ return { rgb, mask: await still(sharp, matte, 1, { width: rgb.width, height: rgb.height }) };
+}
+
+/** The turntable's frames (an animated WebP) with their silhouettes (its coverage pass, when there is one). */
+export async function sweepFrames(colour: Buffer, coverage?: Buffer | null): Promise<SweepFrame[]> {
+ const sharp = (await import("sharp")).default;
+ const turns = await frames(sharp, colour);
+ const covers = coverage ? await frames(sharp, coverage) : [];
+ return turns.map((f, k) => ({ rgb: f, mask: silhouette(f, covers[k]) }));
+}
+
+/** Every frame of an animated WebP, as RGB. */
+async function frames(sharp: Sharp, data: Buffer): Promise<Picture[]> {
+ const { data: px, info } = await sharp(data, { animated: true }).removeAlpha().toColourspace("srgb").raw().toBuffer({ resolveWithObject: true });
+ const h = info.pageHeight ?? info.height;
+ const n = Math.max(1, Math.round(info.height / h));
+ const size = info.width * h * info.channels;
+ const out: Picture[] = [];
+ for (let k = 0; k < n; k++) {
+ const rgb = new Uint8Array(info.width * h * 3);
+ const at = k * size;
+ for (let i = 0; i < info.width * h; i++) for (let c = 0; c < 3; c++) rgb[i * 3 + c] = px[at + i * info.channels + Math.min(c, info.channels - 1)];
+ out.push({ width: info.width, height: h, channels: 3, data: rgb });
+ }
+ return out;
+}
+
+/**
+ * A frame's silhouette: the coverage RenderSplat gave, else (a coverage pass that came back empty or full) the pixels
+ * that differ from the turntable's dark background.
+ */
+function silhouette(rgb: Picture, coverage: Picture | undefined): Picture {
+ const n = rgb.width * rgb.height;
+ const m = new Uint8Array(n);
+ let on = 0;
+ if (coverage && coverage.width === rgb.width && coverage.height === rgb.height) {
+ for (let i = 0; i < n; i++) {
+ m[i] = coverage.data[i * 3] > 127 ? 255 : 0;
+ if (m[i]) on++;
+ }
+ if (on > n * 0.002 && on < n * 0.98) return { width: rgb.width, height: rgb.height, channels: 1, data: m };
+ }
+ for (let i = 0; i < n; i++) m[i] = Math.max(rgb.data[i * 3], rgb.data[i * 3 + 1], rgb.data[i * 3 + 2]) > 28 ? 255 : 0;
+ return { width: rgb.width, height: rgb.height, channels: 1, data: m };
+}
+
+const byRole = (outputs: OutputFile[], role: string) => outputs.find((o) => o.meta?.role === role);
+
+/** The photo's size and its front view, from a finished build's outputs; null when they can't be read or compared. */
+export async function measureView(photo: string, outputs: OutputFile[]): Promise<{ front: FrontView; size: { width: number; height: number } } | null> {
+ const sweep = byRole(outputs, "sweep");
+ const cover = byRole(outputs, "sweep-mask");
+ const matte = byRole(outputs, "matte");
+ if (!sweep || !matte) return null;
+ const sharp = (await import("sharp")).default;
+ const [src, cut, colour, coverage] = await Promise.all([readRef(photo), readRef(matte.url), readRef(sweep.url), cover ? readRef(cover.url) : null]);
+ const meta = await sharp(src.data).rotate().metadata();
+ const flip = (meta.orientation ?? 1) >= 5;
+ const size = { width: (flip ? meta.height : meta.width) ?? 0, height: (flip ? meta.width : meta.height) ?? 0 };
+ if (!size.width || !size.height) return null;
+ // The photo at the turntable's scale (the measure crops both to the subject first, so only the shape matters).
+ const front = measureFront(await photoPictures(src.data, cut.data), await sweepFrames(colour.data, coverage?.data));
+ return front ? { front, size } : null;
+}
+
+/**
+ * After a build's outputs are stored: its splat output with the measured front view and the photo's size (meta.front,
+ * meta.size). Null when nothing could be measured (the build fails, saying so).
+ */
+export async function withFrontView(request: Pick<GenerationRequest, "inputs">, outputs: OutputFile[]): Promise<OutputFile[] | null> {
+ const photo = request.inputs?.images?.[0];
+ const splat = byRole(outputs, "splat");
+ if (!photo || !splat) return null;
+ const view = await measureView(photo, outputs).catch((e) => {
+ console.warn(`[fuobe] any-angle: couldn't measure the front view: ${(e as Error).message}`);
+ return null;
+ });
+ if (!view) return null;
+ return outputs.map((o) => (o === splat ? { ...o, meta: { ...o.meta, front: view.front, size: view.size } } : o));
+}
diff --git a/src/server/generations.ts b/src/server/generations.ts
index 7fc303ec..6da6f12c 100644
--- a/src/server/generations.ts
+++ b/src/server/generations.ts
@@ -3,6 +3,8 @@ import fs from "node:fs";
import path from "node:path";
import { nanoid } from "nanoid";
import { getModel, getPreset } from "@/lib/catalog";
+import { ANY_ANGLE } from "@/lib/catalog/any-angle";
+import { NO_SUBJECT_MESSAGE, withFrontView } from "./any-angle";
import { applyMentions } from "@/lib/catalog/elements";
import { migrateRequest, replacedBy } from "@/lib/catalog/replaced";
import { directorFieldWords } from "@/lib/catalog/cinema";
@@ -890,7 +892,8 @@ export function createGenerations(given: GenerationRequest, opts: CreateOptions
const found = catalogModel && offeredFor(catalogModel, original.engine);
const shotModel = found && dualEngine(found) ? onEngine(found, engineFor(found, original.engine)) : found;
// An account's 3D model would be finished on this server, outside its own limits: not yet (the route refuses first).
- if (original.account && shotModel?.kind === "model3d") throw new Error(OWN_GPU_TOOL_MESSAGE);
+ // Any Angle's 3D view is the exception: a splat and its turntable, nothing to finish here.
+ if (original.account && shotModel?.kind === "model3d" && shotModel.id !== ANY_ANGLE.buildModel) throw new Error(OWN_GPU_TOOL_MESSAGE);
if (!opts.dependsOn && shotModel?.options.multiShot?.mode === "concat" && (original.params?.shots?.filter((x) => x.prompt.trim()).length ?? 0) > 1) {
return createShotFilm(original, shotModel);
}
@@ -2107,6 +2110,17 @@ async function pollOne(r: Row): Promise<void> {
}
if (cards.size) outputs.splice(0, outputs.length, ...outputs.filter((o) => !cards.has(o)));
}
+ // Any Angle's 3D view: its front view is measured on the turntable it rendered, and kept on the splat (meta.front).
+ if (r.model_id === ANY_ANGLE.buildModel) {
+ const measured = await withFrontView(JSON.parse(r.request_json) as GenerationRequest, outputs);
+ if (!measured) {
+ // Nothing of a failed build is kept, the owner's included.
+ for (const kept of outputs) if (kept.assetId) deleteAsset(kept.assetId);
+ update(r.id, { status: "failed", error: NO_SUBJECT_MESSAGE, completed_at: Date.now(), message: null });
+ return;
+ }
+ outputs.splice(0, outputs.length, ...measured);
+ }
// Fuobe Soul: what follows in the browser (the look's grade, an overlay, Soul Cinema's 21:9 crop), on each image;
// API clients read it as meta.
// A storyboard frame with a look gets the look's finish whatever model made it (a 21:9 board is cropped after).
diff --git a/src/server/providers/comfyui.ts b/src/server/providers/comfyui.ts
index 04721e17..03bf8059 100644
--- a/src/server/providers/comfyui.ts
+++ b/src/server/providers/comfyui.ts
@@ -33,6 +33,7 @@ import {
swatchPixels,
tagMetaBatch,
whisperLanguage,
+ withLoad3dImages,
type BindingKey,
type CaptionCue,
type ComfyWorkflow,
@@ -819,7 +820,17 @@ export function probeComfySync(timeoutMs = 1500): boolean {
// Building the prompt
/** Loader classes whose input is an uploaded file, and which input holds it (AusBoss's Crop + Rotate + Pad loads the upload itself). */
-const MEDIA_LOADERS: Record<string, string> = { LoadImage: "image", LoadImageMask: "image", LoadVideo: "file", VHS_LoadVideo: "video", LoadAudio: "audio", VHS_LoadAudioUpload: "audio", AUSBOSS_NODES_ImageCropRotatePad: "image" };
+const MEDIA_LOADERS: Record<string, string> = {
+ LoadImage: "image",
+ LoadImageMask: "image",
+ LoadVideo: "file",
+ VHS_LoadVideo: "video",
+ LoadAudio: "audio",
+ VHS_LoadAudioUpload: "audio",
+ AUSBOSS_NODES_ImageCropRotatePad: "image",
+ // Any Angle's saved 3D view (a .spz sent like any input).
+ Load3D: "model_file",
+};
// What we learned about each uploaded clip / track from its header (duration, size, fps, audio), by ComfyUI file name.
declare global {
@@ -945,6 +956,7 @@ const MEDIA_HINT: Record<string, string> = {
image9: "Add a ninth image",
image10: "Add a tenth image",
endImage: "Add an end frame",
+ splatFile: "Build the 3D view first",
mask: "Paint the area to change",
video: "Add a video",
video2: "Add a second clip",
@@ -1659,7 +1671,8 @@ export async function prepareWorkflow(endpointTemplate: string, input: GenInput,
// maxDimension targets for removed reference branches are expected: their scale nodes go with the loader.
const realMissing = bound.missing.filter((m) => !/^maxDimension\b/.test(m));
if (realMissing.length) throw new ProviderError(`Workflow ${manifest.id} bindings point at missing nodes: ${realMissing.join(", ")}`);
- let wf = bound.workflow;
+ // A saved 3D view read without the browser (Any Angle): Load3D's picture entries point at the run's photo.
+ let wf = withLoad3dImages(bound.workflow, typeof values.image === "string" ? values.image : undefined);
const outputIds = manifest.outputs.map((o) => o.node);
// The prompt helper (FLUX 3 Image Klein's upsampler) off, or a layout with boxes it would rewrite: the words as typed.
if (PROMPT_HELPER_GRAPHS.has(manifest.id) && (helper === "off" || laidOut)) wf = skipPromptHelper(wf, outputIds);
diff --git a/tests/any-angle-route.test.ts b/tests/any-angle-route.test.ts
new file mode 100644
index 00000000..8ddbbcfb
--- /dev/null
+++ b/tests/any-angle-route.test.ts
@@ -0,0 +1,103 @@
+import fs from "node:fs";
+import os from "node:os";
+import path from "node:path";
+import { afterAll, beforeAll, describe, expect, it } from "vitest";
+import { TINY_PNG } from "./helpers/fake-comfy-runner";
+
+// Any Angle through POST /api/generations: a second build of the same photo answers with the first one (running or
+// done) and gives the run back to the hourly count; one account never gets another's; an account may build the 3D view
+// on its own GPU (other 3D models wait for the server's finish).
+
+const dir = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-any-angle-route-"));
+process.env.FUOBE_DATA_DIR = dir;
+process.env.COMFYUI_URL = "http://127.0.0.1:9";
+process.env.FUOBE_PUBLIC_SIGNUP = "1";
+delete process.env.FUOBE_PASSWORD;
+globalThis.__fuobeTestDiskFree = 1e13;
+
+const auth = await import("@/server/auth");
+const generationsRoute = await import("@/app/api/generations/route");
+const { saveFile } = await import("@/server/storage");
+const { createGenerations } = await import("@/server/generations");
+const { viewKeyOf } = await import("@/server/any-angle");
+const { ANY_ANGLE } = await import("@/lib/catalog/any-angle");
+const { OWN_GPU_TOOL_MESSAGE } = await import("@/lib/guest-access");
+const { ACCOUNT_LIMITS } = await import("@/server/account-files");
+const { db } = await import("@/server/db");
+const { hit, peek, resetRates } = await import("@/server/rate");
+
+let a = "";
+let b = "";
+const cookies: Record<string, string> = {};
+beforeAll(() => {
+ auth.setPassword("install password");
+ a = auth.createAccount("[email protected]", "long enough").id;
+ b = auth.createAccount("[email protected]", "long enough").id;
+ cookies[a] = `${auth.SESSION_COOKIE}=${auth.createSession(a).value}`;
+ cookies[b] = `${auth.SESSION_COOKIE}=${auth.createSession(b).value}`;
+});
+afterAll(() => {
+ globalThis.__fuobeTestDiskFree = undefined;
+ try {
+ fs.rmSync(dir, { recursive: true, force: true });
+ } catch {}
+});
+
+const headers = (who: string, extra: Record<string, string> = {}) => ({ cookie: cookies[who], host: "localhost:3000", ...extra });
+const post = (who: string, body: unknown) => {
+ const text = JSON.stringify(body);
+ return generationsRoute.POST(new Request("http://localhost:3000/api/generations", { method: "POST", headers: headers(who, { "content-type": "application/json", "content-length": String(Buffer.byteLength(text)) }), body: text }));
+};
+/** The account's own upload (as POST /api/uploads stores it once its GPU is connected). */
+async function upload(who: string, name: string): Promise<string> {
+ return saveFile({ contentType: "image/png", name, source: "upload", accountId: who, data: TINY_PNG }).url;
+}
+function insertBuild(id: string, account: string, photo: string, key: string) {
+ const now = Date.now();
+ const request = { feature: ANY_ANGLE.stepFeature, modelId: ANY_ANGLE.buildModel, op: "splat", engine: "open", inputs: { images: [photo] }, params: { extra: { viewKey: key } }, account };
+ db()
+ .prepare(
+ `INSERT INTO generations (id, feature, model_id, engine, provider, op, kind, status, progress, message, request_json, external_id, external_meta_json, outputs_json, created_at, updated_at)
+ VALUES (?, ?, ?, 'open', 'comfyui', 'splat', 'model3d', 'running', 0.5, NULL, ?, ?, '{}', '[]', ?, ?)`,
+ )
+ .run(id, ANY_ANGLE.stepFeature, ANY_ANGLE.buildModel, JSON.stringify(request), `prompt-${id}`, now, now);
+}
+const build = (photo: string, params?: Record<string, unknown>) => ({ feature: ANY_ANGLE.stepFeature, modelId: ANY_ANGLE.buildModel, op: "splat", engine: "open", inputs: { images: [photo] }, ...(params && { params }) });
+
+describe("Any Angle's 3D view through the route", () => {
+ it("answers a second build of the same photo with the first, gives the run back, and never crosses accounts", async () => {
+ resetRates();
+ const first = await upload(a, "me.png");
+ insertBuild("view-a", a, first, viewKeyOf(TINY_PNG));
+ // The same photo under another name, at the edge of the hourly count, with a seed of its own.
+ const again = await upload(a, "same photo, new name.png");
+ const key = `run:${a}`;
+ for (let i = 0; i < ACCOUNT_LIMITS.runsPerHour - 1; i++) hit(key, ACCOUNT_LIMITS.runsPerHour, 60 * 60_000);
+ const r = await post(a, build(again, { seed: 7 }));
+ expect(r.status).toBe(201);
+ expect(((await r.json()) as { items: { id: string }[] }).items.map((g) => g.id)).toEqual(["view-a"]);
+ // The run was given back: one more still fits this hour.
+ expect(peek(key, ACCOUNT_LIMITS.runsPerHour, 60 * 60_000).ok).toBe(true);
+
+ // Another account with the very same picture doesn't get it.
+ resetRates();
+ const theirs = await upload(b, "me.png");
+ const other = await post(b, build(theirs));
+ const body = (await other.json()) as { items?: { id: string }[] };
+ expect(body.items?.map((g) => g.id) ?? []).not.toContain("view-a");
+ });
+
+ it("lets an account build the 3D view on its own GPU (other 3D models wait for the server's finish)", async () => {
+ const photo = await upload(a, "build.png");
+ let refused: unknown = null;
+ try {
+ createGenerations({ ...build(photo), account: a } as never);
+ } catch (e) {
+ refused = e;
+ }
+ // Whatever else stops it here (no GPU connected in this test), it isn't the 3D finish that keeps accounts out.
+ expect((refused as Error | null)?.message ?? "").not.toBe(OWN_GPU_TOOL_MESSAGE);
+ expect(() => createGenerations({ feature: "image-to-3d", modelId: "oss-triposplat", op: "splat", engine: "open", inputs: { images: [photo] }, account: a } as never)).toThrow(OWN_GPU_TOOL_MESSAGE);
+
+ });
+});
diff --git a/tests/any-angle-server.test.ts b/tests/any-angle-server.test.ts
new file mode 100644
index 00000000..3db0c2dc
--- /dev/null
+++ b/tests/any-angle-server.test.ts
@@ -0,0 +1,144 @@
+import fs from "node:fs";
+import os from "node:os";
+import path from "node:path";
+import sharp from "sharp";
+import { afterAll, describe, expect, it, vi } from "vitest";
+import { ANY_ANGLE, SWEEP, viewOf, wrapYaw } from "@/lib/catalog/any-angle";
+
+// Any Angle on the server (src/server/any-angle.ts): when a 3D view's build succeeds, its front view is measured on the
+// turntable it rendered and kept on the splat (an angle's camera starts there); a photo's view is found again by the
+// photo's content for the same owner or account, never for someone else, and a build that failed is built again.
+
+vi.setConfig({ testTimeout: 60_000 });
+const dir = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-any-angle-"));
+process.env.FUOBE_DATA_DIR = dir;
+process.env.COMFYUI_URL = "http://127.0.0.1:9";
+
+const gens = await import("@/server/generations");
+const { db } = await import("@/server/db");
+const { provider } = await import("@/server/providers");
+const { saveFile } = await import("@/server/storage");
+const { findView, viewKeyOf, requestViewKey, NO_SUBJECT_MESSAGE } = await import("@/server/any-angle");
+
+afterAll(() => {
+ try {
+ fs.rmSync(dir, { recursive: true, force: true });
+ } catch {}
+});
+
+/** A figure on a turntable (as in tests/any-angle.test.ts): its body's width, colour and side stripe follow the turn. */
+function figure(size: number, yaw: number): { rgb: Buffer; mask: Buffer } {
+ const rgb = Buffer.alloc(size * size * 3);
+ const mask = Buffer.alloc(size * size * 3);
+ const t = (yaw * Math.PI) / 180;
+ const half = (0.12 + 0.1 * Math.abs(Math.cos(t))) * size;
+ const stripe = Math.sin(t) * half * 0.7;
+ const cx = size / 2;
+ for (let y = 0; y < size; y++) {
+ for (let x = 0; x < size; x++) {
+ const head = (x - cx) ** 2 + (y - 0.2 * size) ** 2 < (0.08 * size) ** 2;
+ const neck = y >= 0.27 * size && y < 0.31 * size && Math.abs(x - cx) < 0.03 * size;
+ const body = y >= 0.31 * size && y < 0.92 * size && Math.abs(x - cx) < half;
+ const i = (y * size + x) * 3;
+ if (!head && !neck && !body) {
+ rgb.fill(16, i, i + 3);
+ continue;
+ }
+ mask.fill(255, i, i + 3);
+ const onStripe = body && Math.abs(x - cx - stripe) < 0.03 * size;
+ rgb[i] = onStripe ? 250 : head ? 200 : Math.round(140 + 100 * Math.cos(t));
+ rgb[i + 1] = onStripe ? 250 : head ? 150 : 90;
+ rgb[i + 2] = onStripe ? 30 : head ? 120 : Math.round(140 - 100 * Math.cos(t));
+ }
+ }
+ return { rgb, mask };
+}
+
+const png = (raw: Buffer, size: number) => sharp(raw, { raw: { width: size, height: size, channels: 3 } }).png().toBuffer();
+const dataUri = (b: Buffer, type: string) => `data:${type};base64,${b.toString("base64")}`;
+
+async function sweep(): Promise<{ colour: Buffer; coverage: Buffer }> {
+ const frames = Array.from({ length: SWEEP.frames }, (_, k) => figure(96, (360 * k) / SWEEP.frames));
+ const join = async (parts: Buffer[]) => sharp(await Promise.all(parts.map((p) => png(p, 96))), { join: { animated: true } }).webp({ lossless: true }).toBuffer();
+ return { colour: await join(frames.map((f) => f.rgb)), coverage: await join(frames.map((f) => f.mask)) };
+}
+
+function insertBuild(id: string, request: Record<string, unknown>) {
+ const now = Date.now();
+ db()
+ .prepare(
+ `INSERT INTO generations (id, feature, model_id, engine, provider, op, kind, status, progress, message, request_json, external_id, external_meta_json, outputs_json, created_at, updated_at)
+ VALUES (?, ?, ?, 'open', 'comfyui', 'splat', 'model3d', 'running', 0.5, NULL, ?, ?, '{}', '[]', ?, ?)`,
+ )
+ .run(id, ANY_ANGLE.stepFeature, ANY_ANGLE.buildModel, JSON.stringify(request), `prompt-${id}`, now, now);
+}
+
+const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
+async function settled(id: string, ms = 30_000) {
+ const end = Date.now() + ms;
+ for (;;) {
+ const g = gens.getGeneration(id);
+ if (g && g.status !== "running" && g.status !== "queued") return g;
+ if (Date.now() > end) throw new Error(`timed out waiting for ${id}`);
+ await sleep(50);
+ }
+}
+
+describe("a 3D view's build", () => {
+ const comfy = provider("comfyui");
+ const realPoll = comfy.poll;
+ afterAll(() => {
+ comfy.poll = realPoll;
+ });
+
+ it("measures the photo's front view on its turntable, keeps it on the splat, and is found again by the photo", async () => {
+ const shot = figure(384, 60);
+ const photoData = await png(shot.rgb, 384);
+ const photo = saveFile({ contentType: "image/png", name: "photo.png", source: "upload", data: photoData });
+ const key = viewKeyOf(photoData);
+ expect(await requestViewKey({ inputs: { images: [photo.url] } })).toBe(key);
+ const { colour, coverage } = await sweep();
+ const outputs = (matte: Buffer) => [
+ { url: dataUri(Buffer.from("NGSP-test"), "application/octet-stream"), kind: "model3d", contentType: "application/octet-stream", meta: { role: "splat", format: "spz" } },
+ { url: dataUri(colour, "image/webp"), kind: "image", contentType: "image/webp", meta: { role: "sweep" } },
+ { url: dataUri(coverage, "image/webp"), kind: "image", contentType: "image/webp", meta: { role: "sweep-mask" } },
+ { url: dataUri(matte, "image/png"), kind: "image", contentType: "image/png", meta: { role: "matte" } },
+ ];
+ const matte = await png(shot.mask, 384);
+ const empty = await png(Buffer.alloc(384 * 384 * 3), 384);
+ comfy.poll = async (ctx) => ({ state: "succeeded", outputs: ctx.externalId === "prompt-nobody" ? outputs(empty) : outputs(matte) }) as never;
+
+ const request = { feature: ANY_ANGLE.stepFeature, modelId: ANY_ANGLE.buildModel, op: "splat", inputs: { images: [photo.url] }, params: { extra: { viewKey: key } } };
+ insertBuild("view-1", request);
+ gens.ensureRunner();
+ const g = await settled("view-1");
+ expect(g.status).toBe("succeeded");
+ const view = viewOf(g)!;
+ expect(view).not.toBeNull();
+ expect(Math.abs(wrapYaw(view.front.yaw - 60))).toBeLessThanOrEqual(360 / SWEEP.frames);
+ expect(view.front.person).toBe(true);
+ expect(view.size).toEqual({ width: 384, height: 384 });
+
+ // The same photo finds this view for the owner, never for an account, and the account's own view is its own.
+ expect(findView(key, undefined)).toBe("view-1");
+ expect(findView(key, "acct-1")).toBeNull();
+ insertBuild("view-acct", { ...request, account: "acct-1" });
+ expect(findView(key, "acct-1")).toBe("view-acct");
+ expect(findView(key, undefined)).toBe("view-1");
+ expect(findView(`${key.slice(0, -2)}x`, undefined)).toBeNull();
+
+ // A build with no subject to compare fails in words, keeps none of its files (the owner's included), and isn't found
+ // again (the next try builds it anew).
+ const assets = () => (db().prepare("SELECT COUNT(*) AS n FROM assets").get() as { n: number }).n;
+ const before = assets();
+ insertBuild("nobody", { ...request, params: { extra: { viewKey: "other" } } });
+ const failed = await settled("nobody");
+ expect(failed.status).toBe("failed");
+ expect(failed.error).toBe(NO_SUBJECT_MESSAGE);
+ expect(assets()).toBe(before);
+ expect(findView("other", undefined)).toBeNull();
+ // A view in the Trash isn't found either.
+ gens.deleteGeneration("view-1");
+ expect(findView(key, undefined)).toBeNull();
+ });
+});
diff --git a/tests/any-angle.test.ts b/tests/any-angle.test.ts
new file mode 100644
index 00000000..10b81fe0
--- /dev/null
+++ b/tests/any-angle.test.ts
@@ -0,0 +1,327 @@
+import fs from "node:fs";
+import path from "node:path";
+import { describe, expect, it, vi } from "vitest";
+import {
+ ANGLE_PRESETS,
+ ANY_ANGLE,
+ anyAngleHref,
+ asSubject,
+ cameraFor,
+ clampCustom,
+ closeUpFactor,
+ CUSTOM_LIMITS,
+ customCamera,
+ customLabel,
+ fromAnglesApp,
+ fromFuobeAngles,
+ fromOrbit,
+ orbitOf,
+ PORTRAIT_MAX_PITCH,
+ presetById,
+ presetsFor,
+ renderSize,
+ sheetLayout,
+ shotExtra,
+ SWEEP,
+ viewOf,
+ wrapYaw,
+ type FrontView,
+} from "@/lib/catalog/any-angle";
+import { findHead, measureFront, type Picture, type SweepFrame } from "@/lib/any-angle-front";
+import { APPS, getModel } from "@/lib/catalog";
+import { OWN_ROUTE_APPS } from "@/lib/catalog/preset-recipe-routes";
+import { loraEntry } from "@/lib/catalog/loras";
+import { graphProblem } from "@/lib/local-comfy";
+import { withLoad3dImages, type ComfyWorkflow } from "@/lib/comfy";
+import { model3dView } from "@/lib/av/model3d";
+import { outputActions } from "@/lib/output-actions";
+import type { Generation } from "@/lib/catalog/types";
+
+// Any Angle (app-any-angle): the cameras, the per-photo front view, the graphs, the wiring and the words visitors read.
+
+vi.setConfig({ testTimeout: 30_000 });
+
+const ROOT = path.resolve(__dirname, "..");
+const read = (p: string) => fs.readFileSync(path.join(ROOT, p), "utf8");
+type Node = { class_type: string; inputs: Record<string, unknown> };
+const graph = (id: string) => JSON.parse(read(`workflows/comfyui/${id}.json`)) as Record<string, Node>;
+const nodes = (g: Record<string, Node>, cls: string) => Object.values(g).filter((n) => n.class_type === cls);
+
+/** A full-length person photo's front view, as the GPU test measured one (yaw 125). */
+const FULL: FrontView = { yaw: 125, pitch: 10, distance: 1.83, fov: 33, faceY: 0.39, person: true, headShare: 0.14, score: 0.8, span: [-0.5, 0.46] };
+const PORTRAIT: FrontView = { ...FULL, yaw: 75, distance: 1.73, faceY: 0.22, headShare: 0.5 };
+const BAG: FrontView = { ...FULL, yaw: 90, distance: 2.9, faceY: 0, person: false, headShare: 0 };
+
+describe("the cameras", () => {
+ it("turns from the photo's own front view: left is the front yaw minus the turn, right plus, and they mirror", () => {
+ const left = cameraFor(FULL, presetById("left-30")!);
+ const right = cameraFor(FULL, presetById("right-30")!);
+ expect(left).toMatchObject({ yaw: 95, pitch: 10, distance: 1.83, fov: 33, target: [0, 0, 0] });
+ expect(right.yaw).toBe(155);
+ expect(left.yaw - FULL.yaw).toBe(-(right.yaw - FULL.yaw));
+ expect(cameraFor(FULL, presetById("left-60")!).yaw).toBe(65);
+ // A yaw wraps into (-180, 180].
+ expect(cameraFor({ ...FULL, yaw: 170 }, presetById("right-60")!).yaw).toBe(-130);
+ expect(wrapYaw(540)).toBe(180);
+ expect(wrapYaw(-190)).toBe(170);
+ });
+
+ it("keeps the high angle at 35° above level on a portrait, and the low angle at 25° under the front", () => {
+ expect(cameraFor(FULL, presetById("above")!).pitch).toBe(40);
+ expect(cameraFor(PORTRAIT, presetById("above")!).pitch).toBe(PORTRAIT_MAX_PITCH);
+ expect(cameraFor(FULL, presetById("below")!).pitch).toBe(-15);
+ expect(cameraFor(FULL, presetById("below")!).distance).toBe(1.74);
+ });
+
+ it("aims the close-up at the face, nearer for a full-length photo than for a portrait", () => {
+ const full = cameraFor(FULL, presetById("close-up")!);
+ expect(full.target).toEqual([0, 0.39, 0]);
+ expect(full.distance).toBeLessThan(FULL.distance * 0.5);
+ expect(closeUpFactor(PORTRAIT)).toBe(0.75);
+ expect(closeUpFactor(BAG)).toBe(0.5);
+ expect(cameraFor(BAG, presetById("close-up")!).target).toEqual([0, 0, 0]);
+ });
+
+ it("offers the view from behind for people only, and the visitor can say what the photo shows", () => {
+ expect(presetsFor(FULL).map((p) => p.id)).toContain("behind");
+ expect(presetsFor(BAG).map((p) => p.id)).not.toContain("behind");
+ expect(presetsFor(asSubject(BAG, true)).map((p) => p.id)).toContain("behind");
+ expect(asSubject(BAG, true).faceY).toBeGreaterThan(0.3);
+ expect(asSubject(FULL, false)).toMatchObject({ person: false, faceY: 0, headShare: 0 });
+ // Every preset has a label a visitor reads and a turn within the tested range.
+ for (const p of ANGLE_PRESETS) {
+ expect(p.label).toMatch(/^[A-Z]/);
+ expect(Math.abs(p.yaw)).toBeLessThanOrEqual(p.people ? 135 : 60);
+ }
+ });
+
+ it("keeps a camera turned by hand inside what the tests covered", () => {
+ expect(clampCustom(FULL, { yaw: 170, pitch: 80, distance: 3 })).toEqual({ yaw: CUSTOM_LIMITS.yawPeople, pitch: CUSTOM_LIMITS.pitchMax, distance: CUSTOM_LIMITS.distanceMax });
+ expect(clampCustom(BAG, { yaw: -170, pitch: -60, distance: 0.1 })).toEqual({ yaw: -CUSTOM_LIMITS.yawObjects, pitch: CUSTOM_LIMITS.pitchMin, distance: CUSTOM_LIMITS.distanceMin });
+ expect(clampCustom(PORTRAIT, { yaw: 0, pitch: 40, distance: 1 }).pitch).toBe(PORTRAIT_MAX_PITCH - PORTRAIT.pitch);
+ expect(customCamera(FULL, { yaw: -40, pitch: 10, distance: 0.8 })).toMatchObject({ yaw: 85, pitch: 20, distance: 1.46 });
+ expect(customLabel({ yaw: 40, pitch: 8, distance: 0.7 })).toBe("Custom · 40° right, slightly above, closer");
+ expect(customLabel({ yaw: 0, pitch: 0, distance: 1 })).toBe("Custom · front");
+ });
+
+ it("reads the desktop 3D view's camera back as the same turn, height and distance", () => {
+ expect(orbitOf(FULL)).toBe("125deg 80deg 1.83m");
+ expect(fromOrbit(FULL, { theta: 125, phi: 80, radius: 1.83 })).toEqual({ yaw: 0, pitch: 0, distance: 1 });
+ expect(fromOrbit(FULL, { theta: 85, phi: 60, radius: 0.915 })).toEqual({ yaw: -40, pitch: 20, distance: 0.5 });
+ });
+
+ it("maps Fuobe Angles' and Angles' controls for a later switch", () => {
+ expect(fromFuobeAngles({ rotate_right_left: 45, vertical_angle: -1, move_forward: 10 })).toEqual({ yaw: -45, pitch: 40, distance: 0.5 });
+ expect(fromFuobeAngles({ vertical_angle: 1, move_forward: 5 })).toEqual({ yaw: -0, pitch: -25, distance: 0.75 });
+ expect(fromAnglesApp({ horizontal_angle: 315, vertical_angle: 30, zoom: 0 })).toEqual({ yaw: -45, pitch: 30, distance: 1.6 });
+ expect(fromAnglesApp({ horizontal_angle: 90, zoom: 10 })).toEqual({ yaw: 90, pitch: 0, distance: 0.5 });
+ });
+
+ it("renders at the photo's shape, at most 2048 px, in steps of 8, and sends the graph its settings", () => {
+ expect(renderSize(1536, 1152)).toEqual({ width: 1536, height: 1152 });
+ expect(renderSize(4000, 3000)).toEqual({ width: 2048, height: 1536 });
+ expect(renderSize(1001, 1999)).toEqual({ width: 1000, height: 1992 });
+ const extra = shotExtra(cameraFor(FULL, presetById("close-up")!), { width: 1536, height: 1152 }, "/api/files/a/s.spz");
+ expect(extra).toMatchObject({ splatFile: "/api/files/a/s.spz", cameraYaw: 125, targetY: 0.39, width: 1536, height: 1152 });
+ });
+});
+
+describe("the front view of a photo", () => {
+ /** A figure on a turntable: a body whose width, colour and side stripe change with the turn, and a head. */
+ function figure(size: number, yaw: number): { rgb: Picture; mask: Picture } {
+ const rgb = new Uint8Array(size * size * 3);
+ const mask = new Uint8Array(size * size);
+ const t = (yaw * Math.PI) / 180;
+ const half = (0.12 + 0.1 * Math.abs(Math.cos(t))) * size;
+ const stripe = Math.sin(t) * half * 0.7;
+ const cx = size / 2;
+ for (let y = 0; y < size; y++) {
+ for (let x = 0; x < size; x++) {
+ const head = (x - cx) ** 2 + (y - 0.2 * size) ** 2 < (0.08 * size) ** 2;
+ const neck = y >= 0.27 * size && y < 0.31 * size && Math.abs(x - cx) < 0.03 * size;
+ const body = y >= 0.31 * size && y < 0.92 * size && Math.abs(x - cx) < half;
+ if (!head && !neck && !body) continue;
+ const i = y * size + x;
+ mask[i] = 255;
+ const onStripe = body && Math.abs(x - cx - stripe) < 0.03 * size;
+ const front = Math.cos(t);
+ rgb[i * 3] = onStripe ? 250 : head ? 200 : Math.round(140 + 100 * front);
+ rgb[i * 3 + 1] = onStripe ? 250 : head ? 150 : 90;
+ rgb[i * 3 + 2] = onStripe ? 30 : head ? 120 : Math.round(140 - 100 * front);
+ }
+ }
+ return { rgb: { width: size, height: size, channels: 3, data: rgb }, mask: { width: size, height: size, channels: 1, data: mask } };
+ }
+
+ const sweep = (n: number): SweepFrame[] => Array.from({ length: n }, (_, k) => figure(96, (360 * k) / n));
+
+ it("finds the turn the photo was taken from on the turntable, and the distance it fills the frame at", () => {
+ const frames = sweep(SWEEP.frames);
+ for (const yaw of [60, 135, 255]) {
+ const front = measureFront(figure(192, yaw), frames)!;
+ expect(Math.abs(wrapYaw(front.yaw - yaw))).toBeLessThanOrEqual(360 / SWEEP.frames);
+ expect(front.distance).toBeCloseTo(SWEEP.distance, 1);
+ expect(front.person).toBe(true);
+ expect(front.faceY).toBeGreaterThan(0);
+ }
+ });
+
+ it("tells a head on shoulders from an object", () => {
+ expect(findHead(figure(192, 0).mask)).toMatchObject({ share: expect.any(Number) });
+ const box = new Uint8Array(100 * 100);
+ for (let y = 20; y < 90; y++) for (let x = 25; x < 75; x++) box[y * 100 + x] = 255;
+ expect(findHead({ width: 100, height: 100, channels: 1, data: box })).toBeNull();
+ });
+
+ it("is required before an angle can be made: a build without a measured front view has no view", () => {
+ const outputs = [
+ { url: "/api/files/a/s.spz", kind: "model3d" as const, meta: { role: "splat" } },
+ { url: "/api/files/a/t.mp4", kind: "video" as const, meta: { role: "turntable" } },
+ ];
+ expect(viewOf({ outputs })).toBeNull();
+ outputs[0].meta = { role: "splat", front: FULL, size: { width: 1536, height: 1152 } } as never;
+ expect(viewOf({ outputs })).toEqual({ splat: "/api/files/a/s.spz", turntable: "/api/files/a/t.mp4", mesh: undefined, front: FULL, size: { width: 1536, height: 1152 } });
+ });
+});
+
+describe("the graphs", () => {
+ it("paints each angle with one model loader and the AnyAngle LoRA loaded once, as the GPU test settled", () => {
+ const g = graph(ANY_ANGLE.shotGraph);
+ expect(nodes(g, "UNETLoader")).toHaveLength(1);
+ expect(nodes(g, "UNETLoader")[0].inputs.unet_name).toBe("qwen_image_2.1_int8_convrot.safetensors");
+ const loras = nodes(g, "LoraLoaderModelOnly");
+ expect(loras).toHaveLength(1);
+ expect(loras[0].inputs).toMatchObject({ lora_name: ANY_ANGLE.loraFile, strength_model: 1 });
+ const enc = nodes(g, "TextEncodeQwenImage21")[0];
+ expect(enc.inputs.prompt).toBe(ANY_ANGLE.prompt);
+ // The original is image 1, the render image 2.
+ const load = Object.entries(g).find(([, n]) => n.class_type === "LoadImage")![0];
+ const render = Object.entries(g).find(([, n]) => n.class_type === "RenderSplat")![0];
+ expect(enc.inputs["images.image_1"]).toEqual([load, 0]);
+ expect(enc.inputs["images.image_2"]).toEqual([render, 0]);
+ expect(nodes(g, "KSampler")[0].inputs).toMatchObject({ steps: 25, cfg: 1, sampler_name: "euler", scheduler: "simple" });
+ expect(nodes(g, "RenderSplat")[0].inputs.background).toBe("#000000");
+ expect(nodes(g, "Load3D")).toHaveLength(1);
+ });
+
+ it("builds the 3D view from the cut-out with fixed seeds, and saves the splat, the turntable, the sweep and a GLB", () => {
+ const g = graph(ANY_ANGLE.buildGraph);
+ const pre = nodes(g, "TripoSplatPreprocessImage")[0];
+ expect(g[(pre.inputs.mask as [string, number])[0]].class_type).toBe("RemoveBackground");
+ expect(nodes(g, "KSampler")[0].inputs.seed).toBe(ANY_ANGLE.buildSeed);
+ expect(nodes(g, "VAEDecodeTripoSplat")[0].inputs.seed).toBe(ANY_ANGLE.buildSeed);
+ expect(nodes(g, "RenderSplat")[0].inputs).toMatchObject({ frames: SWEEP.frames });
+ expect(nodes(g, "CreateCameraInfo")[0].inputs).toMatchObject({ "mode.yaw": SWEEP.yaw, "mode.pitch": SWEEP.pitch, "mode.distance": SWEEP.distance, fov: SWEEP.fov });
+ expect(nodes(g, "SplatToMesh")).toHaveLength(1);
+ const manifest = JSON.parse(read("workflows/comfyui/manifest.json")) as { workflows: { id: string; outputs: { role?: string }[]; bindings: Record<string, unknown> }[] };
+ const roles = manifest.workflows.find((w) => w.id === ANY_ANGLE.buildGraph)!.outputs.map((o) => o.role);
+ expect(roles).toEqual(expect.arrayContaining(["splat", "turntable", "sweep", "sweep-mask", "matte", "mesh"]));
+ const shot = manifest.workflows.find((w) => w.id === ANY_ANGLE.shotGraph)!;
+ for (const k of Object.keys(shotExtra(cameraFor(FULL, ANGLE_PRESETS[0]), { width: 8, height: 8 }, "x"))) expect(shot.bindings).toHaveProperty(k);
+ });
+
+ it("reads the saved 3D view on a GPU of one's own only from files the run sent", () => {
+ const wf = { "2": { class_type: "Load3D", inputs: { model_file: "x.spz", image: { image: "a.png", mask: "a.png", normal: "a.png", recording: "", camera_info: null }, width: 1, height: 1 } } } as unknown as ComfyWorkflow;
+ const bound = withLoad3dImages(wf, "fuobe_photo.png") as unknown as Record<string, Node>;
+ expect(bound["2"].inputs.image).toMatchObject({ image: "fuobe_photo.png", mask: "fuobe_photo.png", normal: "fuobe_photo.png" });
+ const staged = ["fuobe_photo.png", "fuobe_view.spz"];
+ expect(graphProblem({ "2": { class_type: "Load3D", inputs: { ...bound["2"].inputs, model_file: "fuobe_view.spz" } } }, staged)).toBeNull();
+ expect(graphProblem({ "2": { class_type: "Load3D", inputs: { ...bound["2"].inputs, model_file: "3d/someone_else.spz" } } }, staged)).toMatch(/didn't send/);
+ expect(graphProblem({ "2": { class_type: "Load3D", inputs: { model_file: "fuobe_view.spz", image: { image: "private.png", mask: "", normal: "", recording: "" } } } }, staged)).toMatch(/didn't send/);
+ });
+});
+
+describe("the LoRA pin", () => {
+ it("is pinned to the measured revision, size and sha256, and listed for the GPU check", () => {
+ const pins = JSON.parse(read("workflows/comfyui/model-pins.json")) as Record<string, { revision: string; sizeBytes: number; sha256: string }>;
+ const url = "https://huggingface.co/lilylilith/QI_2.1_AnyAngle/resolve/5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae/QI2.1_AnyAngle.safetensors";
+ expect(pins[url]).toEqual({ revision: "5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae", sizeBytes: 119590312, sha256: "e4d7a0d44a45ed62daabd0f2484a1a59046618a4c47e76b1eab5e386a7a35d8a" });
+ const req = JSON.parse(read("workflows/comfyui/requirements.json")) as { files: Record<string, { pinnedUrl: string }>; workflows: Record<string, { files: string[] }> };
+ expect(req.files["loras/QI2.1_AnyAngle.safetensors"].pinnedUrl).toBe(url);
+ expect(req.workflows[ANY_ANGLE.shotGraph].files).toContain("loras/QI2.1_AnyAngle.safetensors");
+ expect(loraEntry(ANY_ANGLE.loraKey)).toMatchObject({ file: ANY_ANGLE.loraFile, sha256: "e4d7a0d44a45ed62daabd0f2484a1a59046618a4c47e76b1eab5e386a7a35d8a", sizeBytes: 119590312 });
+ });
+});
+
+describe("the app", () => {
+ const app = APPS.find((a) => a.id === ANY_ANGLE.appId)!;
+
+ it("is a Camera app of its own, after Fuobe Angles, on the GPU only", () => {
+ expect(app).toMatchObject({ name: "Any Angle", category: "Camera", tool: "any-angle", cloud: null, look: { icon: "Rotate3d" } });
+ expect(app.badges).toContain("new");
+ expect(app.open).toMatchObject({ modelId: ANY_ANGLE.shotModel });
+ const camera = APPS.filter((a) => a.category === "Camera").map((a) => a.id);
+ expect(camera.indexOf(ANY_ANGLE.appId)).toBe(camera.indexOf("app-fuobe-angles") + 1);
+ expect(OWN_ROUTE_APPS.has(ANY_ANGLE.appId)).toBe(true);
+ for (const id of [ANY_ANGLE.shotModel, ANY_ANGLE.buildModel]) {
+ const m = getModel(id)!;
+ expect(m.hidden).toBe(true);
+ expect(m.routes.every((r) => r.provider === "comfyui")).toBe(true);
+ }
+ expect(getModel(ANY_ANGLE.shotModel)!.routes[0].endpoint).toBe(ANY_ANGLE.shotGraph);
+ expect(getModel(ANY_ANGLE.buildModel)!.routes[0].endpoint).toBe(ANY_ANGLE.buildGraph);
+ });
+
+ it("is a step away from any picture in Library, and from a 3D splat result", () => {
+ const g = { id: "g1", status: "succeeded", feature: "image", op: "t2i", outputs: [{ url: "/api/files/out/p.png", kind: "image" }], request: {}, createdAt: "" } as unknown as Generation;
+ expect(outputActions(g, 0).find((a) => a.id === "new-angle")).toMatchObject({ label: "New angle", href: anyAngleHref("/api/files/out/p.png") });
+ expect(anyAngleHref("/api/files/out/p.png")).toBe("/apps/app-any-angle?image=%2Fapi%2Ffiles%2Fout%2Fp.png");
+ });
+
+ it("shows a splat's GLB in the 3D viewer and offers both downloads", () => {
+ const g = {
+ outputs: [
+ { url: "/api/files/a/s.spz", kind: "model3d", meta: { role: "splat", format: "spz" } },
+ { url: "/api/files/a/t.mp4", kind: "video", meta: { role: "turntable" } },
+ { url: "/api/files/a/m.glb", kind: "model3d", meta: { role: "mesh" } },
+ ],
+ request: { inputs: { images: ["/api/files/a/p.png"] } },
+ } as unknown as Generation;
+ const view = model3dView(g);
+ expect(view.splat?.url).toBe("/api/files/a/s.spz");
+ expect(view.glb).toBe("/api/files/a/m.glb");
+ expect(view.web).toBe("/api/files/a/m.glb");
+ expect(model3dView({ ...g, outputs: g.outputs.slice(0, 2) }).glb).toBeUndefined();
+ });
+
+ it("speaks plainly to visitors: no model or file names, no beta, no internal status", () => {
+ const strip = (s: string) => s.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^:"'])\/\/.*$/gm, "$1");
+ const page = strip(read("src/components/any-angle/any-angle-tool.tsx"));
+ // What a visitor reads: text between tags, and strings and templates that start with a capital (class names and ids don't).
+ const shown = [...page.matchAll(/>\s*([A-Z][^<>{}=;]*)/g), ...page.matchAll(/"([A-Z][^"]*)"/g), ...page.matchAll(/`([A-Z][^`]*)`/g)].map((m) => m[1]);
+ expect(shown.length).toBeGreaterThan(20);
+ // The one name allowed is the notice the 3D view's image encoder asks for.
+ const words = [...shown, app.description, app.parity ?? "", ...ANGLE_PRESETS.map((p) => p.label)].join(" \n ").replace("Built with DINOv3", "");
+ expect(page).toContain("Built with DINOv3");
+ for (const banned of [/qwen/i, /tripo/i, /lora/i, /splat/i, /\.spz/i, /comfy/i, /\bbeta\b/i, /\bdino/i, /birefnet/i, /unverified|not checked|placeholder/i]) expect(words).not.toMatch(banned);
+ expect(words).toContain("Build 3D view");
+ expect(words).toContain("Use this view");
+ expect(words).toContain("Drag to turn. Scroll to move closer.");
+ });
+
+ it("works by taps at phone width: the angles are buttons in a two-column grid, the drag view a desktop extra", () => {
+ const page = read("src/components/any-angle/any-angle-tool.tsx");
+ expect(page).toMatch(/grid grid-cols-2 gap-2/);
+ expect(page).toMatch(/aria-pressed=\{on\.has\(p\.key\)\}/);
+ expect(page).toMatch(/title="Turn it yourself"[^\n]*className="hidden md:block"/);
+ });
+});
+
+describe("the contact sheet", () => {
+ it("puts the original large on the left and the angles in two rows, leaving out the ones that failed", () => {
+ const ten = sheetLayout({ width: 1184, height: 896 }, ANGLE_PRESETS.map((p) => p.label).concat("A", "B"));
+ expect(ten.tiles[0]).toMatchObject({ label: "Original", index: -1, x: 16, y: 16 });
+ const angles = ten.tiles.slice(1);
+ expect(angles).toHaveLength(10);
+ expect(new Set(angles.map((t) => t.y)).size).toBe(2);
+ expect(new Set(angles.map((t) => t.x)).size).toBe(5);
+ expect(ten.tiles[0].h).toBeGreaterThan(angles[0].h);
+ for (const t of ten.tiles) {
+ expect(t.x + t.w).toBeLessThanOrEqual(ten.width);
+ expect(t.y + t.h).toBeLessThanOrEqual(ten.height);
+ }
+ const seven = sheetLayout({ width: 1184, height: 896 }, ["a", "b", "c", "d", "e", "f", "g"]);
+ expect(seven.tiles.slice(1)).toHaveLength(7);
+ expect(seven.width).toBeLessThan(ten.width);
+ });
+});
diff --git a/tests/comfy-library-4.test.ts b/tests/comfy-library-4.test.ts
index 8b7cf3db..390693e4 100644
--- a/tests/comfy-library-4.test.ts
+++ b/tests/comfy-library-4.test.ts
@@ -62,6 +62,8 @@ const ROLES: NonNullable<ManifestOutput["role"]>[] = [
"master",
// DBS soundtrack separation: the pack's own report of the run (model, device, windows, seconds).
"report",
+ // Any Angle: the turntable a photo's front view is measured on (colour, coverage), and a GLB made from a splat.
+ "sweep", "sweep-mask", "mesh",
];
describe("round-4 ComfyUI workflows", () => {
@@ -129,6 +131,10 @@ describe("round-4 ComfyUI workflows", () => {
"video-person-remove-h3-relay",
"video-character-swap-h3-segment",
"video-mask-h3-relay",
+ // Any Angle's two graphs: run end to end on the GPU, they wait for their /prompt check while that ComfyUI is busy
+ // rendering (the app stays the owner's until then: src/server/any-angle-live.ts).
+ "any-angle-3d",
+ "any-angle-shot",
"video-regenerate-h3",
]);
for (const w of manifest.workflows) for (const o of w.outputs) if (o.role) expect(ROLES, `${w.id} ${o.role}`).toContain(o.role);
diff --git a/tests/library-pure.test.ts b/tests/library-pure.test.ts
index c2b8a9b4..07c4e509 100644
--- a/tests/library-pure.test.ts
+++ b/tests/library-pure.test.ts
@@ -73,6 +73,7 @@ describe("outputActions", () => {
"menu:relight",
"menu:live-edit",
"menu:upscale",
+ "menu:new-angle",
"menu:reference",
"menu:grade",
"menu:layers",
diff --git a/tests/licences.test.ts b/tests/licences.test.ts
index ad751e4f..503a52e9 100644
--- a/tests/licences.test.ts
+++ b/tests/licences.test.ts
@@ -84,9 +84,9 @@ describe("licences", () => {
const list = buildLicenceList(MODELS, manifest.workflows);
expect(list.notices.find((n) => n.text === "Built with Llama")?.models).toEqual(["HiDream-I1 Dev"]);
expect(list.notices.find((n) => n.text === "Built with DINOv3")?.models.length).toBeGreaterThan(0);
- // TripoSplat, Pixal3D and TRELLIS.2 (single and multi-view) encode with DINOv3; without them, no notice.
+ // TripoSplat (also inside Any Angle), Pixal3D and TRELLIS.2 (single and multi-view) encode with DINOv3; without them, no notice.
expect(list.notices.find((n) => n.text === "Built with DINOv3")?.models).toEqual(expect.arrayContaining(["TripoSplat", "Pixal3D", "TRELLIS.2", "TRELLIS.2 Multi-view"]));
- const without = buildLicenceList(MODELS, manifest.workflows.filter((w) => !/triposplat|trellis2|pixal3d/.test(w.id)));
+ const without = buildLicenceList(MODELS, manifest.workflows.filter((w) => !/triposplat|trellis2|pixal3d|any-angle/.test(w.id)));
expect(without.notices.some((n) => n.text === "Built with DINOv3")).toBe(false);
});
diff --git a/tests/model-access-listings.test.ts b/tests/model-access-listings.test.ts
index e253ebce..be5acf42 100644
--- a/tests/model-access-listings.test.ts
+++ b/tests/model-access-listings.test.ts
@@ -97,8 +97,9 @@ describe("Models & licences in listings and picks", () => {
// The library's 118 LoRAs (Fuobe Try-On's try-on LoRA, the Storyboard's next-scene LoRA, and since O11 Fuobe Angles'
// Multiple-angles and Fuobe Speak's FusioniX among them), the preset LoRA map's files that aren't library files, and
// MiniMax H3's four (Akatz Labs' swap LoRA V1.5 and V1 and Person Remover V1, lightx2v's H3 Turbo), and Fuobe Restore's
- // two gated IC-LoRAs (Lightricks' Restore and Detail Refine), and Open-H3 Regenerate's merged refiner LoRA, each once.
- expect(list.loras.length).toBe(177);
+ // two gated IC-LoRAs (Lightricks' Restore and Detail Refine), and Open-H3 Regenerate's merged refiner LoRA, and Any Angle's
+ // AnyAngle LoRA for Qwen-Image 2.1, each once.
+ expect(list.loras.length).toBe(178);
expect(list.loras.find((l) => l.file === "open_h3_regenerate_2k_lora.safetensors")).toMatchObject({ group: "adapter", base: "MiniMax H3", on: true, licence: { name: "MiniMax H3 Community License", class: "regions" } });
expect(list.packs.find((p) => p.name === "ComfyUI-Open-H3-Regenerate")).toMatchObject({ licence: { name: "Apache-2.0" }, on: true, models: 1 });
expect(list.packs.find((p) => p.name === "Comfyui_Minimax_h3_latent_Upscaler")).toMatchObject({ licence: { name: "MIT" }, on: true, models: 1 });
diff --git a/tests/preset-covers.test.ts b/tests/preset-covers.test.ts
index d3350014..98dc5f26 100644
--- a/tests/preset-covers.test.ts
+++ b/tests/preset-covers.test.ts
@@ -172,8 +172,10 @@ describe("the preset covers manifest", () => {
// Cinema Studio's moves (next/dynamic in camera-moves.tsx, loaded when the "#" picker or the Director panel's
// Movement tab shows them), and the preset header (next/dynamic in studio-page.tsx, checked below).
expect(importers(/from "[^"]*preset-covers\.generated"/)).toEqual(["lib/preset-covers.ts"]);
- // (A type is no code: the cover tile takes a cover without importing the map.)
+ // (A type is no code: the cover tile takes a cover without importing the map.) Any Angle's page shows its own cover
+ // above the upload: a tool of its own, whose chunk loads on that app's page only.
expect(importers(/^import (?!type )[^;]*from "[^"]*preset-covers";/m)).toEqual([
+ "components/any-angle/any-angle-tool.tsx",
"components/cinema/move-list.tsx",
"components/preset-header.tsx",
"components/studio/preset-chips.tsx",
diff --git a/tests/preset-recipes.test.ts b/tests/preset-recipes.test.ts
index 4cba6582..675da793 100644
--- a/tests/preset-recipes.test.ts
+++ b/tests/preset-recipes.test.ts
@@ -67,7 +67,7 @@ describe("which presets get a recipe", () => {
// Graded presets whose clip was graded afterwards and that have no recipe in the book.
const gradesWithoutRecipe = [...MOTIONS, ...EFFECTS].filter((x) => x.grade && !recipeKind(x));
expect(new Set(none.map((x) => x.id))).toEqual(new Set([...gradesWithoutRecipe.map((x) => x.id), ...OWN_ROUTE_APPS]));
- expect(none).toHaveLength(27);
+ expect(none).toHaveLength(28);
for (const x of none) for (const engine of ["open", "cloud"] as const) expect(presetRecipe(x, engine, inCatalog), x.id).toBeUndefined();
});
diff --git a/workflows/comfyui/any-angle-3d.json b/workflows/comfyui/any-angle-3d.json
new file mode 100644
index 00000000..7581f372
--- /dev/null
+++ b/workflows/comfyui/any-angle-3d.json
@@ -0,0 +1,392 @@
+{
+ "1": {
+ "inputs": {
+ "image": "subject.png"
+ },
+ "class_type": "LoadImage",
+ "_meta": {
+ "title": "Photo"
+ }
+ },
+ "2": {
+ "inputs": {
+ "bg_removal_name": "birefnet.safetensors"
+ },
+ "class_type": "LoadBackgroundRemovalModel",
+ "_meta": {
+ "title": "Load Background Removal Model"
+ }
+ },
+ "3": {
+ "inputs": {
+ "bg_removal_model": [
+ "2",
+ 0
+ ],
+ "image": [
+ "1",
+ 0
+ ]
+ },
+ "class_type": "RemoveBackground",
+ "_meta": {
+ "title": "Remove Background"
+ }
+ },
+ "6": {
+ "inputs": {
+ "erode_radius": 1,
+ "size": 1024,
+ "image": [
+ "1",
+ 0
+ ],
+ "mask": [
+ "3",
+ 0
+ ]
+ },
+ "class_type": "TripoSplatPreprocessImage",
+ "_meta": {
+ "title": "TripoSplat Preprocess Image"
+ }
+ },
+ "7": {
+ "inputs": {
+ "clip_name": "dino_v3_vit_h.safetensors"
+ },
+ "class_type": "CLIPVisionLoader",
+ "_meta": {
+ "title": "Load CLIP Vision"
+ }
+ },
+ "8": {
+ "inputs": {
+ "vae_name": "flux2-vae.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "9": {
+ "inputs": {
+ "vae_name": "triposplat_vae_decoder_fp16.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "10": {
+ "inputs": {
+ "unet_name": "triposplat_fp16.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "11": {
+ "inputs": {
+ "clip_vision": [
+ "7",
+ 0
+ ],
+ "vae": [
+ "8",
+ 0
+ ],
+ "image": [
+ "6",
+ 0
+ ]
+ },
+ "class_type": "TripoSplatConditioning",
+ "_meta": {
+ "title": "TripoSplat Conditioning"
+ }
+ },
+ "12": {
+ "inputs": {
+ "seed": 46,
+ "steps": 20,
+ "cfg": 3,
+ "sampler_name": "dpmpp_2m",
+ "scheduler": "simple",
+ "denoise": 1,
+ "model": [
+ "10",
+ 0
+ ],
+ "positive": [
+ "11",
+ 0
+ ],
+ "negative": [
+ "11",
+ 1
+ ],
+ "latent_image": [
+ "11",
+ 2
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "13": {
+ "inputs": {
+ "num_gaussians": 262144,
+ "seed": 46,
+ "samples": [
+ "12",
+ 0
+ ],
+ "vae": [
+ "9",
+ 0
+ ]
+ },
+ "class_type": "VAEDecodeTripoSplat",
+ "_meta": {
+ "title": "TripoSplat Decode"
+ }
+ },
+ "15": {
+ "inputs": {
+ "format": "spz",
+ "splat": [
+ "13",
+ 0
+ ]
+ },
+ "class_type": "SplatToFile3D",
+ "_meta": {
+ "title": "Create 3D File (from Splat)"
+ }
+ },
+ "16": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "mesh": [
+ "15",
+ 0
+ ]
+ },
+ "class_type": "SaveGLB",
+ "_meta": {
+ "title": "Save the 3D view (.spz)"
+ }
+ },
+ "20": {
+ "inputs": {
+ "mask": [
+ "3",
+ 0
+ ]
+ },
+ "class_type": "MaskToImage",
+ "_meta": {
+ "title": "Cut-out as a picture"
+ }
+ },
+ "21": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "images": [
+ "20",
+ 0
+ ]
+ },
+ "class_type": "SaveImage",
+ "_meta": {
+ "title": "Save the cut-out"
+ }
+ },
+ "80": {
+ "inputs": {
+ "mode": "orbit",
+ "mode.yaw": 0,
+ "mode.pitch": 10,
+ "mode.distance": 2,
+ "target_x": 0,
+ "target_y": 0,
+ "target_z": 0,
+ "roll": 0,
+ "fov": 33,
+ "zoom": 1,
+ "camera_type": "perspective"
+ },
+ "class_type": "CreateCameraInfo",
+ "_meta": {
+ "title": "Create Camera Info"
+ }
+ },
+ "81": {
+ "inputs": {
+ "width": 512,
+ "height": 512,
+ "frames": 48,
+ "splat_scale": 1,
+ "sharpen": 2,
+ "headlight_shading": 0,
+ "opacity_threshold": 0,
+ "render_style": "color",
+ "background": "#101010",
+ "splat": [
+ "13",
+ 0
+ ],
+ "camera_info": [
+ "80",
+ 0
+ ]
+ },
+ "class_type": "RenderSplat",
+ "_meta": {
+ "title": "Render Splat"
+ }
+ },
+ "82": {
+ "inputs": {
+ "fps": 12,
+ "images": [
+ "81",
+ 0
+ ]
+ },
+ "class_type": "CreateVideo",
+ "_meta": {
+ "title": "Create Video"
+ }
+ },
+ "83": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "format": "auto",
+ "format.codec": "auto",
+ "video": [
+ "82",
+ 0
+ ]
+ },
+ "class_type": "SaveVideo",
+ "_meta": {
+ "title": "Save the turntable"
+ }
+ },
+ "84": {
+ "inputs": {
+ "upscale_method": "area",
+ "width": 192,
+ "height": 192,
+ "crop": "disabled",
+ "image": [
+ "81",
+ 0
+ ]
+ },
+ "class_type": "ImageScale",
+ "_meta": {
+ "title": "Turntable at 192 px"
+ }
+ },
+ "85": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "fps": 12,
+ "lossless": true,
+ "quality": 100,
+ "method": "default",
+ "images": [
+ "84",
+ 0
+ ]
+ },
+ "class_type": "SaveAnimatedWEBP",
+ "_meta": {
+ "title": "Save the sweep"
+ }
+ },
+ "86": {
+ "inputs": {
+ "mask": [
+ "81",
+ 1
+ ]
+ },
+ "class_type": "MaskToImage",
+ "_meta": {
+ "title": "Turntable coverage"
+ }
+ },
+ "87": {
+ "inputs": {
+ "upscale_method": "area",
+ "width": 192,
+ "height": 192,
+ "crop": "disabled",
+ "image": [
+ "86",
+ 0
+ ]
+ },
+ "class_type": "ImageScale",
+ "_meta": {
+ "title": "Coverage at 192 px"
+ }
+ },
+ "88": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "fps": 12,
+ "lossless": true,
+ "quality": 100,
+ "method": "default",
+ "images": [
+ "87",
+ 0
+ ]
+ },
+ "class_type": "SaveAnimatedWEBP",
+ "_meta": {
+ "title": "Save the sweep's coverage"
+ }
+ },
+ "90": {
+ "inputs": {
+ "resolution": 256,
+ "kernel": 5,
+ "smooth": 0,
+ "level": 0.4,
+ "min_component": 500,
+ "min_opacity": 0.02,
+ "color_sharpen": 2,
+ "splat": [
+ "13",
+ 0
+ ]
+ },
+ "class_type": "SplatToMesh",
+ "_meta": {
+ "title": "Splat to Mesh"
+ }
+ },
+ "91": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-3d",
+ "mesh": [
+ "90",
+ 0
+ ]
+ },
+ "class_type": "SaveGLB",
+ "_meta": {
+ "title": "Save the 3D model (.glb)"
+ }
+ }
+}
diff --git a/workflows/comfyui/any-angle-shot.json b/workflows/comfyui/any-angle-shot.json
new file mode 100644
index 00000000..8209d35b
--- /dev/null
+++ b/workflows/comfyui/any-angle-shot.json
@@ -0,0 +1,229 @@
+{
+ "1": {
+ "inputs": {
+ "image": "subject.png"
+ },
+ "class_type": "LoadImage",
+ "_meta": {
+ "title": "Photo (image 1)"
+ }
+ },
+ "2": {
+ "inputs": {
+ "model_file": "3d/fuobe_splat.spz",
+ "image": {
+ "image": "subject.png",
+ "mask": "subject.png",
+ "normal": "subject.png",
+ "recording": "",
+ "camera_info": null
+ },
+ "width": 1024,
+ "height": 1024
+ },
+ "class_type": "Load3D",
+ "_meta": {
+ "title": "Load the 3D view"
+ }
+ },
+ "13": {
+ "inputs": {
+ "model_3d": [
+ "2",
+ 6
+ ]
+ },
+ "class_type": "File3DToSplat",
+ "_meta": {
+ "title": "Get Splat"
+ }
+ },
+ "20": {
+ "inputs": {
+ "mode": "orbit",
+ "mode.yaw": 125,
+ "mode.pitch": 10,
+ "mode.distance": 1.83,
+ "target_x": 0,
+ "target_y": 0,
+ "target_z": 0,
+ "roll": 0,
+ "fov": 33,
+ "zoom": 1,
+ "camera_type": "perspective"
+ },
+ "class_type": "CreateCameraInfo",
+ "_meta": {
+ "title": "Create Camera Info"
+ }
+ },
+ "30": {
+ "inputs": {
+ "width": 1536,
+ "height": 1152,
+ "frames": 0,
+ "splat_scale": 1,
+ "sharpen": 2,
+ "headlight_shading": 0,
+ "opacity_threshold": 0,
+ "render_style": "color",
+ "background": "#000000",
+ "splat": [
+ "13",
+ 0
+ ],
+ "camera_info": [
+ "20",
+ 0
+ ]
+ },
+ "class_type": "RenderSplat",
+ "_meta": {
+ "title": "Render Splat"
+ }
+ },
+ "50": {
+ "inputs": {
+ "unet_name": "qwen_image_2.1_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "51": {
+ "inputs": {
+ "lora_name": "QI2.1_AnyAngle.safetensors",
+ "strength_model": 1,
+ "model": [
+ "50",
+ 0
+ ]
+ },
+ "class_type": "LoraLoaderModelOnly",
+ "_meta": {
+ "title": "AnyAngle LoRA"
+ }
+ },
+ "52": {
+ "inputs": {
+ "device": "auto",
+ "dtype": "default",
+ "model": [
+ "51",
+ 0
+ ]
+ },
+ "class_type": "QwenImage21Cache",
+ "_meta": {
+ "title": "Qwen-Image 2.1 Cache"
+ }
+ },
+ "53": {
+ "inputs": {
+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",
+ "type": "qwen_image",
+ "device": "default"
+ },
+ "class_type": "CLIPLoader",
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ },
+ "54": {
+ "inputs": {
+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "55": {
+ "inputs": {
+ "prompt": "Change the camera angle from <image2> to <image1>.",
+ "negative_prompt": "",
+ "resolution": 1024,
+ "clip": [
+ "53",
+ 0
+ ],
+ "vae": [
+ "54",
+ 0
+ ],
+ "images.image_1": [
+ "1",
+ 0
+ ],
+ "images.image_2": [
+ "30",
+ 0
+ ]
+ },
+ "class_type": "TextEncodeQwenImage21",
+ "_meta": {
+ "title": "Text Encode (Qwen-Image 2.1)"
+ }
+ },
+ "56": {
+ "inputs": {
+ "seed": 46,
+ "steps": 25,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1,
+ "model": [
+ "52",
+ 0
+ ],
+ "positive": [
+ "55",
+ 0
+ ],
+ "negative": [
+ "55",
+ 1
+ ],
+ "latent_image": [
+ "55",
+ 2
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "57": {
+ "inputs": {
+ "samples": [
+ "56",
+ 0
+ ],
+ "vae": [
+ "54",
+ 0
+ ]
+ },
+ "class_type": "VAEDecode",
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "58": {
+ "inputs": {
+ "filename_prefix": "fuobe/any-angle-shot",
+ "images": [
+ "57",
+ 0
+ ]
+ },
+ "class_type": "SaveImage",
+ "_meta": {
+ "title": "Save the angle"
+ }
+ }
+}
diff --git a/workflows/comfyui/manifest.json b/workflows/comfyui/manifest.json
index 4c75b9c7..3fd00fc7 100644
--- a/workflows/comfyui/manifest.json
+++ b/workflows/comfyui/manifest.json
@@ -1,6 +1,6 @@
{
"version": 1,
- "generatedAt": "2026-11-01T17:57:33.515Z",
+ "generatedAt": "2026-11-02T13:12:59.255Z",
"comfyuiCommit": "5841c187a76ffdb565c14d9565aacbdb9a54b056",
"comfyuiVersion": "0.42.0",
"workflowTemplatesVersion": "0.11.93",
@@ -19745,6 +19745,265 @@
"validated": true,
"notes": "Subject or product splat (3D Angles, 3D Jutsu props, a splat alternative to TRELLIS.2 spins). The official template 3d_triposplat_image_to_gaussian_splat (2026-06-02) with the UI-only live-preview patch removed and a 75-frame H.264 orbit (RenderSplat + CreateCameraInfo orbit yaw 35, pitch 30, distance 2.5; role turntable, 25 fps). Subject only: BiRefNet cuts it out first (cutout false = use the image's own alpha). Output 1 (role splat): splatFormat spz (Niantic, gzip, ~10x smaller, base colour), ply (full spherical harmonics) or ksplat, saved by SaveGLB under that extension. ComfyUI serves all three as application/octet-stream, so Fuobe goes by the extension: spz and ply are saved as 3D models (model/x-spz, model/ply), ksplat as a .bin file, and each output records its format. cutout is true by default (manifest defaults). numGaussians up to 1,048,576 (262,144 by default); seed drives both the sampler and the decoder. RenderSplat also takes a look_at camera, so a view picked in the browser can be rendered on the server. 3.78 GB of weights (TripoSplat 0.74, DINOv3 ViT-H 1.68, TripoSplat VAE decoder 0.58, FLUX.2 VAE 0.34, BiRefNet 0.44)."
},
+ {
+ "id": "any-angle-3d",
+ "title": "Any Angle: a photo to a 3D view of its subject (TripoSplat), with a turntable, the sweep its front view is measured on and a GLB",
+ "capability": "splat",
+ "file": "any-angle-3d.json",
+ "source": "hand-built (scripts/comfy/hand-built/any-angle-3d.json)",
+ "bindings": {
+ "image": [
+ {
+ "node": "1",
+ "input": "image"
+ }
+ ],
+ "filenamePrefix": [
+ {
+ "node": "16",
+ "input": "filename_prefix"
+ },
+ {
+ "node": "83",
+ "input": "filename_prefix"
+ },
+ {
+ "node": "85",
+ "input": "filename_prefix"
+ },
+ {
+ "node": "88",
+ "input": "filename_prefix"
+ },
+ {
+ "node": "21",
+ "input": "filename_prefix"
+ },
+ {
+ "node": "91",
+ "input": "filename_prefix"
+ }
+ ]
+ },
+ "outputs": [
+ {
+ "node": "16",
+ "kind": "model3d",
+ "role": "splat"
+ },
+ {
+ "node": "83",
+ "kind": "video",
+ "role": "turntable"
+ },
+ {
+ "node": "85",
+ "kind": "image",
+ "role": "sweep"
+ },
+ {
+ "node": "88",
+ "kind": "image",
+ "role": "sweep-mask"
+ },
+ {
+ "node": "21",
+ "kind": "image",
+ "role": "matte"
+ },
+ {
+ "node": "91",
+ "kind": "model3d",
+ "role": "mesh"
+ }
+ ],
+ "defaults": {},
+ "limits": {},
+ "models": [
+ {
+ "file": "birefnet.safetensors",
+ "folder": "background_removal",
+ "url": "https://huggingface.co/Comfy-Org/BiRefNet/resolve/main/background_removal/birefnet.safetensors",
+ "sizeGb": 0.44
+ },
+ {
+ "file": "dino_v3_vit_h.safetensors",
+ "folder": "clip_vision",
+ "url": "https://huggingface.co/VAST-AI/TripoSplat/resolve/main/clip_vision/dino_v3_vit_h.safetensors",
+ "sizeGb": 1.68
+ },
+ {
+ "file": "flux2-vae.safetensors",
+ "folder": "vae",
+ "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors",
+ "sizeGb": 0.34
+ },
+ {
+ "file": "triposplat_vae_decoder_fp16.safetensors",
+ "folder": "vae",
+ "url": "https://huggingface.co/VAST-AI/TripoSplat/resolve/main/vae/triposplat_vae_decoder_fp16.safetensors",
+ "sizeGb": 0.58
+ },
+ {
+ "file": "triposplat_fp16.safetensors",
+ "folder": "diffusion_models",
+ "url": "https://huggingface.co/VAST-AI/TripoSplat/resolve/main/diffusion_models/triposplat_fp16.safetensors",
+ "sizeGb": 0.74
+ }
+ ],
+ "customNodes": [],
+ "vramGb": 8,
+ "license": "MIT (VAST-AI/TripoSplat weights); the dino_v3_vit_h image encoder is under the DINOv3 License (royalty-free, commercial use allowed, trade-control limits; the app must show a \"Built with DINOv3\" notice); FLUX.2 VAE Apache-2.0; BiRefNet MIT",
+ "validated": false,
+ "notes": "Step 1 of Any Angle, run once per photo (the server keeps the result by the photo's sha256; feature any-angle-step, out of Library). image-to-splat-triposplat's chain with the cut-out always on (without it a turned camera shows the photo as a flat card with black wedges), seeds fixed at 46 for the sampler and the decoder (the same photo gives the same 3D view), 20 steps, cfg 3, dpmpp_2m, 262,144 Gaussians. Outputs: the splat as .spz (role splat, about 3 MB: every angle reloads it), a 48-frame turntable from yaw 0 at pitch 10, distance 2, fov 33, 512 px, 12 fps (role turntable, shown while picking), the same frames at 192 px as lossless animated WebP, colour (role sweep) and RenderSplat's coverage mask (role sweep-mask), the BiRefNet cut-out (role matte) and a GLB from core SplatToMesh at 256 (role mesh, the desktop drag view). The server compares the sweep with the cut-out photo (silhouette overlap and colour correlation, the GPU test's measure) to find the photo's front yaw and distance: TripoSplat drops its own camera estimate and puts each subject in a pose of its own (the test found yaw 125, 75 and 90 on three photos). GPU test (RTX 5090): cut-out 0.8-1.3 s, TripoSplat 1.0 + 18-19.4 + 0.4 s, .spz save under 0.05 s, 48 frames at 512 px 20-37 s, mesh 0.4-0.5 s; about 8.7 GiB peak."
+ },
+ {
+ "id": "any-angle-shot",
+ "title": "Any Angle: one camera angle of a photo, the 3D view rendered there and repainted by Qwen-Image 2.1 + the AnyAngle LoRA",
+ "capability": "edit",
+ "file": "any-angle-shot.json",
+ "source": "hand-built (scripts/comfy/hand-built/any-angle-shot.json)",
+ "bindings": {
+ "image": [
+ {
+ "node": "1",
+ "input": "image"
+ }
+ ],
+ "splatFile": [
+ {
+ "node": "2",
+ "input": "model_file"
+ }
+ ],
+ "cameraYaw": [
+ {
+ "node": "20",
+ "input": "mode.yaw"
+ }
+ ],
+ "cameraPitch": [
+ {
+ "node": "20",
+ "input": "mode.pitch"
+ }
+ ],
+ "cameraDistance": [
+ {
+ "node": "20",
+ "input": "mode.distance"
+ }
+ ],
+ "cameraFov": [
+ {
+ "node": "20",
+ "input": "fov"
+ }
+ ],
+ "targetX": [
+ {
+ "node": "20",
+ "input": "target_x"
+ }
+ ],
+ "targetY": [
+ {
+ "node": "20",
+ "input": "target_y"
+ }
+ ],
+ "targetZ": [
+ {
+ "node": "20",
+ "input": "target_z"
+ }
+ ],
+ "width": [
+ {
+ "node": "30",
+ "input": "width"
+ }
+ ],
+ "height": [
+ {
+ "node": "30",
+ "input": "height"
+ }
+ ],
+ "seed": [
+ {
+ "node": "56",
+ "input": "seed"
+ }
+ ],
+ "steps": [
+ {
+ "node": "56",
+ "input": "steps"
+ }
+ ],
+ "cfg": [
+ {
+ "node": "56",
+ "input": "cfg"
+ }
+ ],
+ "filenamePrefix": [
+ {
+ "node": "58",
+ "input": "filename_prefix"
+ }
+ ]
+ },
+ "outputs": [
+ {
+ "node": "58",
+ "kind": "image"
+ }
+ ],
+ "defaults": {
+ "width": 1536,
+ "height": 1152,
+ "steps": 25,
+ "cfg": 1
+ },
+ "limits": {
+ "maxWidth": 2048,
+ "maxHeight": 2048,
+ "dimensionMultiple": 8
+ },
+ "models": [
+ {
+ "file": "qwen_image_2.1_int8_convrot.safetensors",
+ "folder": "diffusion_models",
+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors",
+ "sizeGb": 7.26
+ },
+ {
+ "file": "QI2.1_AnyAngle.safetensors",
+ "folder": "loras",
+ "url": "https://huggingface.co/lilylilith/QI_2.1_AnyAngle/resolve/5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae/QI2.1_AnyAngle.safetensors",
+ "sizeGb": 0.12
+ },
+ {
+ "file": "qwen3vl_8b_int8_convrot.safetensors",
+ "folder": "text_encoders",
+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors",
+ "sizeGb": 9.35
+ },
+ {
+ "file": "qwen_image_2.1_vae_bf16.safetensors",
+ "folder": "vae",
+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors",
+ "sizeGb": 0.68
+ }
+ ],
+ "customNodes": [],
+ "vramGb": 32,
+ "license": "Qwen Research License Agreement (Qwen-Image 2.1, Qwen3-VL 8B encoder, VAE): NON-COMMERCIAL, research and evaluation only; the AnyAngle LoRA (lilylilith/QI_2.1_AnyAngle) Apache-2.0",
+ "validated": false,
+ "notes": "Step 2 of Any Angle, one job per angle. The saved .spz goes in like any input (splatFile) and Load3D reads it without the browser: its image entry points at the photo (the provider fills it), then File3DToSplat. CreateCameraInfo orbit takes the camera Fuobe works out (the photo's measured front view plus the preset's turn, height and distance; a close-up aims at the face's height), RenderSplat renders it at the photo's shape (up to 2048 px, black background). Qwen-Image 2.1 int8 + the AnyAngle LoRA at 1.0, loaded here (one model loader, so no request LoRA lands on another), TextEncodeQwenImage21 with the LoRA's own prompt \"Change the camera angle from <image2> to <image1>.\", image 1 the original photo, image 2 the render, resolution 1024 (about 1 MP out: 1184x896 from a 1536x1152 photo), KSampler 25 steps, cfg 1, euler, simple, seed 46. GPU test (RTX 5090): reload + render 2.3 s (a rebuild would be about 20 s), text encode 5.4 s, sampler 22.6 s, about 30 s an angle, peak 28.4-29.2 GiB (card total, with the desktop): vramGb 32, since a 24 GB card has no room to spare. Tested against the alternatives: the other image order gives back the original angle, cfg 3 is 5x slower and no better, bf16 is 2x slower, the photo behind the render adds a ghost second person, grey is no better than black."
+ },
{
"id": "wan21-i2v-uni3c-path",
"title": "Fly path: a still filmed along a camera path, Wan 2.1 I2V guided by Uni3C on a browser render of the path (core nodes)",
diff --git a/workflows/comfyui/model-pins.json b/workflows/comfyui/model-pins.json
index 1f4eb874..9886892c 100644
--- a/workflows/comfyui/model-pins.json
+++ b/workflows/comfyui/model-pins.json
@@ -965,6 +965,11 @@
"sizeBytes": 849608296,
"sha256": "2a32ce938ec71db2b49a817b4844ae86995569518dea56ee0ddc209cbe8e1377"
},
+ "https://huggingface.co/lilylilith/QI_2.1_AnyAngle/resolve/5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae/QI2.1_AnyAngle.safetensors": {
+ "revision": "5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae",
+ "sizeBytes": 119590312,
+ "sha256": "e4d7a0d44a45ed62daabd0f2484a1a59046618a4c47e76b1eab5e386a7a35d8a"
+ },
"https://huggingface.co/linoyts/Qwen-Image-2.1-DMD2-2steps/resolve/5bae28369ecea3232405c17a53c04d35d15796b8/pytorch_lora_weights.safetensors": {
"revision": "5bae28369ecea3232405c17a53c04d35d15796b8",
"sizeBytes": 67144520,
diff --git a/workflows/comfyui/object_info.subset.json b/workflows/comfyui/object_info.subset.json
index 6e7b932d..13e4007b 100644
--- a/workflows/comfyui/object_info.subset.json
+++ b/workflows/comfyui/object_info.subset.json
@@ -6270,6 +6270,56 @@
"has_intermediate_output": false,
"search_aliases": []
},
+ "File3DToSplat": {
+ "input": {
+ "required": {
+ "model_3d": [
+ "FILE_3D,FILE_3D_SPLAT_ANY,FILE_3D_PLY,FILE_3D_SPLAT,FILE_3D_KSPLAT,FILE_3D_SPZ",
+ {
+ "tooltip": "A gaussian splat 3D file"
+ }
+ ]
+ }
+ },
+ "input_order": {
+ "required": [
+ "model_3d"
+ ]
+ },
+ "is_input_list": false,
+ "output": [
+ "SPLAT"
+ ],
+ "output_is_list": [
+ false
+ ],
+ "output_name": [
+ "splat"
+ ],
+ "output_tooltips": [
+ null
+ ],
+ "output_matchtypes": null,
+ "name": "File3DToSplat",
+ "display_name": "Get Splat",
+ "description": "Parse a splat File3D into a gaussian splat. Inverse of Create 3D File (from Splat). Supported format: PLY, SPLAT, KSPLAT, SPZ. PLY carries full spherical harmonics, the other formats are base color only. Format is auto-detected from the file contents.",
+ "python_module": "comfy_extras.nodes_gaussian_splat",
+ "category": "3d/splat",
+ "output_node": false,
+ "deprecated": false,
+ "experimental": false,
+ "dev_only": false,
+ "api_node": false,
+ "price_badge": null,
+ "search_aliases": [
+ "load splat",
+ "ply to splat",
+ "import splat",
+ "file to splat"
+ ],
+ "essentials_category": null,
+ "has_intermediate_output": false
+ },
"Flux2Scheduler": {
"input": {
"required": {
@@ -11632,6 +11682,108 @@
"essentials_category": null,
"has_intermediate_output": false
},
+ "Load3D": {
+ "input": {
+ "required": {
+ "model_file": [
+ "COMBO",
+ {
+ "multiselect": false,
+ "options": [
+ "none"
+ ],
+ "file_upload": true
+ }
+ ],
+ "image": [
+ "LOAD_3D",
+ {}
+ ],
+ "width": [
+ "INT",
+ {
+ "default": 1024,
+ "min": 1,
+ "max": 4096,
+ "step": 1
+ }
+ ],
+ "height": [
+ "INT",
+ {
+ "default": 1024,
+ "min": 1,
+ "max": 4096,
+ "step": 1
+ }
+ ]
+ }
+ },
+ "input_order": {
+ "required": [
+ "model_file",
+ "image",
+ "width",
+ "height"
+ ]
+ },
+ "is_input_list": false,
+ "output": [
+ "IMAGE",
+ "MASK",
+ "STRING",
+ "IMAGE",
+ "LOAD3D_CAMERA",
+ "VIDEO",
+ "FILE_3D",
+ "LOAD3D_MODEL_INFO"
+ ],
+ "output_is_list": [
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ false
+ ],
+ "output_name": [
+ "image",
+ "mask",
+ "mesh_path",
+ "normal",
+ "camera_info",
+ "recording_video",
+ "model_3d",
+ "model_3d_info"
+ ],
+ "output_tooltips": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ "output_matchtypes": null,
+ "name": "Load3D",
+ "display_name": "Load 3D & Animation",
+ "description": "",
+ "python_module": "comfy_extras.nodes_load_3d",
+ "category": "3d",
+ "output_node": false,
+ "deprecated": false,
+ "experimental": true,
+ "dev_only": false,
+ "api_node": false,
+ "price_badge": null,
+ "search_aliases": null,
+ "essentials_category": "Basics",
+ "has_intermediate_output": false
+ },
"LoadAudio": {
"input": {
"required": {
@@ -17499,6 +17651,89 @@
"essentials_category": null,
"has_intermediate_output": false
},
+ "SaveAnimatedWEBP": {
+ "input": {
+ "required": {
+ "images": [
+ "IMAGE",
+ {}
+ ],
+ "filename_prefix": [
+ "STRING",
+ {
+ "default": "ComfyUI"
+ }
+ ],
+ "fps": [
+ "FLOAT",
+ {
+ "default": 6,
+ "min": 0.01,
+ "max": 1000,
+ "step": 0.01
+ }
+ ],
+ "lossless": [
+ "BOOLEAN",
+ {
+ "default": true
+ }
+ ],
+ "quality": [
+ "INT",
+ {
+ "default": 80,
+ "min": 0,
+ "max": 100
+ }
+ ],
+ "method": [
+ "COMBO",
+ {
+ "options": [
+ "default",
+ "fastest",
+ "slowest"
+ ]
+ }
+ ]
+ },
+ "hidden": {
+ "prompt": "PROMPT",
+ "extra_pnginfo": "EXTRA_PNGINFO"
+ }
+ },
+ "input_order": {
+ "required": [
+ "images",
+ "filename_prefix",
+ "fps",
+ "lossless",
+ "quality",
+ "method"
+ ],
+ "hidden": [
+ "prompt",
+ "extra_pnginfo"
+ ]
+ },
+ "is_input_list": false,
+ "output": [
+ "IMAGE"
+ ],
+ "output_is_list": [
+ false
+ ],
+ "output_name": [
+ "images"
+ ],
+ "name": "SaveAnimatedWEBP",
+ "display_name": "Save Animated WEBP",
+ "description": "",
+ "python_module": "comfy_extras.nodes_images",
+ "category": "image",
+ "output_node": true
+ },
"SaveAudio": {
"input": {
"required": {
@@ -19395,6 +19630,132 @@
"essentials_category": null,
"has_intermediate_output": false
},
+ "SplatToMesh": {
+ "input": {
+ "required": {
+ "splat": [
+ "SPLAT",
+ {}
+ ],
+ "resolution": [
+ "INT",
+ {
+ "tooltip": "Density-grid resolution along the longest axis. Higher = finer surface, more VRAM/time (grows with resolution^3).",
+ "default": 384,
+ "min": 64,
+ "max": 768,
+ "step": 16
+ }
+ ],
+ "kernel": [
+ "INT",
+ {
+ "tooltip": "Max splat half-width in voxels. Each gaussian is rasterized over a window sized to its own 3-sigma, capped here - small surfels stay cheap, large ones aren't truncated. Raise if sparse splats leave gaps.",
+ "default": 5,
+ "min": 1,
+ "max": 8
+ }
+ ],
+ "smooth": [
+ "INT",
+ {
+ "tooltip": "Taubin mesh-smoothing iterations. Smooths the surface without shrinking it (volume-preserving), unlike blurring the density. 0 = raw surface.",
+ "advanced": true,
+ "default": 0,
+ "min": 0,
+ "max": 60
+ }
+ ],
+ "level": [
+ "FLOAT",
+ {
+ "tooltip": "Iso-surface level. Auto-picked by Otsu; this biases it (1.0 = auto, lower = fatter/more-connected surface, higher = thinner/tighter).",
+ "default": 0.4,
+ "min": 0,
+ "max": 2,
+ "step": 0.01
+ }
+ ],
+ "min_component": [
+ "INT",
+ {
+ "tooltip": "Drop connected components smaller than this many vertices (0 = keep all). Removes detached floater blobs and the inner shell of the double wall.",
+ "advanced": true,
+ "default": 500,
+ "min": 0,
+ "max": 100000,
+ "step": 50
+ }
+ ],
+ "min_opacity": [
+ "FLOAT",
+ {
+ "tooltip": "Ignore gaussians fainter than this before meshing.",
+ "advanced": true,
+ "default": 0.02,
+ "min": 0,
+ "max": 1,
+ "step": 0.01
+ }
+ ],
+ "color_sharpen": [
+ "FLOAT",
+ {
+ "tooltip": "Crisp up the vertex texture: 1.0 = physically-correct blend; higher biases each voxel's colour toward its dominant gaussian instead of averaging neighbours (de-smears the texture). Colour only - geometry is unchanged.",
+ "default": 2,
+ "min": 1,
+ "max": 8,
+ "step": 0.5
+ }
+ ]
+ }
+ },
+ "input_order": {
+ "required": [
+ "splat",
+ "resolution",
+ "kernel",
+ "smooth",
+ "level",
+ "min_component",
+ "min_opacity",
+ "color_sharpen"
+ ]
+ },
+ "is_input_list": false,
+ "output": [
+ "MESH"
+ ],
+ "output_is_list": [
+ false
+ ],
+ "output_name": [
+ "mesh"
+ ],
+ "output_tooltips": [
+ null
+ ],
+ "output_matchtypes": null,
+ "name": "SplatToMesh",
+ "display_name": "Extract Mesh from Splat",
+ "description": "Extract a coloured mesh from a gaussian splat.",
+ "python_module": "comfy_extras.nodes_gaussian_splat",
+ "category": "3d/splat",
+ "output_node": false,
+ "deprecated": false,
+ "experimental": false,
+ "dev_only": false,
+ "api_node": false,
+ "price_badge": null,
+ "search_aliases": [
+ "splat to mesh",
+ "gaussian surface nets",
+ "splat surface",
+ "mesh splat"
+ ],
+ "essentials_category": null,
+ "has_intermediate_output": false
+ },
"SplitAudioChannels": {
"input": {
"required": {
diff --git a/workflows/comfyui/requirements.json b/workflows/comfyui/requirements.json
index f874bc66..0e8dd76a 100644
--- a/workflows/comfyui/requirements.json
+++ b/workflows/comfyui/requirements.json
@@ -1,6 +1,6 @@
{
"v": 1,
- "hash": "e4f0d7ad3f2a2e6ec2f81356d7e961ed2a052a68df22cd4d0e064a4d1d04b573",
+ "hash": "7b27706a44fe14846bf577bea5831b98f5363a6b2b8f7d9cbbfe48dfe940960a",
"comfyui": {"min":"0.42.0","testedCommit":"5841c187"},
"folders": ["audio_encoders","background_removal","checkpoints","clip_vision","dbs","diffusion_models","facerestore_models","foley","frame_interpolation","geometry_estimation","insightface","latent_upscale_models","loras","mmaudio","model_patches","optical_flow","reuse","text_encoders","thinksound","upscale_models","vae"],
"sentinels": ["AILab_Qwen3ASRSubtitle","AUSBOSS_NODES_CropForInpaint","AUSBOSS_NODES_ImageCropRotatePad","AUSBOSS_NODES_StitchInpaint","Add Subtitles To Frames","Apply Whisper","CFGOverride","ClothesSegment","ComfyMathExpression","CropFuobeLive","DBSLoader","DBSSeparate","DownloadAndLoadWav2VecModel","DualModelGuider","FL_ChatterboxDialogTTS","FL_ChatterboxMultilingualTTS","FL_ChatterboxVC","GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","H3AdaLNLoRAFix","H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan","H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan","H3SLAAttention","HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader","INTConstant","Ideogram4Scheduler","ImageBatchExtendWithOverlap","ImageGridtoBatch","ImageResizeKJv2","IndexTTS2Simple","Krea2EditGroundedEncode","Krea2EditModelPatch","Krea2OstrisEditModelPatch","LTXAVTextEncoderLoader","LTXAddVideoICLoRAGuide","LTXICLoRALoaderModelOnly","LTXVAddGuide","LTXVAudioVAEDecode","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVDualCFGGuider","LTXVEmptyLatentAudio","LTXVImgToVideoInplace","LTXVLatentUpsampler","LTXVPreprocess","LTXVScheduler","LTXVSeparateAVLatent","LTXVTiledFusionSampler","LatentSyncNode","LoadBackgroundRemovalModel","LoadImageFuobeLive","LoadVideoDepthAnythingModel","MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler","MelBandRoFormerModelLoader","MelBandRoFormerSampler","MiniMaxH3TurboLoRA","MiniMaxH3TurboSampler","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","OpenH3RegenFastVAEDecode","OpenH3RegenFinish","OpenH3RegenLora","OpenH3RegenPrepareDraft","OpenH3RegenRefineLatent","OpenH3RegenSigmas","OpenH3RegenUpscale","OpenH3SaveRefinedLatent","PasteBackFuobeLive","Qwen21EncodeFuobeLive","Qwen21ReferenceFuobeLive","QwenImage21Cache","REUSEEnhance","REUSELoader","RIFE VFI","RMBG","ReActorFaceSwap","RemoveBackground","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SaveImageFuobeLive","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","TS_ImageToSVGStringColor_Vtracer","TS_SVGStringToSVGBytesIO","TextEncodeFibo2","TextEncodeKrea2OstrisEdit","TextEncodeQwenImage21","ThinkSoundFeatureUtilsLoader","ThinkSoundModelLoader","ThinkSoundSampler","Trellis2Conditioning","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","VHS_BatchManager","VHS_LoadAudioUpload","VHS_LoadVideo","VHS_SelectEveryNthImage","VHS_VideoCombine","VHS_VideoInfo","VHS_VideoInfoLoaded","VideoDepthAnythingOutput","VideoDepthAnythingProcess","VideoLengthAdjuster","ViggleTurboLora","ViggleTurboSigmas","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader"],
@@ -139,6 +139,7 @@
"loras/Flux_2-Turbo-LoRA_comfyui.safetensors": {"folder":"loras","file":"Flux_2-Turbo-LoRA_comfyui.safetensors","url":"https://huggingface.co/ByteZSzn/Flux.2-Turbo-ComfyUI/resolve/main/Flux_2-Turbo-LoRA_comfyui.safetensors","pinnedUrl":"https://huggingface.co/ByteZSzn/Flux.2-Turbo-ComfyUI/resolve/57231752b9c5632e42911c73ee0ed138d381a6d4/Flux_2-Turbo-LoRA_comfyui.safetensors","sizeBytes":2760814880,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
"loras/H3-Person-Remover-V1.safetensors": {"folder":"loras","file":"H3-Person-Remover-V1.safetensors","url":"https://huggingface.co/akatz-ai/MiniMax-H3-Person-Remover-LoRA/resolve/fe136b3dc93aea993b9f194d48ea9859fdc2de14/H3-Person-Remover-V1.safetensors","pinnedUrl":"https://huggingface.co/akatz-ai/MiniMax-H3-Person-Remover-LoRA/resolve/fe136b3dc93aea993b9f194d48ea9859fdc2de14/H3-Person-Remover-V1.safetensors","sizeBytes":155110584,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
"loras/Krea2-realism-V2.safetensors": {"folder":"loras","file":"Krea2-realism-V2.safetensors","url":"https://huggingface.co/RudySen/Krea2-realism-V2/resolve/main/Krea2-realism-V2.safetensors","pinnedUrl":"https://huggingface.co/RudySen/Krea2-realism-V2/resolve/ad6f07e426303e7087d215362dbc057b0073dca3/Krea2-realism-V2.safetensors","sizeBytes":1562410344,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/QI2.1_AnyAngle.safetensors": {"folder":"loras","file":"QI2.1_AnyAngle.safetensors","url":"https://huggingface.co/lilylilith/QI_2.1_AnyAngle/resolve/5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae/QI2.1_AnyAngle.safetensors","pinnedUrl":"https://huggingface.co/lilylilith/QI_2.1_AnyAngle/resolve/5c8b4c8e05ba6328d54bf8d34ec724fef5a414ae/QI2.1_AnyAngle.safetensors","sizeBytes":119590312,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
"loras/Qwen-Image-2.1-DMD2-2steps.safetensors": {"folder":"loras","file":"Qwen-Image-2.1-DMD2-2steps.safetensors","url":"https://huggingface.co/linoyts/Qwen-Image-2.1-DMD2-2steps/resolve/5bae28369ecea3232405c17a53c04d35d15796b8/pytorch_lora_weights.safetensors","pinnedUrl":"https://huggingface.co/linoyts/Qwen-Image-2.1-DMD2-2steps/resolve/5bae28369ecea3232405c17a53c04d35d15796b8/pytorch_lora_weights.safetensors","sizeBytes":67144520,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
"loras/Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r256.safetensors": {"folder":"loras","file":"Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r256.safetensors","url":"https://huggingface.co/Viggle/Qwen-Image-2.1-viggle-turbo/resolve/009a44a895ef85f7e643c80fdca9543795248867/Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r256.safetensors","pinnedUrl":"https://huggingface.co/Viggle/Qwen-Image-2.1-viggle-turbo/resolve/009a44a895ef85f7e643c80fdca9543795248867/Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r256.safetensors","sizeBytes":1359147904,"gated":false,"presence":"list"},
"loras/Qwen-Image-2512-Lightning-4steps-V1.0-fp32.safetensors": {"folder":"loras","file":"Qwen-Image-2512-Lightning-4steps-V1.0-fp32.safetensors","url":"https://huggingface.co/lightx2v/Qwen-Image-2512-Lightning/resolve/main/Qwen-Image-2512-Lightning-4steps-V1.0-fp32.safetensors","pinnedUrl":"https://huggingface.co/lightx2v/Qwen-Image-2512-Lightning/resolve/4609161e308ce82018a42c2a0c9b107e865bb751/Qwen-Image-2512-Lightning-4steps-V1.0-fp32.safetensors","sizeBytes":1698951104,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
@@ -238,6 +239,8 @@
"vae/wan_2.1_vae.safetensors": {"folder":"vae","file":"wan_2.1_vae.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/vae/wan_2.1_vae.safetensors","sizeBytes":253815318,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]}
},
"workflows": {
+ "any-angle-3d": {"core":["CLIPVisionLoader","CreateCameraInfo","CreateVideo","ImageScale","KSampler","LoadBackgroundRemovalModel","LoadImage","MaskToImage","RemoveBackground","RenderSplat","SaveAnimatedWEBP","SaveGLB","SaveImage","SaveVideo","SplatToFile3D","SplatToMesh","TripoSplatConditioning","TripoSplatPreprocessImage","UNETLoader","VAEDecodeTripoSplat","VAELoader"],"packs":{},"files":["background_removal/birefnet.safetensors","clip_vision/dino_v3_vit_h.safetensors","diffusion_models/triposplat_fp16.safetensors","vae/flux2-vae.safetensors","vae/triposplat_vae_decoder_fp16.safetensors"],"optional":[],"vramGb":8,"isolated":false,"firstRun":[]},
+ "any-angle-shot": {"core":["CLIPLoader","CreateCameraInfo","File3DToSplat","KSampler","Load3D","LoadImage","LoraLoaderModelOnly","QwenImage21Cache","RenderSplat","SaveImage","TextEncodeQwenImage21","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_2.1_int8_convrot.safetensors","loras/QI2.1_AnyAngle.safetensors","text_encoders/qwen3vl_8b_int8_convrot.safetensors","vae/qwen_image_2.1_vae_bf16.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[]},
"audio-join-crossfade": {"core":["AudioConcat","AudioMerge","ComfyMathExpression","LoadAudio","PrimitiveFloat","SaveAudio","SplitAudioChannels","TrimAudioDuration"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadAudioUpload"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
"audio-loop-crossfade": {"core":["AudioAdjustVolume","AudioConcat","AudioMerge","ComfyMathExpression","EndLoop","LoadAudio","PrimitiveFloat","SaveAudio","SplitAudioChannels","StartLoop","TrimAudioDuration"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadAudioUpload"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
"audio-timeline": {"core":["AudioConcat","AudioMerge","EmptyAudio","LoadAudio","SaveAudio","TrimAudioDuration"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},