Files
DemonGatanjieu-Anomalous_Mo…/api/blocks/remove_background.json
T
DemonGatanjieuandClaude Opus 5.5 8ecc261949 Let ready-made blocks say what they hand the next one, and build them as a chain
Every block in api/blocks names what it gives a block after it ("gives": its sampler and its
output node; {} for one that changes the step it is put on) and its own model loader
("own_model"). api/block_chain.py builds a list of steps on a new tab: the picture first, each
next block anchored to what the step before gave, by near_node_id and a new page-only
save_node_id (canvas_roles.js findRoles pins the output node), so a canvas with several
samplers and outputs is no guess. add_nodes' answer names the block it built.

Redraw with another model and face/hand detailing now take the step before's picture
("$save.images") instead of the sampler's decode, which after an enlargement is the older
picture. The two-model routes are built as two-step chains; routes.json no longer names the
loaders.

Checked through the real page on the test ComfyUI: the Tile route on two Anima models (base on
Harem 1.5, Tile redraw on Kirazuri v4, from the base's picture and prompts), then face and hand
detailing after it took the Tile step's colour-matched picture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 00:42:56 +08:00

68 lines
1.5 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"job": "process",
"want": "cut",
"rank": 1,
"short": "cut-out",
"title": {
"zh": "背景移除",
"en": "Remove the background"
},
"about": {
"zh": "抠掉背景,存成透明背景的 PNG。",
"en": "Cuts the background away into a transparent PNG."
},
"source": {
"zh": "参考工作流的「背景移除」组,换成你装的 inspyrenet-rembg",
"en": "The reference workflow's background removal, with your inspyrenet-rembg"
},
"packs": {
"InspyrenetRembg": "comfyui-inspyrenet-rembg"
},
"takes": "picture",
"nodes": {
"picture": {
"class_type": "LoadImage",
"inputs": {
"image": "$image"
}
},
"cut": {
"class_type": "InspyrenetRembg",
"inputs": {
"image": [
"picture",
0
],
"torchscript_jit": "default"
}
},
"save": {
"class_type": "SaveImage",
"inputs": {
"images": [
"cut",
0
],
"filename_prefix": "nobg"
}
}
},
"after": "run_workflow saves it with the background cut away (transparent PNG, prefix nobg). On a canvas that makes pictures those are made too: to cut this one out alone, add the block on a blank tab (new_workflow).",
"gives": {
"save": "save"
},
"models": [],
"tested": {
"gpu": "RTX 4050 Laptop",
"vram_gb": 6,
"date": "2026-10-27",
"runs": [
{
"model": "—",
"size": "1280×832",
"seconds": 8
}
]
}
}