ControlNet
We now have ControlNet support on Auto1111SDK from the extension. ControlNet can be added to the original Stable Diffusion model to generate images to greatly customize the generation process.
With Auto1111SDK, you can use ControlNet as follows:
Initialize a ControlNet model first. This can be done as follows:
from auto1111sdk import ControlNetModel
model = ControlNetModel(model="<THE CONTROLNET MODEL FILE NAME (WITHOUT EXTENSION)>",
image="<PATH TO IMAGE>")An example of this would be:
model = ControlNet(model="control_v11p_sd15_openpose",
image="stock_mountain.png")A full list of parameters is shown below:
model: str # The name of the model
image: str # The path to the image
weight: float = 1.0
resize_mode: int = 1
lowvram: bool = False
processor_res: int = 64
threshold_a: int = 64
threshold_b: int = 64
guidance_start: float = 0.0
guidance_end: float = 1.0
control_mode: int = 0
pixel_perfect: bool = FalseAdd the controlnet model to the StableDiffusionPipeline for text-to-image or image-to-image
Last updated