Image-to-Image
Diffusers
Safetensors
Core ML
StableDiffusionInpaintPipeline
image-editing
local-ai
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 AutoPipelineForInpainting from diffusers.utils import load_image # switch to "mps" for apple devices pipe = AutoPipelineForInpainting.from_pretrained("neonforestmist/Clover-Image-Tiny-Inpaint", 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
Download text_encoder/config.json from neonforestmist/Clover-Image-Tiny-Inpaint: direct link, hf CLI and curl.
- Browser
- Download file 554 Bytes
-
https://huggingface.co/neonforestmist/Clover-Image-Tiny-Inpaint/resolve/main/text_encoder/config.json
- Command line
-
hf download hf://neonforestmist/Clover-Image-Tiny-Inpaint/text_encoder/config.json
-
curl -L -o config.json https://huggingface.co/neonforestmist/Clover-Image-Tiny-Inpaint/resolve/main/text_encoder/config.json
554 Bytes
| { | |
| "architectures": [ | |
| "CLIPTextModel" | |
| ], | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "dropout": 0.0, | |
| "dtype": "float32", | |
| "eos_token_id": 2, | |
| "hidden_act": "quick_gelu", | |
| "hidden_size": 768, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "layer_norm_eps": 1e-05, | |
| "max_position_embeddings": 77, | |
| "model_type": "clip_text_model", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 1, | |
| "projection_dim": 512, | |
| "transformers_version": "4.57.6", | |
| "vocab_size": 49408 | |
| } | |