---
title: tools
canonical_url: "https://www.modelscope.cn/models/hf-diffusers/tools"
md_url: "https://www.modelscope.cn/models/hf-diffusers/tools.md"
repository: hf-diffusers/tools
last_updated: 2024-11-07
license: creativeml-openrail-m
library_name:
  - pytorch
  - diffusers
frameworks:
  - pytorch
language:
  - en
downloads: 1815
stars: 0
tags:
  - stable-diffusion
  - stable-diffusion-diffusers
  - inpainting
  - art
  - artistic
  - diffusers
  - anime
  - absolute-realism
---

# tools

> tools - hf-diffusers 在 ModelScope 开源的模型。Absolute realism 1.6525 inpainting

hf-diffusers/tools 是 ModelScope 魔搭社区上的机器学习模型，采用 creativeml-openrail-m 许可。

- **Repository**: hf-diffusers/tools
- **License**: creativeml-openrail-m
- **Tags**: stable-diffusion, stable-diffusion-diffusers, inpainting, art, artistic, diffusers, anime, absolute-realism
- **Downloads**: 1815
- **Stars**: 0
- **Last updated**: 2024-11-07

Source: https://www.modelscope.cn/models/hf-diffusers/tools

---

# Absolute realism 1.6525 inpainting

`lykon-absolute-realism/absolute-realism-1.6525-inpainting` is a Stable Diffusion Inpainting model that has been fine-tuned on [runwayml/stable-diffusion-inpainting](https://huggingface.co/runwayml/stable-diffusion-inpainting).

Please consider supporting me: 
- on [Patreon](https://www.patreon.com/Lykon275)
- or [buy me a coffee](https://snipfeed.co/lykon)

## Diffusers

For more general information on how to run inpainting models with 🧨 Diffusers, see [the docs](https://huggingface.co/docs/diffusers/using-diffusers/inpaint).

1. Installation

```
pip install diffusers transformers accelerate
```

2. Run
```py
from diffusers import AutoPipelineForInpainting, DEISMultistepScheduler
import torch
from diffusers.utils import load_image

pipe = AutoPipelineForInpainting.from_pretrained('lykon-absolute-realism/absolute-realism-1.6525-inpainting', torch_dtype=torch.float16, variant="fp16")
pipe.scheduler = DEISMultistepScheduler.from_config(pipe.scheduler.config)
pipe = pipe.to("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)
mask_image = load_image(mask_url)


prompt = "a majestic tiger sitting on a park bench"

generator = torch.manual_seed(33)
image = pipe(prompt, image=image, mask_image=mask_image, generator=generator, num_inference_steps=25).images[0]  
image.save("./image.png")
```

![](./image.png)
