The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Merge remote-tracking branch 'origin/claude/fuobe-parity-4' into o/idol-9
Claude61d8074e92a0
diff --cc src/components/model3d/model-card.tsxindex 87e0042e,dcc2091d..ee05f718--- a/src/components/model3d/model-card.tsx+++ b/src/components/model3d/model-card.tsx@@@ -2,11 -2,11 +2,11 @@@import { Box, Camera, Clapperboard, Download, ImageIcon, Loader2, Paintbrush, Pause, PersonStanding, Play, Printer, Rotate3d, Sparkles, Video, Wand2 } from "lucide-react";import Link from "next/link";-import { createElement, useCallback, useEffect, useEffectEvent, useRef, useState, useSyncExternalStore } from "react";+import { createElement, useCallback, useEffect, useEffectEvent, useRef, useState } from "react";import { toast } from "sonner";import { Button } from "@/components/ui/button";- import { uploadFile, useEngine, useHydrated } from "@/lib/api";- import { animateSpinHref, animationName, model3dView, photorealAngle, photorealBody, stillOf, type Model3dView } from "@/lib/av/model3d";+ import { uploadFile, useEngine, useHydrated, useIsOwner } from "@/lib/api";+ import { FINAL_3D, animateSpinHref, animationName, finalBuildHref, model3dView, photorealAngle, photorealBody, stillOf, type Model3dView } from "@/lib/av/model3d";import { PATH_FPS, PATH_FRAMES } from "@/lib/camera-path";import { useFlyAround } from "@/components/fly-around-run";import type { Generation } from "@/lib/catalog/types";@@@ -42,15 -40,29 +42,31 @@@ function rigClips(g: Generation, view:/*** A finished 3D model. The card plays its turntable (or shows its poster or photo); the orbitable viewer, and with it* the GLB, loads only when "View in 3D" opens it: the web GLB when the server made one, else the original (a rig- * plays its animation). A splat shows its orbit video or picture with the file to download. Then the turntable,- * Animate the spin and Rig & animate; an Idol 3D draft on your GPU, "Build the final with TRELLIS.2".+ * plays its animation). A splat shows its orbit video or picture, and "View in 3D" opens the splat viewer in its+ * place (Spark, loaded only then; the orbit video stays where there's no WebGL2). Then the turntable, Animate the- * spin and Rig & animate.++ * spin and Rig & animate; an Idol 3D draft on your GPU, "Build the final with TRELLIS.2".*/- export function ModelCard({ g, info, cloudAllowed, refineAllowed = false }: { g: Generation; info: Record<string, Model3dInfo>; cloudAllowed: boolean; refineAllowed?: boolean }) {+ export function ModelCard({+ g,+ info,+ cloudAllowed,+ refineAllowed = false,+ finalAllowed = false,+ onFinal,+ }: {+ g: Generation;+ info: Record<string, Model3dInfo>;+ cloudAllowed: boolean;+ refineAllowed?: boolean;+ /** TRELLIS.2 runs here and is switched on: an Idol 3D draft offers "Build the final with TRELLIS.2". */+ finalAllowed?: boolean;+ /** Fills the form for the final every time it's clicked (the link alone does nothing when the URL is already its own). */+ onFinal?: (photo: string) => void;+ }) {const view = model3dView(g);- // "preview": the turntable or the still (a splat with an orbit video: the video). "3d": the viewer (a splat: its picture).- const [show, setShow] = useState<"preview" | "3d">("preview");+ // "preview": the turntable or the still (a splat with an orbit video: the video). "3d": the viewer (a splat: its+ // picture). "look": a splat in the splat viewer.+ const [show, setShow] = useState<"preview" | "3d" | "look">("preview");const [viewer, setViewer] = useState<HTMLElement | null>(null);const [ready, setReady] = useState(false);const [failed, setFailed] = useState(false);@@@ -66,13 -78,8 +82,14 @@@// "View in 3D" unmounts itself: focus moves to the viewer once it's there.const focusViewer = useRef(false);const hydrated = useHydrated();+ const owner = useIsOwner();const canRecord = hydrated && !!recordableType();+ // A splat opens in the splat viewer where the browser draws WebGL2 and the file isn't too big for it (it says so).+ const [splatNote, setSplatNote] = useState<string | null>(null);+ const canLook = !!view.splat && hydrated && hasWebgl2() && !splatNote;+ const looking = show === "look" && canLook;+ // Opened with "View in 3D" (which unmounts itself): the viewer takes the focus once it's drawn.+ const [focusLook, setFocusLook] = useState(false);const clips = rigClips(g, view);const [clipKey, setClipKey] = useState("main");const rigClip = clips.find((c) => c.key === clipKey);@@@ -350,7 -340,16 +369,12 @@@{g.modelName}{g.prompt && !view.rigged ? ` · ${g.prompt}` : ""}</p>- {view.splat && (- <p className="text-[12px] text-muted-foreground">- Fuobe doesn'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>- )}+ {view.splat && hydrated && !canLook && <p className="text-[12px] text-muted-foreground">{splatNote ?? FALLBACK_TEXT["no-webgl2"]}</p>}+ {/* Idol 3D on your GPU: how clean the file is. Only the owner reads how to make it cleaner (it's their ComfyUI). */}+ {view.clean?.cleaned && <p className="text-[12px] font-medium">{view.clean.text}</p>}+ {view.clean && !view.clean.cleaned && owner && (+ <p className="text-[12px] text-muted-foreground">Not cleaned: this run used the core nodes. With ComfyUI-Idol installed and switched on, splat files come out cleaner.</p>+ )}<div className="flex flex-wrap gap-1.5">{view.splat ? (<Button asChild variant="outline" size="sm" className="rounded-full">diff --cc src/lib/av/model3d.tsindex cef52976,3f20b49e..106029be--- a/src/lib/av/model3d.ts+++ b/src/lib/av/model3d.ts@@@ -254,8 -324,10 +324,10 @@@ export interface Model3dViewglb?: string;/** The GLB to show in a viewer: the web GLB when there is one, else `glb`. */web?: string;- /** A Gaussian splat (.ply / .spz / .ksplat), which the page doesn't draw: downloaded, with its turntable or preview shown. */+ /** A Gaussian splat (.ply / .spz / .ksplat): the splat viewer draws it (src/components/model3d/splat-viewer.tsx), with its turntable or preview as the poster and fallback, and it downloads. */splat?: { url: string; format: string };+ /** Idol 3D on your GPU: the splat file cleaned of its haze (how many Gaussians were kept), or not (no ComfyUI-Idol). */+ clean?: { cleaned: boolean; text: string };/** A rendered turntable that came with the model (the server's render for open 3D models, TripoSplat's orbit on the open engine, demo). */turntable?: string;/** The server is still rendering the turntable (after the job finished): waiting its turn, or how far (0-1). */