Image-to-Image
Diffusers
Safetensors
StableDiffusionXLInpaintPipeline
inpainting
object-removal
lcm
sd-xl
Instructions to use visualseed/RORem-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use visualseed/RORem-merged with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import AutoPipelineForInpainting from diffusers.utils import load_image # switch to "mps" for apple devices pipe = AutoPipelineForInpainting.from_pretrained("visualseed/RORem-merged", dtype=torch.float16, device_map="cuda") img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png" mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png" image = load_image(img_url).resize((1024, 1024)) mask_image = load_image(mask_url).resize((1024, 1024)) prompt = "a tiger sitting on a park bench" generator = torch.Generator(device="cuda").manual_seed(0) image = pipe( prompt=prompt, image=image, mask_image=mask_image, guidance_scale=8.0, num_inference_steps=20, # steps between 15 and 30 work well for us strength=0.99, # make sure to use `strength` below 1.0 generator=generator, ).images[0] - Notebooks
- Google Colab
- Kaggle
RORem pipeline with the LCM-distillation LoRA merged into the UNet (788 adapters, scale 1)
f8a5222 verified |
Download README.md from visualseed/RORem-merged: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/visualseed/RORem-merged/resolve/main/README.md
- Command line
-
hf download hf://visualseed/RORem-merged/README.md
-
curl -L -o README.md https://huggingface.co/visualseed/RORem-merged/resolve/main/README.md
1.41 kB
| license: apache-2.0 | |
| library_name: diffusers | |
| pipeline_tag: image-to-image | |
| base_model: LetsThink/RORem | |
| tags: | |
| - inpainting | |
| - object-removal | |
| - lcm | |
| - sd-xl | |
| # RORem (merged) | |
| SDXL - RORem (CVPR 2025) repackaged as a plain diffusers | |
| `StableDiffusionXLInpaintPipeline`: the [LetsThink/RORem](https://huggingface.co/LetsThink/RORem) | |
| weights with their LCM-distillation LoRA already merged into the UNet, so | |
| conversion pipelines install straight from this repository with no adapter | |
| step. Nothing was retrained — the merge is a plain B@A bake at scale 1 | |
| (788 adapters), numerically equivalent to diffusers' own `fuse_lora`. | |
| ## Inference contract | |
| Verified by instrumenting the reference `inference_RORem_4S.py` call | |
| (diffusers 0.41): | |
| ```python | |
| pipe(prompt="", image=image, mask_image=mask, guidance_scale=1.0, | |
| num_inference_steps=4, strength=0.99) # LCMScheduler | |
| ``` | |
| The scheduler places [999, 759, 499, 259] and the strength slice drops the | |
| head — three denoiser passes at **[759, 499, 259]**, with the photo noised | |
| to 759. Guidance is off and the prompt is empty: RORem is prompt-free. | |
| ## Provenance | |
| Derived from [LetsThink/RORem](https://huggingface.co/LetsThink/RORem) | |
| (Apache-2.0), the LCM LoRA from the RORem-LCM release, on the | |
| [CreativeML Open RAIL++-M](https://huggingface.co/diffusers/stable-diffusion-xl-1.0-inpainting-0.1) | |
| SDXL inpainting base. Project page: github.com/leeruibin/RORem. | |