Instructions to use InstantX/SD3-Controlnet-Canny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use InstantX/SD3-Controlnet-Canny with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("InstantX/SD3-Controlnet-Canny", 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
ModuleNotFoundError: No module named 'diffusers.models.controlnet_sd3'
Prerequisite
1.I have download the most updated "Diffusers"
2. Have executed the codes below:
!git clone -b sd3_control https://github.com/instantX-research/diffusers_sd3_control.git
%cd diffusers
!pip install -e .
But still get wrong information showed below, what should I do ? Thank you!
ModuleNotFoundError Traceback (most recent call last)
Cell In[36], line 3
1 import torch
2 from diffusers import StableDiffusion3Pipeline
----> 3 from diffusers.models.controlnet_sd3 import ControlNetSD3Model
4 from diffusers.utils.torch_utils import randn_tensor
5 import sys, os
ModuleNotFoundError: No module named 'diffusers.models.controlnet_sd3'
During the merge, the official team provided some suggestions, and we are currently making revisions. We anticipate completing the merge with diffusers by tomorrow. At that point, you will be able to use the official library directly. We will also be rewriting some of the demo code.
merge的时候官方给了一些建议,正在进行修改,预计明天可以完成与diffusers的merge。到时候直接使用官方库就可以了。我们也会重写一些demo的代码