arkennemasis fal · Flux General Differential Diffusion · per compute second
A change map instead of a mask, so edits fade instead of stopping
- image
- change_map_image
- fill_image_fill_image_1
- fill_image_fill_image_2
- fill_image_fill_image_3
- fill_image_fill_image_4
- fill_image_fill_image_5
- fill_image_fill_image_6
- reference_image
- images
- image_paths
- timings
- has_nsfw_concepts
- prompt
- seed
- info
Differential diffusion is the answer to a problem every mask-based editor has: masks are binary and edits aren't. You get a hard boundary, or you get blur, and neither is what you wanted when the change should graduate from "definitely" in the middle to "nothing at all" at the edges.
Differential diffusion replaces the mask with a change map - a greyscale image where black means leave this alone, white means regenerate it, and every grey in between means "somewhere in the middle". Instead of a region switch flipping per pixel, you get a continuous field. It's been a steady if modest topic in the community for two years, active through mid-2026, and it's one of the genuinely distinctive things you can do on a hosted endpoint.
This is fal's Flux General endpoint with the differential-diffusion pipeline selected, so it also carries every extension the general node has: LoRA, ControlNet, IP-Adapter, EasyControl.
The two inputs that define it
image - required. The photo you're editing.
change_map_image - required. This is the greyscale map. Paint it yourself in any image editor: white where the change is strongest, black where nothing may move, grey where you want a partial transition. A gradient around a face, a soft ring around an object being replaced, a blurred blob where a new element goes.
strength defaults to 0.85 and reads like every other denoise dial here: 1.0 completely remakes the image, 0.0 preserves it. Think of it as the ceiling of the change map - the map says where, strength says how far in total.
Building a usable change map is the actual work, and there's a reason this technique stayed niche: the map is another artefact to author and version. But when you need a soft blend rather than a composited edge, nothing else does it.
The rest of the node
Everything from the general endpoint is present, so this is the place to be precise about what you leave empty:
promptandnegative_prompt- the negative only genuinely bites through NAG, exposed here asnag_scale(3),nag_tau(2.5),nag_alpha(0.25) andnag_end(0.25). Don't exceednag_scale3.loras,control_loras,controlnets,controlnet_unions,ip_adapters,easycontrols- JSON fields, all optional, all expecting URLs fal can fetch. Local files in yourmodels/lorasfolder are not reachable. Empty is the right value until you need one.image_size(square_hddefault,customfor exact dimensions),num_inference_steps28,seed-1,guidance_scale3.5,use_real_cfg(false - and it increases both time and price when enabled),use_cfg_zero(false),schedulereuler,base_shift0.5,max_shift1.15,use_beta_schedulefalse,output_formatpng.- Six optional
fill_image_*sockets andreference_imagewithreference_strength/reference_start/reference_endfor reference-only conditioning.
Outputs
images and image_paths (under output/fal/fal-ai_flux-general_differential-diffusion/), plus timings, has_nsfw_concepts, prompt, seed, and info.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis
Restart ComfyUI, or use ComfyUI-Manager → Install via Git URL. The pack declares httpx for its Codex nodes; the fal provider itself needs nothing past the standard library, and no model files are downloaded.
FAL_KEY=your-key-from-fal.ai/dashboard/keys
in the .env next to run_nvidia_gpu.bat (portable build) or your ComfyUI folder. There's no key widget, deliberately.
The one thing to understand about the price
This endpoint is billed per compute second with no per-run figure, so its title reads "per compute second" rather than a dollar rate. That has a concrete consequence: max_cost_usd has nothing to compare against. The default $20 cap can't stop this node, because the node genuinely doesn't know what a run will cost until fal bills it. The same is true on a few other compute-billed endpoints in this pack.
Practical read: don't fire this off in a 40-branch fan-out and walk away. One call at a time is what max_concurrent (default 1) gives you, and that's the right setting here.
reuse_identical_run (default on) is your sharpest cost control: the fingerprint covers the settings and the bytes of both the image and the change map, so re-queuing the same job after a crash returns the saved file instead of paying again.
Mask or change map?
Worth saying plainly, because it's the decision the node forces. A mask plus compositing locally is still the only way to guarantee that unmasked pixels come back bit-identical - and that's the one thing an instruction edit or a full-frame re-render can't offer. Differential diffusion is not that. It's a per-pixel strength field on a hosted generation, so the untouched-looking areas are generated too, just barely moved.
If your requirement is "nothing outside the mask may change, provably", do it locally with a mask and a composite. If your requirement is "this change should fade out across the jawline instead of tearing", this is the node.
Inputs (45)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | The prompt to generate an image from. | |
| image_size | COMBO | square_hd | The size of the generated image. 'custom' uses the width and height below. |
| image_size_width | INT | 102416–14142 | Width in pixels when image_size is 'custom'. |
| image_size_height | INT | 102416–14142 | Height in pixels when image_size is 'custom'. |
| num_inference_steps | INT | 281–50 | The number of inference steps to perform. |
| seed | INT | -1-1–2147483647 | The same seed and the same prompt given to the same version of the model will output the same image every time. -1 leaves it to the model. |
| loras | STRING | The LoRAs to use for the image generation. You can use any number of LoRAs and they will be merged together to generate the final image. JSON. Empty leaves it out. | |
| control_loras | STRING | The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs and they will be merged together to generate the final image. JSON. Empty leaves it out. | |
| controlnets | STRING | The controlnets to use for the image generation. Only one controlnet is supported at the moment. JSON. Empty leaves it out. | |
| controlnet_unions | STRING | The controlnet unions to use for the image generation. Only one controlnet is supported at the moment. JSON. Empty leaves it out. | |
| ip_adapters | STRING | IP-Adapter to use for image generation. JSON. Empty leaves it out. | |
| easycontrols | STRING | EasyControl Inputs to use for image generation. JSON. Empty leaves it out. | |
| guidance_scale | FLOAT | 3.500–20 | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. |
| real_cfg_scale | FLOAT | 3.500–5 | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. |
| use_real_cfg | BOOLEAN | false | Uses classical CFG as in SD1.5, SDXL, etc. Increases generation times and price when set to be true. If using XLabs IP-Adapter v1, this will be turned on!. |
| use_cfg_zero | BOOLEAN | false | Uses CFG-zero init sampling as in https://arxiv.org/abs/2503.18886. |
| num_images | INT | 11–10 | The number of images to generate. This is always set to 1 for streaming output. |
| enable_safety_checker | BOOLEAN | true | If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. |
| reference_strength | FLOAT | 0.65-3–3 | Strength of reference_only generation. Only used if a reference image is provided. |
| reference_start | FLOAT | 0.000–1 | The percentage of the total timesteps when the reference guidance is to bestarted. |
| reference_end | FLOAT | 1.000–1 | The percentage of the total timesteps when the reference guidance is to be ended. |
| base_shift | FLOAT | 0.500.01–5 | Base shift for the scheduled timesteps |
| max_shift | FLOAT | 1.150.01–5 | Max shift for the scheduled timesteps |
| output_format | COMBO | png | The format of the generated image. |
| use_beta_schedule | BOOLEAN | false | Specifies whether beta sigmas ought to be used. |
| scheduler | COMBO | euler | Scheduler for the denoising process. |
| negative_prompt | STRING | Negative prompt to steer the image generation away from unwanted features. By default, we will be using NAG for processing the negative prompt. Empty leaves it out. | |
| nag_scale | FLOAT | 3.001.01–10 | The scale for NAG. Higher values will result in a image that is more distant to the negative prompt. |
| nag_tau | FLOAT | 2.50 | The tau for NAG. Controls the normalization of the hidden state. Higher values will result in a less aggressive normalization, but may also lead to unexpected changes with respect to the original image. Not recommended to change this value. |
| nag_alpha | FLOAT | 0.250.01–1 | The alpha value for NAG. This value is used as a final weighting factor for steering the normalized guidance (positive and negative prompts) in the direction of the positive prompt. Higher values will result in less steering on the normalized guidance where lower values will result in considering the positive prompt guidance more. |
| nag_end | FLOAT | 0.250.01–1 | The proportion of steps to apply NAG. After the specified proportion of steps has been iterated, the remaining steps will use original attention processors in FLUX. |
| image | IMAGE | URL of image to use as initial image. | |
| change_map_image | IMAGE | URL of change map. | |
| strength | FLOAT | 0.850.01–1 | The strength to use for differential diffusion. 1.0 is completely remakes the image while 0.0 preserves the original. |
| fill_image_fill_image_1opt | IMAGE | URLs of images to be filled for redux prompting Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1). | |
| fill_image_fill_image_2opt | IMAGE | URLs of images to be filled for redux prompting Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1). | |
| fill_image_fill_image_3opt | IMAGE | URLs of images to be filled for redux prompting Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1). | |
| fill_image_fill_image_4opt | IMAGE | URLs of images to be filled for redux prompting Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1). | |
| fill_image_fill_image_5opt | IMAGE | URLs of images to be filled for redux prompting Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1). | |
| fill_image_fill_image_6opt | IMAGE | URLs of images to be filled for redux prompting Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1). | |
| reference_imageopt | IMAGE | URL of Image for Reference-Only | |
| max_cost_usdopt | FLOAT | 20.00–100000 | Safety 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_runopt | BOOLEAN | true | If 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_jsonopt | STRING | Advanced: 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_concurrentopt | INT | 11–32 | How 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)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| image_paths | STRING | — |
| timings | STRING | — |
| has_nsfw_concepts | STRING | — |
| prompt | STRING | — |
| seed | INT | — |
| info | STRING | JSON: request id, cost estimate, saved files and fal's full answer. |