erase_v1 โ object removal for FLUX.2 [klein] 4B turbo
A LoRA for FLUX.2 [klein] 4B (the distilled "turbo" variant: 4 steps, no CFG), and the precomputed prompt embedding it is used with. Given a photo and a selection, it replaces the selection by the surrounding background, object shadows and reflections included.
It powers the generative fill of SlopShop, an open-source image editor, which runs it locally through ONNX Runtime.
Files
| File | Content |
|---|---|
erase_v1_diffusers.safetensors |
the LoRA, diffusers keys (transformer.transformer_blocks.N.attn.to_q.lora_A.weightโฆ), rank 32, alpha 32, scale 1.0, 100 layers |
prompt_embeds.safetensors |
prompt_embeds bf16 [1, 512, 7680] and text_ids int64 [1, 512, 4]: the prompt below, encoded once, so that no text encoder is needed |
Prompt (for information; do not re-encode it): Remove the object under the white area of the mask (second image), including its shadow and reflection, and fill that area naturally with the surrounding background.
Use
Working size: at most 1 Mpx, both sides multiples of 16.
Reference images:
- the photo, unchanged;
- the mask as an RGB image (white to remove, black to keep).
Both are VAE-encoded (the distribution's mean), 2ร2-patchified and normalized by the VAE's batch-norm statistics.
Joint sequence:
[target, photo, mask]. Their position ids are(T, y, x, 0), with T = 0, 10 and 20 respectively. The text ids are(0, 0, 0, l).Steps: 4 Euler steps on FLUX.2's resolution-shifted sigmas, one pass per step, no guidance.
Composite: strictly the result inside the selection and the input outside it.
Selection: grow it by about 2 % of the larger side, or use its convex hull; a selection tight on the object can leave a faint remnant.
Provenance and license
Apache-2.0.
- Distilled from FLUX.2 [klein] base 4B and fal's object-remove LoRA, both Apache-2.0.
- Trained on images of the CORNE set (Apache-2.0).
Model tree for slopshop/erase-v1
Base model
black-forest-labs/FLUX.2-klein-4B