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.

Apps: Restore Photo keeps every face and the framing on your GPU

Adarsh2028b2184de5
diff --git a/CREDITS.md b/CREDITS.md
index effcf9c2..54328f3b 100644
--- a/CREDITS.md
+++ b/CREDITS.md
@@ -137,6 +137,7 @@ Some licences ask the app that runs their model to say so.
| Relight scene read | Open source | Image | [Depth Anything 3 mono large: Apache-2.0 (model card) · BiRefNet: MIT](https://spdx.org/licenses/Apache-2.0.html) | |
| QMA · 96 views | Alibaba Qwen | Image | [Qwen Research License Agreement (Qwen-Image 2.1): NON-COMMERCIAL, research and evaluation only; QMA Camera Angles LoRA by gribbliest @ 13007eec: Apache-2.0 on its card (no LICENSE file), an adapter of Qwen-Image 2.1, so non-commercial through its base; Texture-Fix VAE (madebyollin @ 9a10df81, optional: Options → Decoder Clean): Qwen Research License (card: license_name qwen-research)](https://huggingface.co/Qwen/Qwen-Image-2.1/blob/main/LICENSE) | Non-commercial |
| Qwen-Image-Edit Next Scene | Alibaba Qwen | Image | [Apache-2.0 (Qwen-Image-Edit-2509, Lightning LoRA); next-scene LoRA MIT (lovis93)](https://spdx.org/licenses/Apache-2.0.html) | |
+| Qwen-Image 2.1 Restore | Alibaba Qwen × AusBoss | Image | [Qwen Research License Agreement (Qwen-Image 2.1): NON-COMMERCIAL, research and evaluation only; Restore LoRA by AusBoss under the same licence; SeedVR2 Apache-2.0](https://huggingface.co/Qwen/Qwen-Image-2.1/blob/main/LICENSE) | Non-commercial |
| Chatterbox Multilingual | Resemble AI | Audio | [Chatterbox weights MIT (ResembleAI); pack repo has no LICENSE file](https://spdx.org/licenses/MIT.html) | |
| IndexTTS-2 | Bilibili | Audio | bilibili IndexTTS-2 Model Use License: commercial use allowed below 100M MAU / RMB 1B annual revenue; may not be used to improve other AI models. Pack code: no LICENSE file | Conditions apply |
| Qwen3-TTS | Alibaba Qwen | Audio | [Qwen3-TTS weights Apache-2.0 (Qwen); ComfyUI-QwenTTS code GPL-3.0](https://spdx.org/licenses/Apache-2.0.html) | |
diff --git a/scripts/comfy/hand-built/restore-qwen-image-21.json b/scripts/comfy/hand-built/restore-qwen-image-21.json
new file mode 100644
index 00000000..a0d799aa
--- /dev/null
+++ b/scripts/comfy/hand-built/restore-qwen-image-21.json
@@ -0,0 +1,327 @@
+{
+ "1": {
+ "inputs": {
+ "unet_name": "qwen_image_2.1_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "2": {
+ "inputs": {
+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",
+ "type": "qwen_image",
+ "device": "default"
+ },
+ "class_type": "CLIPLoader",
+ "_meta": {
+ "title": "Load CLIP (Qwen3-VL 8B)"
+ }
+ },
+ "3": {
+ "inputs": {
+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "4": {
+ "inputs": {
+ "lora_name": "qwen-image-2.1-restore.safetensors",
+ "strength_model": 1,
+ "model": [
+ "1",
+ 0
+ ]
+ },
+ "class_type": "LoraLoaderModelOnly",
+ "_meta": {
+ "title": "Restore LoRA (1.0; 0.5 for a blurry photo)"
+ }
+ },
+ "10": {
+ "inputs": {
+ "image": "image.png"
+ },
+ "class_type": "LoadImage",
+ "_meta": {
+ "title": "Load Image (the photo)"
+ }
+ },
+ "20": {
+ "inputs": {
+ "upscale_method": "lanczos",
+ "megapixels": 2,
+ "resolution_steps": 32,
+ "image": [
+ "10",
+ 0
+ ]
+ },
+ "class_type": "ImageScaleToTotalPixels",
+ "_meta": {
+ "title": "To about 2 MP on the 32 grid"
+ }
+ },
+ "30": {
+ "inputs": {
+ "prompt": "",
+ "negative_prompt": "",
+ "resolution": 0,
+ "clip": [
+ "2",
+ 0
+ ],
+ "vae": [
+ "3",
+ 0
+ ],
+ "images.image_1": [
+ "20",
+ 0
+ ]
+ },
+ "class_type": "TextEncodeQwenImage21",
+ "_meta": {
+ "title": "Text Encode Qwen Image 2.1 (the photo as image 1)"
+ }
+ },
+ "31": {
+ "inputs": {
+ "device": "auto",
+ "dtype": "default",
+ "model": [
+ "4",
+ 0
+ ]
+ },
+ "class_type": "QwenImage21Cache",
+ "_meta": {
+ "title": "Qwen Image 2.1 Cache"
+ }
+ },
+ "32": {
+ "inputs": {
+ "seed": 0,
+ "steps": 25,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1,
+ "model": [
+ "31",
+ 0
+ ],
+ "positive": [
+ "30",
+ 0
+ ],
+ "negative": [
+ "30",
+ 1
+ ],
+ "latent_image": [
+ "30",
+ 2
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler (one pass, 25 steps)"
+ }
+ },
+ "33": {
+ "inputs": {
+ "samples": [
+ "32",
+ 0
+ ],
+ "vae": [
+ "3",
+ 0
+ ]
+ },
+ "class_type": "VAEDecode",
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "34": {
+ "inputs": {
+ "image": [
+ "33",
+ 0
+ ]
+ },
+ "class_type": "SplitImageWithAlpha",
+ "_meta": {
+ "title": "Drop the alpha"
+ }
+ },
+ "50": {
+ "inputs": {
+ "unet_name": "seedvr2_7b_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load SeedVR2 7B"
+ }
+ },
+ "51": {
+ "inputs": {
+ "vae_name": "seedvr2_ema_vae_fp16.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load SeedVR2 VAE"
+ }
+ },
+ "52": {
+ "inputs": {
+ "resize_type": "scale by multiplier",
+ "resize_type.multiplier": 2,
+ "scale_method": "lanczos",
+ "input": [
+ "34",
+ 0
+ ]
+ },
+ "class_type": "ResizeImageMaskNode",
+ "_meta": {
+ "title": "Enlarge the restored photo (2x)"
+ }
+ },
+ "53": {
+ "inputs": {
+ "resized_images": [
+ "52",
+ 0
+ ]
+ },
+ "class_type": "SeedVR2Preprocess",
+ "_meta": {
+ "title": "Pre-Process SeedVR2 Input"
+ }
+ },
+ "54": {
+ "inputs": {
+ "tile_size": 512,
+ "overlap": 128,
+ "temporal_size": 4096,
+ "temporal_overlap": 8,
+ "pixels": [
+ "53",
+ 0
+ ],
+ "vae": [
+ "51",
+ 0
+ ]
+ },
+ "class_type": "VAEEncodeTiled",
+ "_meta": {
+ "title": "VAE Encode (Tiled)"
+ }
+ },
+ "55": {
+ "inputs": {
+ "model": [
+ "50",
+ 0
+ ],
+ "vae_conditioning": [
+ "54",
+ 0
+ ]
+ },
+ "class_type": "SeedVR2Conditioning",
+ "_meta": {
+ "title": "SeedVR2 Conditioning"
+ }
+ },
+ "56": {
+ "inputs": {
+ "seed": 0,
+ "steps": 1,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1,
+ "model": [
+ "50",
+ 0
+ ],
+ "positive": [
+ "55",
+ 0
+ ],
+ "negative": [
+ "55",
+ 1
+ ],
+ "latent_image": [
+ "54",
+ 0
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler (SeedVR2, one step)"
+ }
+ },
+ "57": {
+ "inputs": {
+ "tile_size": 512,
+ "overlap": 128,
+ "temporal_size": 4096,
+ "temporal_overlap": 8,
+ "samples": [
+ "56",
+ 0
+ ],
+ "vae": [
+ "51",
+ 0
+ ]
+ },
+ "class_type": "VAEDecodeTiled",
+ "_meta": {
+ "title": "VAE Decode (Tiled)"
+ }
+ },
+ "58": {
+ "inputs": {
+ "color_correction_method": "lab",
+ "images": [
+ "57",
+ 0
+ ],
+ "original_resized_images": [
+ "52",
+ 0
+ ]
+ },
+ "class_type": "SeedVR2PostProcessing",
+ "_meta": {
+ "title": "Post-Process SeedVR2 Output (colour from the restored photo)"
+ }
+ },
+ "90": {
+ "inputs": {
+ "filename_prefix": "fuobe/restore-qwen-image-21",
+ "images": [
+ "58",
+ 0
+ ]
+ },
+ "class_type": "SaveImage",
+ "_meta": {
+ "title": "Save Image"
+ }
+ }
+}
diff --git a/scripts/comfy/library.spec.mjs b/scripts/comfy/library.spec.mjs
index 275fa796..b6ea0e4d 100644
--- a/scripts/comfy/library.spec.mjs
+++ b/scripts/comfy/library.spec.mjs
@@ -493,6 +493,10 @@ export const KNOWN_MODELS = {
// sha256 and size in model-pins.json), kept in models/text_encoders; the loader is given its full path at run time.
'adapter_v12.safetensors': { folder: 'text_encoders', url: 'https://github.com/recoilme/zen-image-edit-comfyui/releases/download/v2/adapter_v12.safetensors' },
'texture_fix_vae_for_qwen_image_2.1_bf16.safetensors': { folder: 'vae', url: 'https://huggingface.co/madebyollin/texture-fix-vae-for-qwen-image-2.1/resolve/9a10df811f183323e4e94d255c18add1924ce340/texture_fix_vae_for_qwen_image_2.1_bf16.safetensors' },
+ // Restore (restore-qwen-image-21): AusBoss's Restore LoRA (step 1,500, the card's "start here" file; revision, size and
+ // SHA-256 in model-pins.json), and the SeedVR2 7B int8 its hand-built graph enlarges with (the same file as the template's).
+ 'qwen-image-2.1-restore.safetensors': { folder: 'loras', url: 'https://huggingface.co/ausboss/Qwen-Image-2.1-Restore-LoRA/resolve/main/qwen-image-2.1-restore.safetensors' },
+ 'seedvr2_7b_int8_convrot.safetensors': { folder: 'diffusion_models', url: 'https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_7b_int8_convrot.safetensors' },
// owner's SOTA families (2026-10-31): Ideogram 4 (Comfy-Org/Ideogram-4; its flux2-vae is the flux2-dev row above). `variants`:
// the same weights in another precision in the same repository, which a ComfyUI may list instead of the pinned file.
@@ -1246,6 +1250,30 @@ export const SPEC = [
vramGb: 16,
notes: 'Native SeedVR2 nodes (core ComfyUI >= 0.28), one-step diffusion restoration. scale = output multiplier (template 4). The numz/ComfyUI-SeedVR2_VideoUpscaler pack is NOT used (it cannot register on CPU-only hosts and is superseded by core nodes).',
},
+ {
+ id: 'restore-qwen-image-21',
+ title: 'Restore an old or damaged photo, same faces and framing (Qwen-Image 2.1 + AusBoss Restore LoRA, then SeedVR2 2x)',
+ capability: 'edit',
+ handBuilt: 'hand-built/restore-qwen-image-21.json',
+ bindings: {
+ prompt: [b('30', 'prompt')], image: [b('10', 'image')],
+ seed: [b('32', 'seed'), b('56', 'seed')], steps: [b('32', 'steps')],
+ loraStrength: [b('4', 'strength_model')], scale: [b('52', 'resize_type.multiplier')],
+ },
+ outputs: [{ node: '90', kind: 'image' }],
+ defaults: { steps: 25, loraStrength: 1, scale: 2 },
+ vramGb: 20,
+ license: 'Qwen Research License Agreement (Qwen-Image 2.1): NON-COMMERCIAL, research and evaluation only; Restore LoRA by AusBoss under the same licence; SeedVR2 Apache-2.0',
+ notes:
+ 'One restore pass as the Restore LoRA card sets it up, then a SeedVR2 enlargement. The photo is scaled to about 2 MP on the 32 grid (ImageScaleToTotalPixels, lanczos: ' +
+ 'small prints grow to it, big noisy ones shrink to it, as the card asks) -> UNETLoader -> LoraLoaderModelOnly (qwen-image-2.1-restore, step 1,500; loraStrength 1.0, 0.5 for a blurry photo) -> ' +
+ 'QwenImage21Cache -> TextEncodeQwenImage21 (the photo as image 1, resolution 0, no negative) -> KSampler on its latent, 25 steps, cfg 1, euler, simple, denoise 1 -> ' +
+ 'VAEDecode -> SplitImageWithAlpha. Then SeedVR2 7B int8 one step (the nodes of the upscale-image-seedvr2 template): ResizeImageMaskNode x scale (2) lanczos -> Preprocess -> ' +
+ 'VAEEncodeTiled 512/128 -> Conditioning -> KSampler 1 step -> VAEDecodeTiled -> PostProcessing (lab colour from the restored photo). About 8 MP out. ' +
+ 'Prompt: one of the two instructions the LoRA was trained on, alone (a wrong "Scene:" description painted features that were not there). No turbo LoRA (25 steps sat closer: 0.15 px, face 0.90). ' +
+ 'One pass only (a second came back crunchy); never with the Consistency or Outfit-Swap LoRA. Faces under about 100 px can come back as a slightly different person. ' +
+ 'The open route of the Restore Photo app.',
+ },
{
id: 'bg-remove-birefnet',
title: 'Remove Background (BiRefNet, native)',
diff --git a/src/lib/catalog/apps.ts b/src/lib/catalog/apps.ts
index 40455757..64b90770 100644
--- a/src/lib/catalog/apps.ts
+++ b/src/lib/catalog/apps.ts
@@ -1173,11 +1173,45 @@ export const APPS: Preset[] = [
app({
name: "Restore Photo",
category: "Style",
- description: "Fix scratches, blur and damage",
+ description: "An old print back sharp and clean, with the same faces",
icon: "Sparkles",
hue: 160,
- prompt:
- "Restore this old photograph: remove scratches, dust, stains and blur, recover sharp detail and natural skin texture. Keep the people and composition identical.",
+ options: [
+ {
+ key: "photo",
+ label: "Your photo",
+ // The two instructions AusBoss's Restore LoRA was trained on, word for word (the open route); its strength per
+ // kind of photo is the card's: 0.5 for a blurry one, 1.0 for a worn print or a small, grainy picture.
+ choices: [
+ {
+ value: "old-print",
+ label: "Old print",
+ prompt:
+ "Restore the old photo: remove scratches, dust, fading and grain and recover sharp, natural detail and color, keeping the same composition and people.",
+ openExtra: { loraStrength: 1 },
+ },
+ {
+ value: "soft-or-blurry",
+ label: "Soft or blurry",
+ prompt:
+ "Restore the photo: remove blur, noise and compression artifacts and recover sharp, natural detail, keeping the same composition, people and colors.",
+ openExtra: { loraStrength: 0.5 },
+ },
+ {
+ value: "small-or-grainy",
+ label: "Small or grainy",
+ prompt:
+ "Restore the photo: remove blur, noise and compression artifacts and recover sharp, natural detail, keeping the same composition, people and colors.",
+ openExtra: { loraStrength: 1 },
+ },
+ ],
+ },
+ ],
+ prompt: "{option:photo}",
+ // Your GPU: the Restore LoRA holds the picture on its own frame, so every face stays the person it was; SeedVR2 then
+ // enlarges it 2x. The cloud runs the same words on its edit model.
+ open: { modelId: "oss-qwen-image-21-restore", op: "edit" },
+ parity: "Takes away scratches, dust, fading and blur, and keeps every face and the framing as they were.",
}),
app({
name: "Figurine",
diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.ts
index c9cf2469..91afa0e1 100644
--- a/src/lib/catalog/models.ts
+++ b/src/lib/catalog/models.ts
@@ -1413,6 +1413,20 @@ const open: ModelDef[] = [
options: { seed: true, negativePrompt: true, maxImages: 2 },
hidden: true,
}),
+ // The Restore Photo app's engine: AusBoss's Restore LoRA keeps the picture on its own frame (0.2 px off, the same
+ // faces) where a plain edit redraws it, then SeedVR2 enlarges it 2x. Its strength (params.extra.loraStrength) comes
+ // from the app's choice: 0.5 for a blurry photo, 1.0 otherwise.
+ o({
+ id: "oss-qwen-image-21-restore",
+ name: "Qwen-Image 2.1 Restore",
+ vendor: "Alibaba Qwen × AusBoss",
+ family: "qwen-image",
+ kind: "image",
+ tagline: "Old, worn or small photos back sharp on the same frame, then enlarged 2x (Restore LoRA + SeedVR2) · 20 GB GPU · non-commercial weights",
+ routes: [{ ...comfy("edit", "restore-qwen-image-21", "Restore LoRA, 25 steps at about 2 MP, then SeedVR2 2x"), unsized: true, maxImages: 1 }],
+ options: { seed: true, maxImages: 1 },
+ hidden: true,
+ }),
// ---------------- Audio
o({
diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.ts
index c029c091..d57c2b63 100644
--- a/src/lib/catalog/plan.ts
+++ b/src/lib/catalog/plan.ts
@@ -321,8 +321,10 @@ export function planGeneration(
const hasExtra = Object.keys(routeExtra).length > 0 || !!req.params?.extra;
const extra = sameModel && hasExtra ? { extra: { ...routeExtra, ...req.params?.extra } } : {};
params = { ...model.defaults, ...(sameModel ? routePlain : {}), ...req.params, ...extra };
- // Option choices that set model settings (Angles: rotate / tilt / zoom); a value the user set wins.
- const chosen = Object.assign({}, ...(preset.options ?? []).map((o) => o.choices.find((c) => c.value === (req.presetOptions?.[o.key] ?? o.default ?? o.choices[0]?.value))?.extra ?? {}));
+ // Option choices that set model settings (Angles: rotate / tilt / zoom; Restore: its LoRA's strength, on the open
+ // engine only); a value the user set wins.
+ const picks = (preset.options ?? []).map((o) => o.choices.find((c) => c.value === (req.presetOptions?.[o.key] ?? o.default ?? o.choices[0]?.value)));
+ const chosen = Object.assign({}, ...picks.map((c) => ({ ...c?.extra, ...(model.engine === "open" && c?.openExtra) })));
if (sameModel && Object.keys(chosen).length) params = { ...params, extra: { ...chosen, ...params.extra } };
loras = sameModel ? (route.loras ?? []) : [];
if (sameModel) op = op ?? route.op;
diff --git a/src/lib/catalog/preset-recipe-routes.ts b/src/lib/catalog/preset-recipe-routes.ts
index a22d64a9..daf8c3df 100644
--- a/src/lib/catalog/preset-recipe-routes.ts
+++ b/src/lib/catalog/preset-recipe-routes.ts
@@ -50,6 +50,7 @@ export type RecipeKind = "h3" | "orbit" | "qwen";
* - Any Angle: a tool of its own (a 3D view of the photo, then each angle from it on the GPU).
* - Tap to Recolor: a tool of its own, whose taps make the mask its graph repaints.
* - Steam It: its own graph finds the clothes and repaints only them, so every other pixel stays the upload's.
+ * - Restore Photo: its Restore LoRA keeps every face and the framing, where a plain edit redraws them.
*/
export const OWN_ROUTE_APPS: ReadonlySet<string> = new Set([
"app-fuobe-angles",
@@ -69,6 +70,7 @@ export const OWN_ROUTE_APPS: ReadonlySet<string> = new Set([
"app-any-angle",
"app-tap-to-recolor",
"app-steam-it",
+ "app-restore-photo",
]);
/**
diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.ts
index f4c95648..b09d2c9a 100644
--- a/src/lib/catalog/types.ts
+++ b/src/lib/catalog/types.ts
@@ -1418,6 +1418,8 @@ export interface PresetChoice {
prompt: string;
/** Model settings this choice sets (params.extra), e.g. the camera angle sliders of Qwen Multiple Angles; what the user set wins. */
extra?: Record<string, number | string | boolean>;
+ /** Settings only the open engine's graph reads (the Restore LoRA's strength), left out of a cloud run. */
+ openExtra?: Record<string, number | string | boolean>;
}
export interface PresetOption {
diff --git a/tests/app-restore.test.ts b/tests/app-restore.test.ts
new file mode 100644
index 00000000..e199460a
--- /dev/null
+++ b/tests/app-restore.test.ts
@@ -0,0 +1,174 @@
+import fs from "node:fs";
+import os from "node:os";
+import path from "node:path";
+import { afterAll, describe, expect, it } from "vitest";
+import type { GenInput } from "@/lib/catalog/types";
+import type { ComfyWorkflow, ManifestWorkflow } from "@/lib/comfy";
+
+// Restore Photo on your GPU: one pass of Qwen-Image 2.1 with AusBoss's Restore LoRA at about 2 MP (the same faces, on the
+// picture's own frame), then SeedVR2 enlarges it 2x. Its choice of photo picks the instruction and the LoRA's strength.
+const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-restore-"));
+process.env.FUOBE_DATA_DIR = tmp;
+process.env.COMFYUI_URL = "http://comfy.test:8188";
+const { prepareWorkflow } = await import("@/server/providers/comfyui");
+const { getModel, getPreset } = await import("@/lib/catalog");
+const { planGeneration } = await import("@/lib/catalog/plan");
+const { OWN_ROUTE_APPS, presetRoutes } = await import("@/lib/catalog/preset-recipe-routes");
+const { licenceInfo, workflowLicence } = await import("@/lib/licences");
+const { KNOWN_MODELS, SPEC } = await import("../scripts/comfy/library.spec.mjs");
+afterAll(() => fs.rmSync(tmp, { recursive: true, force: true }));
+
+const ID = "restore-qwen-image-21";
+const APP = "app-restore-photo";
+const LORA_URL = "https://huggingface.co/ausboss/Qwen-Image-2.1-Restore-LoRA/resolve/main/qwen-image-2.1-restore.safetensors";
+const LIBRARY = path.join(process.cwd(), "workflows/comfyui");
+const read = (f: string) => JSON.parse(fs.readFileSync(path.join(LIBRARY, f), "utf8"));
+const manifest = () => (read("manifest.json") as { workflows: ManifestWorkflow[] }).workflows.find((w) => w.id === ID)!;
+const ofClass = (wf: ComfyWorkflow, cls: string) => Object.entries(wf).filter(([, n]) => n.class_type === cls);
+const link = (v: unknown) => v as [string, number];
+
+async function prepare(input: GenInput) {
+ return prepareWorkflow(ID, { seed: 7, ...input }, {
+ generationId: "g",
+ op: "edit",
+ upload: async (_d, _t, name) => `up_${name}`,
+ media: () => undefined,
+ serverRam: async () => undefined,
+ });
+}
+
+const plan = (engine: "cloud" | "open", presetOptions?: Record<string, string>) => {
+ const preset = getPreset(APP)!;
+ const route = engine === "cloud" ? preset.cloud! : preset.open!;
+ return planGeneration({ feature: `app:${APP}`, presetId: APP, modelId: route.modelId, inputs: { images: ["/api/files/print.png"] }, presetOptions }, getModel, getPreset);
+};
+
+describe("the restore graph in the library", () => {
+ it("is the hand-built graph, unchanged, with its bindings, defaults and the six files it reads", () => {
+ const m = manifest();
+ expect(m).toBeDefined();
+ expect(read(`${ID}.json`)).toEqual(JSON.parse(fs.readFileSync(path.join(process.cwd(), "scripts/comfy/hand-built", `${ID}.json`), "utf8")));
+ expect(m.capability).toBe("edit");
+ expect(m.validated, "stays unvalidated until it runs on a GPU").toBe(false);
+ expect(Object.keys(m.bindings).sort()).toEqual(["filenamePrefix", "image", "loraStrength", "prompt", "scale", "seed", "steps"]);
+ expect(m.defaults).toEqual({ steps: 25, scale: 2, loraStrength: 1 });
+ expect(m.customNodes).toEqual([]);
+ expect(m.models.map((x) => `${x.folder}/${x.file}`).sort()).toEqual([
+ "diffusion_models/qwen_image_2.1_int8_convrot.safetensors",
+ "diffusion_models/seedvr2_7b_int8_convrot.safetensors",
+ "loras/qwen-image-2.1-restore.safetensors",
+ "text_encoders/qwen3vl_8b_int8_convrot.safetensors",
+ "vae/qwen_image_2.1_vae_bf16.safetensors",
+ "vae/seedvr2_ema_vae_fp16.safetensors",
+ ]);
+ // The spec and the manifest say the same thing.
+ const spec = (SPEC as { id: string; bindings: Record<string, unknown>; license: string; notes: string }[]).find((s) => s.id === ID)!;
+ for (const [k, v] of Object.entries(spec.bindings)) expect(m.bindings[k], k).toEqual(v);
+ expect(m.license).toBe(spec.license);
+ expect(m.notes).toBe(spec.notes);
+ });
+
+ it("pins the LoRA to the revision, size and SHA-256 that were read", () => {
+ expect((KNOWN_MODELS as Record<string, { folder: string; url: string }>)["qwen-image-2.1-restore.safetensors"]).toEqual({ folder: "loras", url: LORA_URL });
+ expect(read("model-pins.json")[LORA_URL]).toEqual({
+ revision: "a223f1255f4738b89b36d79c44d61740d3b3546f",
+ sizeBytes: 159436584,
+ sha256: "65de4f6c2468071d5aa6ffbd82c76bfee7cc8ac28fe960e91bbca4a58f43c08c",
+ });
+ const req = read("requirements.json") as { workflows: Record<string, { files: string[]; packs: object }>; files: Record<string, { pinnedUrl: string }> };
+ expect(req.workflows[ID].packs).toEqual({});
+ expect(req.workflows[ID].files).toContain("loras/qwen-image-2.1-restore.safetensors");
+ expect(req.files["loras/qwen-image-2.1-restore.safetensors"].pinnedUrl).toBe(LORA_URL.replace("/main/", "/a223f1255f4738b89b36d79c44d61740d3b3546f/"));
+ });
+
+ it("records the licence as non-commercial (Qwen Research, the LoRA under the same terms)", () => {
+ expect(licenceInfo(workflowLicence(manifest()))).toMatchObject({ name: "Qwen Research License", class: "non-commercial" });
+ expect(manifest().license).toMatch(/Restore LoRA by AusBoss under the same licence/);
+ });
+});
+
+describe("the restore graph as Fuobe sends it", () => {
+ it("one pass at about 2 MP with the LoRA before the cache, 25 steps at cfg 1, then SeedVR2 2x", async () => {
+ const { workflow: wf, manifest: m } = await prepare({ prompt: "Restore the old photo.", images: ["print.png"], extra: { loraStrength: 0.5 } });
+ // The photo, scaled to about 2 MP on the 32 grid, is image 1 of the encoder.
+ const [encId, enc] = ofClass(wf, "TextEncodeQwenImage21")[0];
+ expect(enc.inputs).toMatchObject({ prompt: "Restore the old photo.", negative_prompt: "", resolution: 0 });
+ const scale = wf[link(enc.inputs["images.image_1"])[0]];
+ expect(scale).toMatchObject({ class_type: "ImageScaleToTotalPixels", inputs: { megapixels: 2, resolution_steps: 32, upscale_method: "lanczos" } });
+ expect(wf[link(scale.inputs.image)[0]].inputs.image).toBe("print.png");
+ // The Restore LoRA sits between the model and the cache, at the strength asked for.
+ const [, lora] = ofClass(wf, "LoraLoaderModelOnly")[0];
+ expect(ofClass(wf, "LoraLoaderModelOnly")).toHaveLength(1);
+ expect(lora.inputs).toMatchObject({ lora_name: "qwen-image-2.1-restore.safetensors", strength_model: 0.5 });
+ expect(wf[link(lora.inputs.model)[0]].inputs.unet_name).toBe("qwen_image_2.1_int8_convrot.safetensors");
+ const [cacheId, cache] = ofClass(wf, "QwenImage21Cache")[0];
+ expect(wf[link(cache.inputs.model)[0]].class_type).toBe("LoraLoaderModelOnly");
+ const restore = ofClass(wf, "KSampler").find(([, n]) => link(n.inputs.model)[0] === cacheId)![1];
+ expect(restore.inputs).toMatchObject({ steps: 25, cfg: 1, sampler_name: "euler", scheduler: "simple", denoise: 1, seed: 7, latent_image: [encId, 2] });
+ // SeedVR2 enlarges the restored picture (alpha dropped) twice, takes its colour from it, and that is what is saved.
+ const [, resize] = ofClass(wf, "ResizeImageMaskNode")[0];
+ expect(resize.inputs).toMatchObject({ resize_type: "scale by multiplier", "resize_type.multiplier": 2, scale_method: "lanczos" });
+ expect(wf[link(resize.inputs.input)[0]].class_type).toBe("SplitImageWithAlpha");
+ const saved = wf[link(wf[m.outputs[0].node].inputs.images)[0]];
+ expect(saved).toMatchObject({ class_type: "SeedVR2PostProcessing", inputs: { color_correction_method: "lab" } });
+ const seedvr = ofClass(wf, "KSampler").find(([, n]) => wf[link(n.inputs.model)[0]].inputs.unet_name === "seedvr2_7b_int8_convrot.safetensors")![1];
+ expect(seedvr.inputs).toMatchObject({ steps: 1, seed: 7 });
+ expect(wf[m.outputs[0].node].inputs.filename_prefix).toBe("fuobe/g");
+ });
+
+ it("runs the LoRA at 1.0 when nothing asks otherwise, and needs the photo", async () => {
+ const { workflow: wf } = await prepare({ prompt: "Restore the photo.", images: ["p.png"] });
+ expect(ofClass(wf, "LoraLoaderModelOnly")[0][1].inputs.strength_model).toBe(1);
+ await expect(prepare({ prompt: "Restore the photo." })).rejects.toThrow();
+ });
+});
+
+describe("the Restore Photo app", () => {
+ it("runs its own route on your GPU, whatever its preview ran", () => {
+ expect(OWN_ROUTE_APPS.has(APP)).toBe(true);
+ const preset = getPreset(APP)!;
+ expect(preset.open).toMatchObject({ modelId: "oss-qwen-image-21-restore", op: "edit" });
+ expect(presetRoutes(preset, "open", (id) => !!getModel(id)).map((r) => r.modelId)).toEqual(["oss-qwen-image-21-restore"]);
+ const model = getModel("oss-qwen-image-21-restore")!;
+ expect(model).toMatchObject({ engine: "open", hidden: true, kind: "image" });
+ expect(model.routes).toEqual([expect.objectContaining({ op: "edit", provider: "comfyui", endpoint: ID, unsized: true, maxImages: 1 })]);
+ expect(preset.userPrompt).toBe("none");
+ });
+
+ it("asks only which kind of photo it is: three plain choices, an old print first", () => {
+ const [opt] = getPreset(APP)!.options!;
+ expect(getPreset(APP)!.options).toHaveLength(1);
+ expect(opt.choices.map((c) => c.label)).toEqual(["Old print", "Soft or blurry", "Small or grainy"]);
+ for (const c of opt.choices) expect(c.label.length, c.label).toBeLessThanOrEqual(16);
+ });
+
+ it.each([
+ ["old-print", /^Restore the old photo: remove scratches, dust, fading and grain/, 1],
+ ["soft-or-blurry", /^Restore the photo: remove blur, noise and compression artifacts/, 0.5],
+ ["small-or-grainy", /^Restore the photo: remove blur, noise and compression artifacts/, 1],
+ ] as const)("%s: the trained instruction alone, and the LoRA at the card's strength on your GPU", (choice, words, strength) => {
+ const open = plan("open", { photo: choice });
+ expect(open.model.id).toBe("oss-qwen-image-21-restore");
+ expect(open.op).toBe("edit");
+ expect(open.prompt).toMatch(words);
+ expect(open.prompt).not.toMatch(/Scene:/);
+ expect(open.params.extra?.loraStrength).toBe(strength);
+ // The cloud runs the same words on its edit model, without a setting only the GPU graph reads.
+ const cloud = plan("cloud", { photo: choice });
+ expect(cloud.prompt).toBe(open.prompt);
+ expect(cloud.params.extra?.loraStrength).toBeUndefined();
+ });
+
+ it("starts on an old print", () => {
+ expect(plan("open").params.extra?.loraStrength).toBe(1);
+ expect(plan("open").prompt).toMatch(/^Restore the old photo/);
+ });
+
+ it("says what it does in plain words, with no model names", () => {
+ const p = getPreset(APP)!;
+ for (const text of [p.name, p.description, p.parity ?? "", ...p.options!.flatMap((o) => [o.label, ...o.choices.map((c) => c.label)])]) {
+ expect(text, text).not.toMatch(/qwen|lora|seedvr|ausboss|comfy|\bMP\b|megapixel/i);
+ }
+ expect(p.description).toMatch(/same faces/);
+ });
+});
diff --git a/tests/comfy-library-4.test.ts b/tests/comfy-library-4.test.ts
index 452c730f..49410d13 100644
--- a/tests/comfy-library-4.test.ts
+++ b/tests/comfy-library-4.test.ts
@@ -95,6 +95,7 @@ describe("round-4 ComfyUI workflows", () => {
// encoder became the int8 file (the w4a8 one faulted the driver). MiniMax H3's video graphs wait for their first run.
expect(manifest.workflows.filter((w) => !w.validated).map((w) => w.id)).toEqual([
"moss-image-t2i",
+ "restore-qwen-image-21",
"minimax-h3-t2v",
"minimax-h3-i2v",
"minimax-h3-flf2v",
diff --git a/workflows/comfyui/manifest.json b/workflows/comfyui/manifest.json
index dc4ce12f..87b9af67 100644
--- a/workflows/comfyui/manifest.json
+++ b/workflows/comfyui/manifest.json
@@ -2455,6 +2455,116 @@
"validated": true,
"notes": "Native SeedVR2 nodes (core ComfyUI >= 0.28), one-step diffusion restoration. scale = output multiplier (template 4). The numz/ComfyUI-SeedVR2_VideoUpscaler pack is NOT used (it cannot register on CPU-only hosts and is superseded by core nodes)."
},
+ {
+ "id": "restore-qwen-image-21",
+ "title": "Restore an old or damaged photo, same faces and framing (Qwen-Image 2.1 + AusBoss Restore LoRA, then SeedVR2 2x)",
+ "capability": "edit",
+ "file": "restore-qwen-image-21.json",
+ "source": "hand-built (scripts/comfy/hand-built/restore-qwen-image-21.json)",
+ "bindings": {
+ "prompt": [
+ {
+ "node": "30",
+ "input": "prompt"
+ }
+ ],
+ "image": [
+ {
+ "node": "10",
+ "input": "image"
+ }
+ ],
+ "seed": [
+ {
+ "node": "32",
+ "input": "seed"
+ },
+ {
+ "node": "56",
+ "input": "seed"
+ }
+ ],
+ "steps": [
+ {
+ "node": "32",
+ "input": "steps"
+ }
+ ],
+ "loraStrength": [
+ {
+ "node": "4",
+ "input": "strength_model"
+ }
+ ],
+ "scale": [
+ {
+ "node": "52",
+ "input": "resize_type.multiplier"
+ }
+ ],
+ "filenamePrefix": [
+ {
+ "node": "90",
+ "input": "filename_prefix"
+ }
+ ]
+ },
+ "outputs": [
+ {
+ "node": "90",
+ "kind": "image"
+ }
+ ],
+ "defaults": {
+ "steps": 25,
+ "scale": 2,
+ "loraStrength": 1
+ },
+ "limits": {},
+ "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": "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
+ },
+ {
+ "file": "qwen-image-2.1-restore.safetensors",
+ "folder": "loras",
+ "url": "https://huggingface.co/ausboss/Qwen-Image-2.1-Restore-LoRA/resolve/main/qwen-image-2.1-restore.safetensors",
+ "sizeGb": 0.16
+ },
+ {
+ "file": "seedvr2_7b_int8_convrot.safetensors",
+ "folder": "diffusion_models",
+ "url": "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_7b_int8_convrot.safetensors",
+ "sizeGb": 8.33
+ },
+ {
+ "file": "seedvr2_ema_vae_fp16.safetensors",
+ "folder": "vae",
+ "url": "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/vae/seedvr2_ema_vae_fp16.safetensors",
+ "sizeGb": 0.5
+ }
+ ],
+ "customNodes": [],
+ "vramGb": 20,
+ "license": "Qwen Research License Agreement (Qwen-Image 2.1): NON-COMMERCIAL, research and evaluation only; Restore LoRA by AusBoss under the same licence; SeedVR2 Apache-2.0",
+ "validated": false,
+ "notes": "One restore pass as the Restore LoRA card sets it up, then a SeedVR2 enlargement. The photo is scaled to about 2 MP on the 32 grid (ImageScaleToTotalPixels, lanczos: small prints grow to it, big noisy ones shrink to it, as the card asks) -> UNETLoader -> LoraLoaderModelOnly (qwen-image-2.1-restore, step 1,500; loraStrength 1.0, 0.5 for a blurry photo) -> QwenImage21Cache -> TextEncodeQwenImage21 (the photo as image 1, resolution 0, no negative) -> KSampler on its latent, 25 steps, cfg 1, euler, simple, denoise 1 -> VAEDecode -> SplitImageWithAlpha. Then SeedVR2 7B int8 one step (the nodes of the upscale-image-seedvr2 template): ResizeImageMaskNode x scale (2) lanczos -> Preprocess -> VAEEncodeTiled 512/128 -> Conditioning -> KSampler 1 step -> VAEDecodeTiled -> PostProcessing (lab colour from the restored photo). About 8 MP out. Prompt: one of the two instructions the LoRA was trained on, alone (a wrong \"Scene:\" description painted features that were not there). No turbo LoRA (25 steps sat closer: 0.15 px, face 0.90). One pass only (a second came back crunchy); never with the Consistency or Outfit-Swap LoRA. Faces under about 100 px can come back as a slightly different person. The open route of the Restore Photo app."
+ },
{
"id": "bg-remove-birefnet",
"title": "Remove Background (BiRefNet, native)",
diff --git a/workflows/comfyui/model-pins.json b/workflows/comfyui/model-pins.json
index 061169f4..25a3a5cb 100644
--- a/workflows/comfyui/model-pins.json
+++ b/workflows/comfyui/model-pins.json
@@ -862,6 +862,11 @@
"sizeBytes": 159436576,
"sha256": "3611a5ccae5f790405eeacf1dfb2c89285c1e4f2987b9abc88cd0161a60eca28"
},
+ "https://huggingface.co/ausboss/Qwen-Image-2.1-Restore-LoRA/resolve/main/qwen-image-2.1-restore.safetensors": {
+ "revision": "a223f1255f4738b89b36d79c44d61740d3b3546f",
+ "sizeBytes": 159436584,
+ "sha256": "65de4f6c2468071d5aa6ffbd82c76bfee7cc8ac28fe960e91bbca4a58f43c08c"
+ },
"https://huggingface.co/black-forest-labs/FLUX.2-klein-4b-fp8/resolve/main/flux-2-klein-4b-fp8.safetensors": {
"revision": "5b4408e59397a4a37ccb46afe426d8ed86379441",
"sizeBytes": 4070624520,
diff --git a/workflows/comfyui/requirements.json b/workflows/comfyui/requirements.json
index 173ef597..6be697e8 100644
--- a/workflows/comfyui/requirements.json
+++ b/workflows/comfyui/requirements.json
@@ -1,6 +1,6 @@
{
"v": 1,
- "hash": "3de65ccc26512aa669874a7544966d08b75f2f1d2c32344a3816774b142d4c8d",
+ "hash": "ce8a3d8cae0643bb099132208a2aad8d4c8ab030b3cac9653971f0424bf697c2",
"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","AILab_Qwen3TTSVoiceClone_Advanced","AILab_Qwen3TTSVoiceDesign_Advanced","AUSBOSS_NODES_CropForInpaint","AUSBOSS_NODES_ImageCropRotatePad","AUSBOSS_NODES_MaskByTouch","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","H3AdvancedSwapPlan","H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan","H3ClipShots","H3FaceChunks","H3FaceJoin","H3FaceMaskSAM","H3FaceStitch","H3FaceTrackCrop","H3FillShots","H3GreyMannequins","H3ObjectSwapPlan","H3PeopleMask","H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan","H3RoleMask","H3SLAAttention","H3SoundtrackOrSilence","H3SourceSlice","H3SubjectPrompt","H3TrackCrops","H3TrackRoles","HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader","INTConstant","Ideogram4Scheduler","ImageBatchExtendWithOverlap","ImageDetailContrast","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","Metric3D-NormalMapPreprocessor","MiniMaxH3ChainAssemble","MiniMaxH3ChainContext","MiniMaxH3ChainCurrent","MiniMaxH3ChainLoopEnd","MiniMaxH3ChainLoopStart","MiniMaxH3ChainPlanModern","MiniMaxH3ChainReview","MiniMaxH3ChainSegmentSave","MiniMaxH3ContexMaskedTarget","MiniMaxH3FantasticVideoEditLatent","MiniMaxH3GenerationProfile","MiniMaxH3LoopTrim","MiniMaxH3SourceTimeline","MiniMaxH3TurboLoRA","MiniMaxH3TurboSampler","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","OpenH3RegenFastVAEDecode","OpenH3RegenFinish","OpenH3RegenLora","OpenH3RegenPrepareDraft","OpenH3RegenRefineLatent","OpenH3RegenSigmas","OpenH3RegenUpscale","OpenH3SaveRefinedLatent","Orion4D_FXMax_DCTLToneMapper","PasteBackFuobeLive","Qwen21EncodeFuobeLive","Qwen21ReferenceFuobeLive","QwenImage21Cache","REUSEEnhance","REUSELoader","RIFE VFI","RMBG","ReActorFaceSwap","RemoveBackground","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SAMLoader","SaveImageFuobeLive","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","SolarRendererConditioning","SolarRendererLoraLoader","SolarRendererModel","SolarRendererSigmas","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","VRAM_Debug","VideoDepthAnythingOutput","VideoDepthAnythingProcess","VideoLengthAdjuster","ViggleTurboLora","ViggleTurboSigmas","VoxCPM2_Clone","VoxCPM2_TTS","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader","ZenImage21AdapterLoader","ZenImage21TextEncode"],
@@ -195,6 +195,7 @@
"loras/qwen-edit-2509-multiple-angles-dx8152.safetensors": {"folder":"loras","file":"qwen-edit-2509-multiple-angles-dx8152.safetensors","url":"https://huggingface.co/dx8152/Qwen-Edit-2509-Multiple-angles/resolve/c342b0e746c3a3275af1a4a0c6ae78e0e4802531/%E9%95%9C%E5%A4%B4%E8%BD%AC%E6%8D%A2.safetensors","pinnedUrl":"https://huggingface.co/dx8152/Qwen-Edit-2509-Multiple-angles/resolve/c342b0e746c3a3275af1a4a0c6ae78e0e4802531/%E9%95%9C%E5%A4%B4%E8%BD%AC%E6%8D%A2.safetensors","sizeBytes":236117032,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
"loras/qwen-image-2.1-outpaint-v2.safetensors": {"folder":"loras","file":"qwen-image-2.1-outpaint-v2.safetensors","url":"https://huggingface.co/ausboss/Qwen-Image-2.1-Outpaint-LoRA/resolve/main/qwen-image-2.1-outpaint-v2.safetensors","pinnedUrl":"https://huggingface.co/ausboss/Qwen-Image-2.1-Outpaint-LoRA/resolve/dca5bdc7eb328f6021f330140f64b00a820ae5cd/qwen-image-2.1-outpaint-v2.safetensors","sizeBytes":159436576,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
"loras/qwen-image-2.1-qma-camera-angles.safetensors": {"folder":"loras","file":"qwen-image-2.1-qma-camera-angles.safetensors","url":"https://huggingface.co/gribbliest/qwen-image-2.1-qma-camera-angles/resolve/13007eec2648c09529e930164c2ccc9c8c12428c/qwen-image-2.1-qma-camera-angles.safetensors","pinnedUrl":"https://huggingface.co/gribbliest/qwen-image-2.1-qma-camera-angles/resolve/13007eec2648c09529e930164c2ccc9c8c12428c/qwen-image-2.1-qma-camera-angles.safetensors","sizeBytes":318820224,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/qwen-image-2.1-restore.safetensors": {"folder":"loras","file":"qwen-image-2.1-restore.safetensors","url":"https://huggingface.co/ausboss/Qwen-Image-2.1-Restore-LoRA/resolve/main/qwen-image-2.1-restore.safetensors","pinnedUrl":"https://huggingface.co/ausboss/Qwen-Image-2.1-Restore-LoRA/resolve/a223f1255f4738b89b36d79c44d61740d3b3546f/qwen-image-2.1-restore.safetensors","sizeBytes":159436584,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
"loras/solarrenderer_4step_lora_rank64.safetensors": {"folder":"loras","file":"solarrenderer_4step_lora_rank64.safetensors","url":"https://huggingface.co/mdevoz/SolarRendererRank64/resolve/984a10b7c167bbb94614f9644d5fedbb93a8c6e6/solarrenderer_4step_lora_rank64.safetensors","pinnedUrl":"https://huggingface.co/mdevoz/SolarRendererRank64/resolve/984a10b7c167bbb94614f9644d5fedbb93a8c6e6/solarrenderer_4step_lora_rank64.safetensors","sizeBytes":691873992,"gated":false,"presence":"list"},
"loras/solarrenderer_control_lora_rank64.safetensors": {"folder":"loras","file":"solarrenderer_control_lora_rank64.safetensors","url":"https://huggingface.co/mdevoz/SolarRendererRank64/resolve/984a10b7c167bbb94614f9644d5fedbb93a8c6e6/solarrenderer_control_lora_rank64.safetensors","pinnedUrl":"https://huggingface.co/mdevoz/SolarRendererRank64/resolve/984a10b7c167bbb94614f9644d5fedbb93a8c6e6/solarrenderer_control_lora_rank64.safetensors","sizeBytes":691873968,"gated":false,"presence":"list"},
"loras/tryon-klein-4b.safetensors": {"folder":"loras","file":"tryon-klein-4b.safetensors","url":"https://huggingface.co/xocialize/tryon-FLUX.2-klein-4B-lora/resolve/main/tryon-klein-4b.safetensors","pinnedUrl":"https://huggingface.co/xocialize/tryon-FLUX.2-klein-4B-lora/resolve/5e590220c687190a3d8dc66d173570f9de097984/tryon-klein-4b.safetensors","sizeBytes":92426760,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
@@ -400,6 +401,7 @@
"relight-qwen-edit-2509": {"core":["CFGNorm","CLIPLoader","FluxKontextImageScale","KSampler","LoadImage","LoraLoaderModelOnly","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImageAdvanced","StringConcatenate","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors","loras/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","loras/Qwen-Image-Edit-2509-Relight.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
"relight-qwen-edit-2509-reference": {"core":["CFGNorm","CLIPLoader","FluxKontextImageScale","KSampler","LoadImage","LoraLoaderModelOnly","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImageAdvanced","StringConcatenate","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors","loras/Qwen-Image-Edit-2509-Light-Migration.safetensors","loras/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
"relight-scene-read": {"core":["DA3Inference","DA3Render","LoadBackgroundRemovalModel","LoadDA3Model","LoadImage","MaskToImage","RemoveBackground","SaveImage"],"packs":{},"files":["background_removal/birefnet.safetensors","geometry_estimation/depth_anything_3_mono_large.safetensors"],"optional":[],"vramGb":6,"isolated":false,"firstRun":[]},
+ "restore-qwen-image-21": {"core":["CLIPLoader","ImageScaleToTotalPixels","KSampler","LoadImage","LoraLoaderModelOnly","QwenImage21Cache","ResizeImageMaskNode","SaveImage","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","SplitImageWithAlpha","TextEncodeQwenImage21","UNETLoader","VAEDecode","VAEDecodeTiled","VAEEncodeTiled","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_2.1_int8_convrot.safetensors","diffusion_models/seedvr2_7b_int8_convrot.safetensors","loras/qwen-image-2.1-restore.safetensors","text_encoders/qwen3vl_8b_int8_convrot.safetensors","vae/qwen_image_2.1_vae_bf16.safetensors","vae/seedvr2_ema_vae_fp16.safetensors"],"optional":[],"vramGb":20,"isolated":false,"firstRun":[]},
"scene-mesh-moge": {"core":["ComfyMathExpression","ComfySwitchNode","GetImageSize","LoadImage","LoadMoGeModel","MoGeInference","MoGePointMapToMesh","MoGeRender","ResizeImagesByLongerEdge","SaveGLB","SaveImage"],"packs":{},"files":["geometry_estimation/moge_2_vitl_normal_fp16.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},
"sdxl-t2i": {"core":["CLIPTextEncode","CheckpointLoaderSimple","EmptyLatentImage","KSampler","SaveImage","VAEDecode"],"packs":{},"files":["checkpoints/sd_xl_base_1.0.safetensors"],"optional":[],"vramGb":8,"isolated":false,"firstRun":[],"validated":true},
"selftest-image": {"core":["ImageInvert","LoadImage","SaveImage"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
diff --git a/workflows/comfyui/restore-qwen-image-21.json b/workflows/comfyui/restore-qwen-image-21.json
new file mode 100644
index 00000000..a0d799aa
--- /dev/null
+++ b/workflows/comfyui/restore-qwen-image-21.json
@@ -0,0 +1,327 @@
+{
+ "1": {
+ "inputs": {
+ "unet_name": "qwen_image_2.1_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "2": {
+ "inputs": {
+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",
+ "type": "qwen_image",
+ "device": "default"
+ },
+ "class_type": "CLIPLoader",
+ "_meta": {
+ "title": "Load CLIP (Qwen3-VL 8B)"
+ }
+ },
+ "3": {
+ "inputs": {
+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "4": {
+ "inputs": {
+ "lora_name": "qwen-image-2.1-restore.safetensors",
+ "strength_model": 1,
+ "model": [
+ "1",
+ 0
+ ]
+ },
+ "class_type": "LoraLoaderModelOnly",
+ "_meta": {
+ "title": "Restore LoRA (1.0; 0.5 for a blurry photo)"
+ }
+ },
+ "10": {
+ "inputs": {
+ "image": "image.png"
+ },
+ "class_type": "LoadImage",
+ "_meta": {
+ "title": "Load Image (the photo)"
+ }
+ },
+ "20": {
+ "inputs": {
+ "upscale_method": "lanczos",
+ "megapixels": 2,
+ "resolution_steps": 32,
+ "image": [
+ "10",
+ 0
+ ]
+ },
+ "class_type": "ImageScaleToTotalPixels",
+ "_meta": {
+ "title": "To about 2 MP on the 32 grid"
+ }
+ },
+ "30": {
+ "inputs": {
+ "prompt": "",
+ "negative_prompt": "",
+ "resolution": 0,
+ "clip": [
+ "2",
+ 0
+ ],
+ "vae": [
+ "3",
+ 0
+ ],
+ "images.image_1": [
+ "20",
+ 0
+ ]
+ },
+ "class_type": "TextEncodeQwenImage21",
+ "_meta": {
+ "title": "Text Encode Qwen Image 2.1 (the photo as image 1)"
+ }
+ },
+ "31": {
+ "inputs": {
+ "device": "auto",
+ "dtype": "default",
+ "model": [
+ "4",
+ 0
+ ]
+ },
+ "class_type": "QwenImage21Cache",
+ "_meta": {
+ "title": "Qwen Image 2.1 Cache"
+ }
+ },
+ "32": {
+ "inputs": {
+ "seed": 0,
+ "steps": 25,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1,
+ "model": [
+ "31",
+ 0
+ ],
+ "positive": [
+ "30",
+ 0
+ ],
+ "negative": [
+ "30",
+ 1
+ ],
+ "latent_image": [
+ "30",
+ 2
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler (one pass, 25 steps)"
+ }
+ },
+ "33": {
+ "inputs": {
+ "samples": [
+ "32",
+ 0
+ ],
+ "vae": [
+ "3",
+ 0
+ ]
+ },
+ "class_type": "VAEDecode",
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "34": {
+ "inputs": {
+ "image": [
+ "33",
+ 0
+ ]
+ },
+ "class_type": "SplitImageWithAlpha",
+ "_meta": {
+ "title": "Drop the alpha"
+ }
+ },
+ "50": {
+ "inputs": {
+ "unet_name": "seedvr2_7b_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load SeedVR2 7B"
+ }
+ },
+ "51": {
+ "inputs": {
+ "vae_name": "seedvr2_ema_vae_fp16.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load SeedVR2 VAE"
+ }
+ },
+ "52": {
+ "inputs": {
+ "resize_type": "scale by multiplier",
+ "resize_type.multiplier": 2,
+ "scale_method": "lanczos",
+ "input": [
+ "34",
+ 0
+ ]
+ },
+ "class_type": "ResizeImageMaskNode",
+ "_meta": {
+ "title": "Enlarge the restored photo (2x)"
+ }
+ },
+ "53": {
+ "inputs": {
+ "resized_images": [
+ "52",
+ 0
+ ]
+ },
+ "class_type": "SeedVR2Preprocess",
+ "_meta": {
+ "title": "Pre-Process SeedVR2 Input"
+ }
+ },
+ "54": {
+ "inputs": {
+ "tile_size": 512,
+ "overlap": 128,
+ "temporal_size": 4096,
+ "temporal_overlap": 8,
+ "pixels": [
+ "53",
+ 0
+ ],
+ "vae": [
+ "51",
+ 0
+ ]
+ },
+ "class_type": "VAEEncodeTiled",
+ "_meta": {
+ "title": "VAE Encode (Tiled)"
+ }
+ },
+ "55": {
+ "inputs": {
+ "model": [
+ "50",
+ 0
+ ],
+ "vae_conditioning": [
+ "54",
+ 0
+ ]
+ },
+ "class_type": "SeedVR2Conditioning",
+ "_meta": {
+ "title": "SeedVR2 Conditioning"
+ }
+ },
+ "56": {
+ "inputs": {
+ "seed": 0,
+ "steps": 1,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1,
+ "model": [
+ "50",
+ 0
+ ],
+ "positive": [
+ "55",
+ 0
+ ],
+ "negative": [
+ "55",
+ 1
+ ],
+ "latent_image": [
+ "54",
+ 0
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler (SeedVR2, one step)"
+ }
+ },
+ "57": {
+ "inputs": {
+ "tile_size": 512,
+ "overlap": 128,
+ "temporal_size": 4096,
+ "temporal_overlap": 8,
+ "samples": [
+ "56",
+ 0
+ ],
+ "vae": [
+ "51",
+ 0
+ ]
+ },
+ "class_type": "VAEDecodeTiled",
+ "_meta": {
+ "title": "VAE Decode (Tiled)"
+ }
+ },
+ "58": {
+ "inputs": {
+ "color_correction_method": "lab",
+ "images": [
+ "57",
+ 0
+ ],
+ "original_resized_images": [
+ "52",
+ 0
+ ]
+ },
+ "class_type": "SeedVR2PostProcessing",
+ "_meta": {
+ "title": "Post-Process SeedVR2 Output (colour from the restored photo)"
+ }
+ },
+ "90": {
+ "inputs": {
+ "filename_prefix": "fuobe/restore-qwen-image-21",
+ "images": [
+ "58",
+ 0
+ ]
+ },
+ "class_type": "SaveImage",
+ "_meta": {
+ "title": "Save Image"
+ }
+ }
+}