ControlNets
OctoAI's asset library is pre-populated with the most popular available ControlNets which allow added image input to influence and customize the image generation.
While traditional image generation models can produce stunning visuals, they often lack guidance, and therefore the ability to generate images subject to user-desired image composition. ControlNet changes the game by allowing an additional image input that can be used for conditioning (influencing) the final image generation. This could be anything from simple scribbles to detailed depth maps or edge maps. By conditioning on these input images, ControlNet directs the Stable Diffusion model to generate images that align closely with the user’s intent.
OctoAI’s Asset Library comes pre-populated with the followinglist of public controlnets.
Other than using the default controlnet checkpoints, you can also upload private ControlNet checkpoints into the OctoAI Asset Library and then use those checkpoints at generation time via the parameter controlnet
in the API. For custom controlnet checkpoints, make sure to provide your own ControlNet mask in the controlnet_image
parameter.
Below is an example of using a Canny ControlNet along with ControlNet image (left) and a simple prompt A photo of woman wearing a (rose pink dress:1)
. Canny ControlNet is designed to detect a wide range of edges in images. Given a raw image or sketch, Canny can extract the image’s contours and edges, and use them for image generation. You can see the image (right) generated from SDXL with Canny ControlNet applied.
Example Code for Canny ControlNet:
Below is an example of using a OpenPose ControlNet along with ControlNet image (left) and a prompt An photo of a white man on a japanese tatami mat
. OpenPose ControlNet is a fast human keypoint detection model that can extract human poses like positions of hands, legs, and head. See the example below. You can see the image (right) generated from SDXL with OpenPose ControlNet applied.
Example Code for OpenPose ControlNet: