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.

Cinema 3D scene: the open re-render keeps the capture's camera

Claudeddbab16eca09
diff --git a/src/lib/catalog/cinema.ts b/src/lib/catalog/cinema.ts
index 765f3740..6bbaf091 100644
--- a/src/lib/catalog/cinema.ts
+++ b/src/lib/catalog/cinema.ts
@@ -1487,10 +1487,15 @@ function planScene(input: CinemaGenerateInput): CinemaPlan {
);
}
+/** The Multiple-Angles LoRA's reference pose: its input's own camera, so nothing turns. */
+const REFERENCE_POSE: ScenePose = { horizontal: 0, vertical: 0, zoom: 5 };
+
/**
* Re-render a captured view. Nano Banana Pro (cloud) and Qwen-Image-Edit 2511 with the Multiple-Angles LoRA
- * (open; its camera words lead the prompt) get the capture as image 1 and the still as image 2. Qwen Multiple
- * Angles on the cloud re-shoots the still itself from the flown camera's angles instead.
+ * (open) get the capture as image 1 and the still as image 2. The LoRA turns its input by the angles it is told,
+ * and the capture already shows the new view, so it is told the reference pose (front view, eye level, medium
+ * shot: keep this camera); the flown angles stay on the take. Qwen Multiple Angles on the cloud re-shoots the
+ * still itself from the flown camera's angles instead.
*/
function planRecompose(input: CinemaGenerateInput): CinemaPlan {
const notes: string[] = [];
@@ -1501,7 +1506,7 @@ function planRecompose(input: CinemaGenerateInput): CinemaPlan {
const cap = input.capture;
const lens = cap?.lens ?? LENS.default;
const aperture = cap?.aperture ?? APERTURE.default;
- const pose = cap?.pose ?? { horizontal: 0, vertical: 0, zoom: 5 };
+ const pose = cap?.pose ?? REFERENCE_POSE;
const params = fitParams(model, { ...input, batch: 1, resolution: input.resolution ?? "1K" }, notes, "image");
let request: GenerationRequest;
if (model.id === "qwen-multiple-angles") {
@@ -1515,12 +1520,14 @@ function planRecompose(input: CinemaGenerateInput): CinemaPlan {
feature: "cinema-recompose",
modelId: model.id,
op: "edit",
- prompt: open ? `<sks> ${poseWords(pose)}. ${words}` : words,
+ prompt: open ? `<sks> ${poseWords(REFERENCE_POSE)}. ${words}` : words,
inputs: src && cap ? { images: [cap.url, src] } : undefined,
params,
...(loras?.length ? { loras } : {}),
};
- notes.push(`${model.name}${loras?.length ? " with the Multiple-Angles LoRA" : ""} re-renders your capture, with the still as the reference for every detail`);
+ notes.push(
+ `${model.name}${loras?.length ? " with the Multiple-Angles LoRA" : ""} re-renders your capture from its own camera, with the still as the reference for every detail`,
+ );
}
const blocker = !src ? "Pick the scene's still" : !cap ? "Capture a view first" : undefined;
return finish(model, [{ key: "main", request }], notes, blocker);
diff --git a/tests/cinema-scene.test.ts b/tests/cinema-scene.test.ts
index ecf11b19..e50f0119 100644
--- a/tests/cinema-scene.test.ts
+++ b/tests/cinema-scene.test.ts
@@ -90,13 +90,15 @@ describe("planning a recomposition", () => {
expect(plan.costUsd).toBe(0.035);
});
- it("open: Qwen-Image-Edit 2511 with the Multiple-Angles LoRA and its camera words first, free", () => {
+ it("open: Qwen-Image-Edit 2511 with the Multiple-Angles LoRA at its reference pose (the capture is the view), free", () => {
const plan = planCinema(recompose("open", { modelId: "nano-banana-pro" }), ctx);
expect(plan.model.id).toBe("oss-qwen-edit");
const req = plan.steps[0].request;
expect(req.inputs?.images).toEqual([CAPTURE, STILL]);
expect(req.loras?.[0].file).toBe("qwen-image-edit-2511-multiple-angles-lora.safetensors");
- expect(req.prompt).toMatch(/^<sks> front-right quarter view elevated shot medium shot\. Re-render this exact camera view/);
+ // The capture is already 45° round and 30° up: the LoRA keeps its camera instead of turning it again.
+ expect(req.prompt).toMatch(/^<sks> front view eye-level shot medium shot\. Re-render this exact camera view/);
+ expect(plan.notes.join(" ")).toMatch(/re-renders your capture from its own camera/);
expect(plan.costUsd).toBe(0);
});
diff --git a/tests/scene3d-provider.test.ts b/tests/scene3d-provider.test.ts
index 9917d155..002f244a 100644
--- a/tests/scene3d-provider.test.ts
+++ b/tests/scene3d-provider.test.ts
@@ -87,7 +87,7 @@ describe("open engine: MoGe 2 scene (scene-mesh-moge)", () => {
});
describe("open engine: the recomposition on Qwen-Image-Edit 2511 (qwen-image-edit-2511-multi)", () => {
- it("binds the capture as image 1, the still as image 2, the Multiple-Angles LoRA and the camera words", async () => {
+ it("binds the capture as image 1, the still as image 2, the Multiple-Angles LoRA and its reference pose", async () => {
const { planCinema } = await import("@/lib/catalog/cinema");
const plan = planCinema(
{
@@ -116,7 +116,8 @@ describe("open engine: the recomposition on Qwen-Image-Edit 2511 (qwen-image-edi
expect(workflow["1201"].inputs.image).toBe("still.png");
const lora = Object.values(workflow).find((n) => n.class_type === "LoraLoaderModelOnly");
expect(lora?.inputs).toMatchObject({ lora_name: "qwen-image-edit-2511-multiple-angles-lora.safetensors", strength_model: 1 });
- expect(String(workflow["170:151"].inputs.prompt)).toMatch(/^<sks> front-left quarter view eye-level shot medium shot\. Re-render this exact camera view/);
+ // The capture already shows the flown view (300° round): the LoRA is told not to turn it again.
+ expect(String(workflow["170:151"].inputs.prompt)).toMatch(/^<sks> front view eye-level shot medium shot\. Re-render this exact camera view/);
expect(String(workflow["170:151"].inputs.prompt)).toContain("a 50 mm standard lens at f/2.8");
});
});