Nodes/arkennemasis - ChatGPT / Codex / fal AI nodes/arkennemasis fal · Flux PuLID · $0.0333/MP
ComfyUI Node

arkennemasis fal · Flux PuLID · $0.0333/MP

Put a real face in a prompt without wrecking the prompt

By Hishamahmer·Created 3 months ago·Updated 9 days ago· 11
arkennemasis fal · Flux PuLID · $0.0333/MP
  • reference_image
  • images
  • image_paths
  • seed
  • has_nsfw_concepts
  • prompt
  • timings
  • info
◄prompt►
◄image_sizelandscape_4_3►
◄image_size_width1024►
◄image_size_height1024►
◄num_inference_steps20►
◄seed-1►
◄guidance_scale4.00►
◄negative_prompt►
◄start_step0►
◄true_cfg1.00►
◄id_weight1.00►
◄enable_safety_checkertrue►
◄max_sequence_length128►
◄max_cost_usd20.0►
◄reuse_identical_runtrue►
◄extra_json►
◄max_concurrent1►

PuLID is ByteDance's identity adapter, and its contribution isn't face-copying - it's face-copying politely. Every adapter before it degraded something when it injected a face: style, detail, text adherence. PuLID trains two branches, one conditioned on identity and one not, and a contrastive loss holds the conditioned branch close to the unconditioned one's distribution. The paper calls the problem it solves ID pollution, and the numbers back it: against InstantID on DivID-120, face similarity is a wash (0.733 vs 0.725) while text alignment (31.31 vs 28.72) and image preservation (0.812 vs 0.680) are not.

You'd normally run PuLID locally, and that route has real friction: InsightFace's antelopev2 models are bundled in the standard path and are non-commercial, it wants 16GB of VRAM, and the community's advice is to use fp8 rather than GGUF because GGUF iteration times swing between 3 and 16 seconds per step. This node sidesteps all of it - fal's copy of the endpoint, no InsightFace install on your machine, three and a bit cents a megapixel.

It's also a declining tool, and worth saying so. Adapters lost the character-consistency job to instruction-driven edit models over 2026; PuLID's thread volume collapsed and converged with InstantID's. That doesn't make it bad. It makes it the right answer for one narrow thing: a single reference face plus a prompt you actually care about. The good practitioner combo remains PuLID for structure and something else for the finishing pass - "PuLID followed by a refining pass for skin tone is probably the highest quality".

The knobs

  • prompt and reference_image - the description and the face. This is where the contrastive training earns its money: you can write a scene, not a face.
  • id_weight - 0 to 1, default 1. The identity dial. Lower it when the face is eating your styling.
  • guidance_scale - default 4, and true_cfg (default 1, max 10) plus start_step (default 0) with it. These are the CFG plumbing: true_cfg is the weight of the CFG loss, start_step when it kicks in. Defaults are sane; the reason to touch true_cfg is that a Flux guidance of 4 is already high, and people who want more prompt obedience usually find it's id_weight they wanted to lower instead.
  • negative_prompt - present here, unlike Dev. Empty leaves it out.
  • image_size - a preset list (square_hd default, plus the landscape/portrait presets and custom, which uses image_size_width/image_size_height). Since billing is per output megapixel, size is the price.
  • num_inference_steps (default 20), seed, max_sequence_length (128/256/512), enable_safety_checker.

Plus the shared max_cost_usd, reuse_identical_run, extra_json, max_concurrent.

What it costs and what it returns

$0.0333 per output megapixel, so a square_hd 1024×1024 is one megapixel and lands at three and a third cents. Bump to a 2 MP square and you double it. max_cost_usd (default $20) checks the estimate before any upload, so nothing bills on a run you veto.

Out comes images and image_paths (files land in output/fal/fal-ai_flux-pulid/), seed as an INT so you can pin a face/pose you liked, plus prompt, timings, has_nsfw_concepts and info - JSON with the request id, the cost estimate and fal's full answer.

Install

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

Manager users: search comfyui-arkennemasis and install. Restart, then:

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

in the .env beside run_nvidia_gpu.bat. No InsightFace, no insightface pip package, no ONNX model download, no CUDA build - that's the entire argument for this node over the local one, and it's worth restating because the InsightFace licence question is exactly what keeps commercial work off the local route.

Failure modes

If the face is right and nothing else is, lower id_weight before you rewrite the prompt. If the face is only approximately right, that's the tool - PuLID gets the skeleton and stops, and chasing the last few percent with prompt words is a losing game. If you get a black image, the safety checker flagged it; note that turning the checker off requires account authorisation on fal, and unauthorised requests are always checked regardless of what the widget says.

If you like a reference and want to reuse it across a batch, extract one clean crop at around 1 MP and keep it as your canonical input - the endpoint is sensitive to the reference's crop and lighting, and a moody photo gives you a moody face. And if ComfyUI restarts while a job is running, the free Recover Result node in the same pack collects the finished request by id from output/fal/_requests.jsonl rather than you paying again.

Categoryarkennemasis/fal/Image/Flux

Inputs (18)

NameTypeDefaultDescription
promptSTRINGThe prompt to generate an image from.
reference_imageIMAGEURL of image to use for inpainting.
image_sizeCOMBOlandscape_4_3The size of the generated image. '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_inference_stepsINT201–50The number of inference steps to perform.
seedINT-1-1–2147483647The 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.
guidance_scaleFLOAT4.000–20The 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.
negative_promptSTRINGThe prompt to generate an image from. Empty leaves it out.
start_stepINT00–50The number of steps to start the CFG from.
true_cfgFLOAT1.001–10The weight of the CFG loss.
id_weightFLOAT1.000–1The weight of the ID loss.
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.
max_sequence_lengthCOMBO128The maximum sequence length for the model.
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.