Instructions to use umu/DemoireEdit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Inference
- Notebooks
- Google Colab
- Kaggle
DemoiréEdit
Dual-Scale Condition-Shift Editing for Robust Real-World Image Demoiréing
Project page · Project repository
This repository distributes the restoration LoRA adapter used by DemoiréEdit. It is an adapter, not a standalone base model or a directly loadable generic Diffusers pipeline. Use the project inference implementation and its pinned upstream model components.
Files
demoireedit.safetensors: restoration adapter, 472,047,184 bytes, 1,440 BF16 tensors.inference_config.json: the two-stage condition-shift sampling settings.base-models.json: pinned upstream component revisions and checksums.checksums.json: adapter identity and integrity information.MODEL_PROVENANCE.md: checkpoint provenance, validation scope and upstream terms.
Download and use
After installing the project code and downloading the base components as described in its README:
from huggingface_hub import hf_hub_download
adapter = hf_hub_download(
repo_id="umu/DemoireEdit",
filename="demoireedit.safetensors",
revision="main",
)
export DIFFSYNTH_MODEL_BASE_PATH=weights/base
export DIFFSYNTH_SKIP_DOWNLOAD=true
export DEMOIRE_EDIT_WEIGHTS_PATH=/path/to/downloaded/demoireedit.safetensors
demoire-infer --input image.png --output outputs/restored.png
The CLI verifies the adapter size and SHA-256 before loading. For fixed model revisions, pass the repository commit hash instead of main to hf_hub_download.
Method
The first stage restores a view with short side 1024, using 10 sampling steps and a black auxiliary reference. The second stage starts from noise at input resolution and uses 10 steps: the first 3 condition on the first-stage result, and the remaining 7 on the original input. CFG is 1.0.
Provenance and validation
The supplied tensors are the selected historical checkpoint. Renaming the downloadable file does not change tensor values or its training history. The maintained source recipe and the historical adapter are documented separately in MODEL_PROVENANCE.md.
The adapter has passed structure checks for 720 linear targets and one real 1536 × 1536 crop through the full 10+10-step GPU pipeline. The Gradio upload/inference/download path matched the CLI output pixels at the same seed. These are finite integration checks; full-resolution 4K inference and paper-scale benchmark reproduction have not been established by these checks.
Editing can alter color and fine detail. Inspect outputs where fidelity matters.
Terms
The base components retain their upstream licenses and notices. The project source code is Apache-2.0; this does not automatically assign a separate adapter license. No additional adapter license has been specified. See MODEL_PROVENANCE.md and the upstream model repositories.
Model tree for umu/DemoireEdit
Base model
Qwen/Qwen-Image-Edit-2509