Instructions to use alimama-creative/SD3-Controlnet-Inpainting with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use alimama-creative/SD3-Controlnet-Inpainting with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("alimama-creative/SD3-Controlnet-Inpainting", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Model not worked
I installed diffusers from the source code and ran experiments using dog and dog_mask in images. I found that the model still modified the entire image without any control
Code is:
res_image = pipe(
negative_prompt="deformed, distorted, disfigured, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, mutated hands and fingers, disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, NSFW",
prompt=prompt,
height=height,
width=width,
control_image=image,
control_mask=mask,
num_inference_steps=28,
generator=generator,
controlnet_conditioning_scale=0.95,
guidance_scale=20,
).images[0]

nothing happened.
if guidance_scale is set to 50 or bigger, result will be
According to experience, it's best to keep the guidance scale between 6 and 9; exceeding this range may worsen the results. Could you please post your complete code?