RunningHub OneReward Sampler
Masked inpainting with a CFG dial nobody else exposes
- pipeline
- image
- mask
- image
This is the workhorse of the pack. Loader → Sampler → Save Image is the whole workflow: you feed it an image, a mask, and a prompt, and it regenerates just the masked region. Fill the hole in a damaged scan with the right content, replace a wall, restore a missing corner of a photo - it's prompt-guided inpainting with the OneReward fine-tune doing the heavy lifting. If you've read the 2026 inpainting discourse, you know the drill: whole-frame edit models like Kontext or Qwen-Image-Edit shift every pixel a little, and masked inpainting is what you use when the unmasked parts must stay untouched. This is the masked route, done on the best open checkpoint for it.
The interesting bit is the true_cfg input, because it's what makes this pack more than a download script for OneReward weights. FLUX doesn't do classifier-free guidance the way SD does - it uses a guidance embedding instead, and vanilla Flux Fill has no negative prompt. The "true CFG" trick, which a HuggingFace dev put on the community's radar back in September 2024, runs the transformer on a batch of [unconditional, conditional] at every denoising step and mixes the predictions: pred = neg + true_cfg * (pos - neg). That's exactly what the pack's FluxFillCFGPipeline implements. Set true_cfg to 1.0 and it behaves like upstream Flux Fill - one branch, no negatives; push it past 1.0 and you get real CFG with a real negative prompt. The catch: every step runs a doubled batch, so generation takes roughly twice as long while CFG is on. The default of 4.0 is fairly aggressive; if your fills come out overcooked, dial it back toward 1.5–2 rather than fighting it.
Two things the source does that you should know before the first run. The negative prompt is hardcoded to nsfw - there's no input for it, which is a small honesty win for a repo whose README sells "true CFG control" so hard. And the seed is truncated to 32 bits internally (seed % 2**32), same as Flux's own habit, so don't expect a 64-bit space to play with.
The inputs that actually matter:
mask- aMASK, and it's everything. Feathered edges beat hard ones; a 4–12 px blur stops the model from inventing a visible seam. Paint generously - OneReward users who report "blurry inpainted area" are usually under-masking.prompt- describes what goes in the mask. For a removed object, describe the scene behind it ("empty cafe table, no cup") or the model invents clutter to fill the void.true_cfg- the CFG dial above. 1.0 = plain Fill, 4.0 = strong adherence.seed- lock it while you iterate; you're paying double compute per step, so you want to isolate one variable at a time.
num_inference_steps defaults to 50, which on a quantized 16 GB card with CFG doubling is slow. Dropping to 20–30 still looks good on Fill-class models, so it's the first thing to cut. guidance_scale is the model's native FLUX guidance embedding, not CFG - leave it at 1.0 unless you know why you're changing it.
The image output feeds a Save Image node, or better, a composite - this pack does whole-frame inpainting, not the crop-and-stitch pattern that keeps unmasked pixels out of the VAE entirely. If you're doing surgical edits where the rest of the frame must survive byte-for-byte, paste this output back over the original with ImageCompositeMasked and keep the win.
Install is the pack's install: clone from custom_nodes or grab it via ComfyUI Manager, then the ~30 GB of models (see the Loader article - the repo ships no requirements.txt, so install diffusers and optimum-quanto yourself). Restart, load, mask, prompt, sample.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | RHOneRewardPipeline | — | |
| image | IMAGE | — | |
| mask | MASK | — | |
| prompt | STRING | — | |
| num_inference_steps | INT | 50 | — |
| guidance_scale | FLOAT | 1.00 | — |
| true_cfg | FLOAT | 4.00 | — |
| seed | INT | 200–18446744073709550000 | The random seed used for creating the noise. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |