Image-to-Image
Diffusers
Safetensors
Core ML
StableDiffusionInpaintPipeline
clover-image
inpainting
stable-diffusion
Instructions to use neonforestmist/Clover-Image-Tiny-Inpaint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use neonforestmist/Clover-Image-Tiny-Inpaint with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("neonforestmist/Clover-Image-Tiny-Inpaint", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
File size: 5,099 Bytes
760bd1f c970403 760bd1f c970403 760bd1f c970403 963b20b c970403 760bd1f c970403 760bd1f 711a588 760bd1f 95bf78b 8858ec2 760bd1f 95bf78b 8858ec2 95bf78b c970403 95bf78b 760bd1f 8858ec2 95bf78b 760bd1f c970403 760bd1f c970403 8858ec2 963b20b c970403 711a588 c970403 760bd1f c970403 760bd1f c970403 760bd1f c970403 760bd1f c970403 8858ec2 c970403 95bf78b c970403 8858ec2 c970403 95bf78b c970403 711a588 95bf78b c970403 95bf78b 711a588 c970403 711a588 c970403 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | ---
library_name: diffusers
pipeline_tag: image-to-image
base_model:
- neonforestmist/Clover-Image-Tiny
- stable-diffusion-v1-5/stable-diffusion-inpainting
license: creativeml-openrail-m
tags:
- clover-image
- inpainting
- stable-diffusion
- coreml
---
# Clover Image Tiny Inpaint HQ
Clover Image Tiny Inpaint HQ is the high-quality, context-aware inpainting
companion to [Clover Image Tiny](https://huggingface.co/neonforestmist/Clover-Image-Tiny).
It combines the complete Stable Diffusion 1.5 inpainting U-Net with Clover
Image Tiny's tokenizer, text encoder, VAE, and scheduler.
This preserves Clover compatibility while replacing the compact inpainting
denoiser that frequently produced blurry or unrecognizable masked objects.
The pipeline uses the standard nine-channel inpainting contract:
```text
[noisy latent (4), mask (1), masked-image latent (4)]
```
## Diffusers example
```python
import torch
from diffusers import AutoPipelineForInpainting, DPMSolverMultistepScheduler
from diffusers.utils import load_image
pipe = AutoPipelineForInpainting.from_pretrained(
"neonforestmist/Clover-Image-Tiny-Inpaint",
torch_dtype=torch.float16,
).to("cuda")
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
image = pipe(
prompt="a glossy red enamel kettle resting naturally on the countertop",
negative_prompt="blurry, distorted, low detail",
image=load_image("source.png"),
mask_image=load_image("mask.png"),
num_inference_steps=20,
guidance_scale=6.0,
padding_mask_crop=96,
).images[0]
image.save("clover-inpaint.png")
```
Recommended interactive defaults are DPM-Solver++, 20 steps, CFG 6.0, and a
96-pixel context crop. Composite the generated result through the exact binary
mask when unchanged source pixels must remain byte-for-byte untouched.
## Inpainting example
This edit starts from the Clover Image Tiny artwork below and uses the prompt
`add blue sunglasses`. The source and result are included so the masked edit
can be compared directly.
| Source image | Inpainted result |
|:---:|:---:|
|  |  |
## Quality gate
The release was evaluated on 24 deterministic, held-out, human-rated
InpaintCOCO edits. Every output was also reviewed in three visual contact
sheets before release.
| Metric | Previous Clover inpaint | HQ release | SD 1.5 inpaint teacher |
|---|---:|---:|---:|
| Masked prompt CLIP similarity (higher) | 0.2642 | **0.2768** | 0.2820 |
| Masked target MAE (lower) | 0.2510 | **0.2231** | 0.2156 |
| Changed pixels outside the mask | 0 | **0** | 0 |
The HQ release improves prompt alignment by 4.8% and reduces masked target
error by 11.1% relative to the previous Clover inpainting release. The visual
gate showed recognizable buses, dogs, trains, furniture, signs, and
scene-consistent lighting where the compact candidates often collapsed into
amorphous fills.
## Selection provenance
The release process compared the existing checkpoint, a 30,000-step full-U-Net
distillation run, two fused context-LoRA refinements, partial weight blends,
the full Stable Diffusion inpainting reference, and this Clover-component
hybrid. The 30,000-step and context-LoRA candidates were rejected because they
did not beat the existing release across both visual and quantitative gates.
The published HQ architecture was the only Clover-compatible candidate that
materially improved both prompt alignment and reconstruction.
- Inpainting U-Net revision:
`stable-diffusion-v1-5/stable-diffusion-inpainting@8a4288a76071f7280aedbdb3253bdb9e9d5d84bb`
- Clover components: `neonforestmist/Clover-Image-Tiny`
- Evaluation dataset: `phiyodr/InpaintCOCO@1ffac84be2dfc5ad9afccad868522fad64457435`
- Selection platform: Modal H100
- Evaluation seed: `20260813`
## Core ML and style mixing
The companion iOS resources are published at
[`neonforestmist/Clover-Image-Tiny-Inpaint-CoreML`](https://huggingface.co/neonforestmist/Clover-Image-Tiny-Inpaint-CoreML).
Its batch-one stateful U-Net supports up to three Clover styles simultaneously
with independent strengths. The style tensors remain separate downloads and
are composed exactly at runtime; they are not fused into three full 1.6 GB
models.
## Limitations
Small text, hands, faces, exact logos, and masks below latent resolution can
still fail. Output quality depends on the source, mask, prompt, scheduler,
guidance, seed, and step count. This release inherits the limitations and
license obligations of Clover Image Tiny and Stable Diffusion 1.5 inpainting.
## Citation
```bibtex
@software{lozadaperez2026cloverimagetinyinpaint,
author = {Lukas Lozada Perez},
title = {Clover Image Tiny Inpaint HQ: Local Context-Aware Image Inpainting},
year = {2026},
url = {https://huggingface.co/neonforestmist/Clover-Image-Tiny-Inpaint}
}
```
Designed and developed independently by Lukas Lozada Perez. Open weights under
the CreativeML Open RAIL-M license; complete local inference is supported.
|