CoolFace
Modelpublic

InstantX/SD3-Controlnet-Tile

sourceHugging Faceupdated 2y agoView on Hugging Face
51likes127downloads
README.md51 linesDownload Raw Back to root
1# SD3 Controlnet2 3 4 5 6| control image | weight=0.0 | weight=0.3 | weight=0.5 | weight=0.7 | weight=0.9 |7|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|8|<img src="./tile.jpg" width = "400" /> | <img src="./demo_0.jpg" width = "400" /> | <img src="./demo_3.jpg" width = "400" /> | <img src="./demo_5.jpg" width = "400" /> | <img src="./demo_7.jpg" width = "400" /> | <img src="./demo_9.jpg" width = "400" /> |9 10 11**Please ensure that the version of diffusers >= 0.30.0.dev0.**12 13 14# Demo15```python16import torch17from diffusers import StableDiffusion3ControlNetPipeline18from diffusers.models import SD3ControlNetModel, SD3MultiControlNetModel19from diffusers.utils import load_image20 21# load pipeline22controlnet = SD3ControlNetModel.from_pretrained("InstantX/SD3-Controlnet-Tile")23pipe = StableDiffusion3ControlNetPipeline.from_pretrained(24    "stabilityai/stable-diffusion-3-medium-diffusers",25    controlnet=controlnet26)27pipe.to("cuda", torch.float16)28 29# config30control_image = load_image("https://huggingface.co/InstantX/SD3-Controlnet-Tile/resolve/main/tile.jpg")31prompt = 'Anime style illustration of a girl wearing a suit. A moon in sky. In the background we see a big rain approaching. text "InstantX" on image'32n_prompt = 'NSFW, nude, naked, porn, ugly'33image = pipe(34    prompt, 35    negative_prompt=n_prompt, 36    control_image=control_image, 37    controlnet_conditioning_scale=0.5,38).images[0]39image.save('image.jpg')40 41 42```43 44 45## Limitation46 47Due to the fact that only 1024*1024 pixel resolution was used during the training phase, 48the inference performs best at this size, with other sizes yielding suboptimal results. 49We will initiate multi-resolution training in the future, and at that time, we will open-source the new weights.50 51