Nodes/arkennemasis - ChatGPT / Codex / fal AI nodes/arkennemasis fal · Flux 2 Klein 9B Base Edit LoRA · $0.02/MP
ComfyUI Node

arkennemasis fal · Flux 2 Klein 9B Base Edit LoRA · $0.02/MP

Two cents a megapixel to edit with your own weights

By Hishamahmer·Created 3 months ago·Updated 9 days ago· 11
arkennemasis fal · Flux 2 Klein 9B Base Edit LoRA · $0.02/MP
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • images
  • image_paths
  • timings
  • has_nsfw_concepts
  • seed
  • prompt
  • info
◄prompt►
◄negative_prompt►
◄guidance_scale5.00►
◄seed-1►
◄num_inference_steps28►
◄image_sizesquare_hd►
◄image_size_width1024►
◄image_size_height1024►
◄num_images1►
◄accelerationregular►
◄enable_safety_checkertrue►
◄output_formatpng►
◄loras►
◄max_cost_usd20.0►
◄reuse_identical_runtrue►
◄extra_json►
◄max_concurrent1►

The most expensive node in this Klein batch, and worth being clear about why: it's Klein 9B base - the undistilled model, with working guidance and a real negative prompt - doing instruction edits with up to three LoRA weights applied on top. $0.02 per megapixel of input and output, so a 1024×1024 edit is about $0.04. Compare the distilled 4B edit LoRA node at a quarter of that.

What justifies the price is the combination: base's controllability plus the LoRAs that were actually trained on 9B base. A consistency LoRA that fixes the family's identity drift, or a realism LoRA that takes the plastic sheen off skin, is doing something the plain nodes can't. A style LoRA that just changes the look is usually cheaper to run on a smaller endpoint.

The LoRA box

loras is a JSON text box, and the weights have to be reachable by URL - fal downloads them, so your ComfyUI/models/loras folder is invisible to this node. It takes fal's list format, up to three entries; the model page has the exact shape. Leave it empty and you're paying 9B-base-edit prices for nothing extra.

The constraint that costs people real money: 9B LoRAs don't work on 4B endpoints and vice versa. Klein's own release split everyone's files across two sizes and the first weeks of CivitAI uploads were a mess of people mixing them. The other axis is base versus distilled - and here you're on the right side of it, because most published Klein LoRAs train against FLUX.2-klein-base-9B, which is exactly this checkpoint.

One more: read the LoRA card for a trigger word. A LoRA that seems to do nothing is usually one your prompt never invoked.

The inputs

prompt - a post-processing command list. remove blur and noise, fix exposure and color profile, micro-contrast. Name what must survive the edit.

negative_prompt and guidance_scale (5) - live, because base runs a real unconditional pass. image_1 required, plus image_2–image_6: first four used, batches per socket, socket order is reference order. image_size - square_hd preset by default; the tooltip says an unset size uses the input's dimensions, so set it deliberately if the frame matters. num_inference_steps 28 (base wants more like 50, and steps are free at per-megapixel pricing), acceleration, seed, num_images, output_format, enable_safety_checker.

Outputs

images - the edited IMAGE batch, image_paths (STRING), timings, has_nsfw_concepts, seed (INT), prompt (STRING), and info (JSON: request id, cost estimate, saved files, fal's full answer).

Install

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

Restart ComfyUI, then find it under arkennemasis → fal → Image → Flux. ComfyUI-Manager → Install via Git URL with the same repo is equivalent. The only pinned dependency in the pack is httpx (for the ChatGPT/Codex nodes); the fal provider is standard-library only.

Key, in the .env by run_nvidia_gpu.bat:

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

Where people get burned

A dead LoRA URL. fal has to fetch the weights, so private or rate-limited links fail a run you waited for. Test one before stacking three.

Cost blindness. At $0.02/MP plus a megapixel of input, three variants of a 2MP edit is 12 cents - cheap, but only if you meant it. num_images is the multiplier to watch.

The warm shift and the drift. Edits come back slightly warm versus the source, and identity still isn't held the way Qwen-Image-Edit holds it. A consistency LoRA narrows the second problem; nothing fixes the first except a colour-match.

Reruns served from cache. reuse_identical_run defaults on so identical inputs aren't billed twice - turn it off for a different take. max_cost_usd (default $20, evaluated before upload) is the leash that makes experimenting cheap; a run that trips it never leaves your machine.

Categoryarkennemasis/fal/Image/Flux

Inputs (23)

NameTypeDefaultDescription
promptSTRINGThe prompt to edit the image.
negative_promptSTRINGNegative prompt for classifier-free guidance. Describes what to avoid in the image. Empty leaves it out.
guidance_scaleFLOAT5.000–20Guidance scale for classifier-free guidance.
seedINT-1-1–2147483647The seed to use for the generation. If not provided, a random seed will be used. -1 leaves it to the model.
num_inference_stepsINT284–50The number of inference steps to perform.
image_sizeCOMBOsquare_hdThe size of the generated image. If not provided, uses the input image size. 'custom' uses the width and height below.
image_size_widthINT102416–14142Width in pixels when image_size is 'custom'.
image_size_heightINT102416–14142Height in pixels when image_size is 'custom'.
num_imagesINT11–4The number of images to generate.
accelerationCOMBOregularThe acceleration level to use for image generation.
enable_safety_checkerBOOLEANtrueIf 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.
output_formatCOMBOpngThe format of the generated image.
image_1IMAGEThe URLs of the images for editing. A maximum of 4 images are allowed. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
lorasSTRINGList of LoRA weights to apply (maximum 3). JSON. Empty leaves it out.
image_2optIMAGEThe URLs of the images for editing. A maximum of 4 images are allowed. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
image_3optIMAGEThe URLs of the images for editing. A maximum of 4 images are allowed. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
image_4optIMAGEThe URLs of the images for editing. A maximum of 4 images are allowed. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
image_5optIMAGEThe URLs of the images for editing. A maximum of 4 images are allowed. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
image_6optIMAGEThe URLs of the images for editing. A maximum of 4 images are allowed. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
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—
timingsSTRING—
has_nsfw_conceptsSTRING—
seedINT—
promptSTRING—
infoSTRINGJSON: request id, cost estimate, saved files and fal's full answer.