Nodes/arkennemasis - ChatGPT / Codex / fal AI nodes/arkennemasis fal · Flux Pro v1 Erase · $0.03 + $0.004/MP
ComfyUI Node

arkennemasis fal · Flux Pro v1 Erase · $0.03 + $0.004/MP

Paint over the ex, get a photo that was never at the wedding

By Hishamahmer·Created 3 months ago·Updated 9 days ago· 11
arkennemasis fal · Flux Pro v1 Erase · $0.03 + $0.004/MP
  • image
  • mask
  • images
  • image_paths
  • seed
  • has_nsfw_concepts
  • prompt
  • timings
  • info
◄dilate_pixels10►
◄output_formatjpeg►
◄max_cost_usd20.0►
◄reuse_identical_runtrue►
◄extra_json►
◄max_concurrent1►

Erase is the smallest, most surgical node in this pack's Flux family, and possibly the most useful one for real work: mask something out of a photo and it's gone, with the background reconstructed around the hole. No prompt, no "describe what should be there instead". You say what shouldn't simply by painting it.

That promptless design is what makes it good. Every inpainting workflow where you have to write "a plain background, nothing else, no objects" is a workflow where the model occasionally invents a shrub. Erase has no such field to misuse.

What's going on under the hood

It's the fal-ai/flux-pro/v1/erase endpoint from Black Forest Labs, wrapped as one node in comfyui-arkennemasis - the pack where every fal model gets its own node generated from fal's schema. The interesting part is the mask handoff, and it's worth knowing because the tooltip will mislead you if you read it literally. The tooltip describes fal's side: a black-and-white image where white marks pixels to erase. But you're in ComfyUI, and here a MASK is just 1 where you painted. The pack converts your mask into an RGBA PNG whose transparent pixels are the edit region - the same convention the OpenAI edit endpoints use - and resizes it to match the picture being erased, so a mask painted at a different resolution still lines up.

Nothing else is local. No checkpoint, no sampler, no VRAM. The image and mask are uploaded to fal, one billed call goes out, and the result is downloaded to output/fal/fal-ai_flux-pro_v1_erase/. The fal side of this pack uses the standard library only, so it adds no Python dependency to your ComfyUI install.

Inputs

  • image - the picture to erase from. One image, not a batch.
  • mask - what to remove. White/1 where the thing is, black/0 everywhere else. Draw it generously; see below.
  • dilate_pixels - default 10, range 0–100. Expands the mask edges before the model sees them, and higher values give cleaner results around the masked region. This is the single most important setting on the node. Masks drawn by hand, or handed over by a detector, are almost always tighter than they should be - a segmentation box wraps the cup and not the saucer - and the leftover ring of the object you tried to delete is the classic bad output. Bump it to 20–30 for objects with soft edges: hair, smoke, shadows, anything on a gradient.
  • output_format - jpeg by default.

And the shared money widgets: max_cost_usd, reuse_identical_run, extra_json, max_concurrent.

What it costs

The badge says $0.03 + $0.004/MP, and the structure matters: $0.03 for the first megapixel of output, $0.004 for each one after. Reference megapixels are also billed at $0.004, with a 3 MP minimum on that side - so the reference side is billed as if it were 3 MP even when you hand it a small picture. In practice an erase job is a small number of cents and the floor does most of the work. Print-quality, multi-megapixel inputs are where the number starts to move.

max_cost_usd defaults to $20 and aborts the run before upload if the estimate exceeds it, which for this node is a formality - the point is that it never bills a run you cancelled your way out of. reuse_identical_run (default on) means re-running the same graph after a tweak downstream gives you the cached file rather than a second charge.

Outputs

You get images (the erased picture, as an IMAGE you can send to SaveImage or into another node - a second Erase pass, an upscaler, a compositor), image_paths with the file on disk, plus seed (the endpoint takes no seed box, so this is fal's), prompt, has_nsfw_concepts, timings, and info - JSON with the request id, the cost estimate, the saved files and fal's full answer.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis

Or just install comfyui-arkennemasis from ComfyUI Manager. Restart, then drop your key in the .env file in the folder that holds run_nvidia_gpu.bat (the portable build) or in the ComfyUI folder:

FAL_KEY=your-key-from-fal.ai/dashboard/keys

There's no key field on the node on purpose - one typed key would end up embedded in every workflow you share.

The troubleshooting list

If the object is still faintly there, it's dilate_pixels, not the model. If the node complains about dimensions, your mask and image disagree - the pack resizes the mask for you, but a mask with a wildly different aspect ratio will still erase the wrong thing, so check the graph. If you're doing both erase and fill on one image, do them in sequence rather than in parallel and keep the useful habit from the masking side of this ecosystem: a little compositing is fine, but three to five uncomposited passes turn an image to trash.

And the pack-wide ones: missing FAL_KEY stops the node with a clear message and zero charge; an empty fal balance stops generation; and a mid-job ComfyUI restart doesn't lose the money - the request is in output/fal/_requests.jsonl and the free Recover Result node fetches it by id.

Categoryarkennemasis/fal/Image/Flux

Inputs (8)

NameTypeDefaultDescription
imageIMAGEThe URL of the input image to erase content from.
maskMASKThe URL of a black/white mask image where white (255) marks pixels to erase and black (0) marks pixels to keep. Needs to match the dimensions of the input image.
dilate_pixelsINT100–100Number of pixels to expand the mask edges by. Higher values produce cleaner erase results around the masked region.
output_formatCOMBOjpegThe format of the generated image.
max_cost_usdoptFLOAT20.00–100000Safety cap. If the estimated cost of this run is above this many US dollars the node stops BEFORE sending anything to fal. 0 = no cap.
reuse_identical_runoptBOOLEANtrueIf these exact inputs (the settings AND the same pictures/clips/audio) were already paid for and the files are still in output/fal, return them instead of paying again - also after a ComfyUI restart. Turn off for a fresh take with the same settings.
extra_jsonoptSTRINGAdvanced: a JSON object merged into the request last, for any fal field this node has no box for. Example: {"seed": 7}. Leave empty normally.
max_concurrentoptINT11–32How many paid fal calls may run at the same time in one run, across every fal node. 1 (default) = one after another. This node starts its paid part only while fewer than this many fal calls are running. Once any fal node fails, the ones still waiting are not started, so nothing more is billed.

Outputs (7)

NameTypeDescription
imagesIMAGE—
image_pathsSTRING—
seedINT—
has_nsfw_conceptsSTRING—
promptSTRING—
timingsSTRING—
infoSTRINGJSON: request id, cost estimate, saved files and fal's full answer.