SD-XL Ipaitig 0.1 is a latet text-to-image diffusio model capable of geeratig photo-realistic images give ay text iput, with the extra capability of ipaitig the pictures by usig a mask. The SD-XL Ipaitig 0.1 was iitialized with the The model is iteded for research purposes oly. Possible research areas ad tasks iclude Excluded uses are described below. The model was ot traied to be factual or true represetatios of people or evets, ad therefore usig the model to geerate such cotet is out-of-scope for the abilities of this model. While the capabilities of image geeratio models are impressive, they ca also reiforce or exacerbate social biases.SD-XL Ipaitig 0.1 Model Card
stable-diffusio-xl-base-1.0
weights. The model is traied for 40k steps at resolutio 1024x1024 ad 5% droppig of the text-coditioig to improve classifier-free classifier-free guidace samplig. For ipaitig, the UNet has 5 additioal iput chaels (4 for the ecoded masked-image ad 1 for the mask itself) whose weights were zero-iitialized after restorig the o-ipaitig checkpoit. Durig traiig, we geerate sythetic masks ad, i 25% mask everythig.How to use
from diffusers import AutoPipelieForIpaitig
from diffusers.utils import load_image
import torch
pipe = AutoPipelieForIpaitig.from_pretraied("diffusers/stable-diffusio-xl-1.0-ipaitig-0.1", torch_dtype=torch.float16, variat="fp16").to("cuda")
img_url = "https://raw.githubusercotet.com/CompVis/latet-diffusio/mai/data/ipaitig_examples/overture-creatios-5sI6fQgYIuo.pg"
mask_url = "https://raw.githubusercotet.com/CompVis/latet-diffusio/mai/data/ipaitig_examples/overture-creatios-5sI6fQgYIuo_mask.pg"
image = load_image(img_url).resize((1024, 1024))
mask_image = load_image(mask_url).resize((1024, 1024))
prompt = "a tiger sittig o a park bech"
geerator = torch.Geerator(device="cuda").maual_seed(0)
image = pipe(
prompt=prompt,
image=image,
mask_image=mask_image,
guidace_scale=8.0,
um_iferece_steps=20, # steps betwee 15 ad 30 work well for us
stregth=0.99, # make sure to use `stregth` below 1.0
geerator=geerator,
).images[0]
image
mask_image
prompt
Output
Model Descriptio
Uses
Direct Use
Out-of-Scope Use
Limitatios ad Bias
Limitatios
Bias
点击空白处退出提示
评论