Instructions to use xinsir/controlnet-tile-sdxl-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use xinsir/controlnet-tile-sdxl-1.0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("xinsir/controlnet-tile-sdxl-1.0", 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 Settings
- Draw Things
- DiffusionBee
Can this model be used in StableDiffusionXLControlNetImg2ImgPipeline?
I have a question that if model can be used in StableDiffusionXLControlNetImg2ImgPipeline, does it need to create control_img like the example or just past image directly to 2 args: image and control_image in pipeline.
Here is my code:
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
controlnet = ControlNetModel.from_pretrained('xinsir/controlnet-tile-sdxl-1.0', torch_dtype=torch.float16, device=device)
base = StableDiffusionXLControlNetImg2ImgPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
torch_dtype=torch.float16,
vae=vae,
controlnet=controlnet,
variant="fp16",
use_safetensors=True,
safety_checker=None,
scheduler=eulera_scheduler,
).to(device)
image = Image.open('...')
image = image.resize((1024, 1024))
control_img = ...like your example
base_output = base(
prompt=control_prompt,
image=image,
control_image=image, # Question: control_img or image ?
).images[0]