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 branch 'o/idol-6' into claude/fuobe-parity-4
Claude022372b1cdc2
diff --cc src/components/model3d/model-card.tsxindex b93663ed,16bfc882..dcc2091d--- a/src/components/model3d/model-card.tsx+++ b/src/components/model3d/model-card.tsx@@@ -5,8 -5,8 +5,8 @@@ import Link from "next/link"import { createElement, useCallback, useEffect, useEffectEvent, useRef, useState, useSyncExternalStore } from "react";import { toast } from "sonner";import { Button } from "@/components/ui/button";-import { uploadFile, useEngine, useHydrated } from "@/lib/api";+import { uploadFile, useEngine, useHydrated, useIsOwner } from "@/lib/api";- import { animateSpinHref, animationName, model3dView, photorealAngle, photorealBody, stillOf, type Model3dView } from "@/lib/av/model3d";+ 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";diff --cc src/components/model3d/model3d-studio.tsxindex d05f9e40,0c7581dc..25618068--- a/src/components/model3d/model3d-studio.tsx+++ b/src/components/model3d/model3d-studio.tsx@@@ -16,8 -16,9 +16,9 @@@ import { MediaSlot, type SlotValue } frimport { MediaDrop } from "@/components/av/media-drop";import { Panel, ToolHero, ToolShell } from "@/components/av/tool-shell";import { SelfHostNote } from "@/components/self-host-note";-import { useCreateGeneration, useEngine, useGenerations, useHydrated, useLikelyVisitor, useModelAccess, useStatus } from "@/lib/api";+import { useCreateGeneration, useEngine, useGenerations, useHydrated, useIsOwner, useLikelyVisitor, useModelAccess, useStatus } from "@/lib/api";import {+ FINAL_3D,IDOL_QUALITIES,MAX_3D_PROMPT,MODEL3D_FEATURE,@@@ -29,13 -31,10 +30,14 @@@VIEW_SIDES,idolPhotoFor,isIdol,+ MAKE_3D_HINT,model3dBlocker,+ readModel3dLink,+ linkedIdolQuality,+ linkedPicture,model3dFor,model3dRequest,+ modeOf,type IdolQuality,type Model3dInput,type Model3dMode,@@@ -72,9 -71,9 +74,10 @@@ const HINTS: Record<Model3dMode, string};/**- * A link's ?model= (from ⌘K) picks that model, its mode and its engine; ?mode= picks a mode; ?model=meshy-rigging- * (rigging works on a finished model) says where Rig & animate is; ?image= fills in the picture (an Idol 3D result's- * "Build the final with TRELLIS.2"). Under its own Suspense: it reads the URL.+ * A link's ?model= (from ⌘K, or an image result's Make it 3D) picks that model, its mode and its engine; ?mode= picks a+ * mode; ?model=meshy-rigging (rigging works on a finished model) says where Rig & animate is; ?quality= sets Idol 3D's- * look and ?image= fills the photo slot (readModel3dLink). Under its own Suspense: it reads the URL.++ * look and ?image= fills the photo slot (readModel3dLink: an image result's Make it 3D, or an Idol 3D result's "Build the++ * final with TRELLIS.2"). Under its own Suspense: it reads the URL.*/function UrlModel({onModel,@@@ -82,19 -81,24 +85,20 @@@onRig,onImage,}: {- onModel: (mode: Model3dMode, engine: Engine, id: string) => void;+ onModel: (mode: Model3dMode, engine: Engine, id: string, quality?: IdolQuality) => void;onMode: (mode: Model3dMode) => void;onRig: () => void;- onImage: (url: string, photo: boolean) => void;- onImage: (url: string) => void;++ onImage: (url: string, photo?: boolean) => void;}) {const params = useSearchParams();- const id = params.get("model");- const mode = params.get("mode");- const image = params.get("image");useEffect(() => {- const found = id ? modeOf(id) : null;- if (found && id) onModel(found.mode, found.engine, id);- else if (id === RIG_MODEL) onRig();- else if (MODEL3D_MODES.some((m) => m.id === mode)) onMode(mode as Model3dMode);- }, [id, mode, onModel, onMode, onRig]);- useEffect(() => {- if (image) onImage(image);- }, [image, onImage]);+ const link = readModel3dLink(params);+ if (link.model) onModel(link.model.mode, link.model.engine, link.model.id, link.quality);+ else if (link.rig) onRig();+ else if (link.mode) onMode(link.mode);- if (link.image) onImage(link.image, !!link.photo);++ // Only Make it 3D's link (Idol 3D) says whether the picture is a photo; the others leave "It's a photo" as it is.++ if (link.image) onImage(link.image, link.model && isIdol(link.model.id) ? !!link.photo : undefined);+ }, [params, onModel, onMode, onRig, onImage]);return null;}@@@ -275,11 -241,17 +279,24 @@@ export function Model3dStudio({ info }// Refine detail · Hi3D 1.0 (open engine, From an image and From several images): the resolution, or off.const [refine, setRefine] = useState<Hi3dResolution | null>(null);const showRigHint = useCallback(() => setRigHint(true), []);- // A picture handed over in the link (?image=). Idol's "It's a photo" is left as it is: the link doesn't say whether- // the picture is a photo (an Idol 3D draft's is usually the user's own upload).- const fromImage = useCallback((url: string) => {- const v: SlotValue = { ref: url, preview: url, kind: "image" };++ // A picture handed over in the link (?image=). An image result's Make it 3D names Idol 3D and says what the picture is:++ // a result made here goes in as one, so Idol's photo crop starts off (the tighter crop suits a generated picture), and an++ // upload (?photo=1) starts it on. Other links (an Idol 3D result's "Build the final with TRELLIS.2") leave Idol's++ // "It's a photo" as it is: they don't say whether the picture is a photo (an Idol 3D draft's is usually the user's own upload).++ const [handed, setHanded] = useState<string | null>(null);++ const fromImage = useCallback((url: string, asPhoto?: boolean) => {++ const v: SlotValue = asPhoto === undefined ? { ref: url, preview: url, kind: "image" } : linkedPicture(url, asPhoto);+ lastPhoto.current = v;+ setPhoto(v);++ if (asPhoto === undefined) return;++ setIdolPhoto(asPhoto);++ setHanded(url);+ }, []);const fromUrl = useCallback(- (m: Model3dMode, e: Engine, id: string) => {+ (m: Model3dMode, e: Engine, id: string, quality?: IdolQuality) => {setMode(m);setPicked((p) => ({ ...p, [`${m}:${e}`]: id }));+ setIdolQualities((p) => linkedIdolQuality(p, m, e, id, quality));setEngine(e);},[setEngine],