![]() You can also install it on Windows and Mac. You can run this GUI with 1-click using the Colab notebook in the Quick Start Guide. I will use AUTOMATIC1111 GUI in this tutorial. Example 1: Inpainting only to fix limbs.There are other differences, such as the fact that in this implementation, only one pipeline needs to be instantiated (as opposed to two in the other one), but the key motivation for publishing this repository is to provide a space solely focused on the application of ControlNet for inpainting. However, that definition of the pipeline is quite different, but most importantly, does not allow for controlling the controlnet_conditioning_scale as an input argument. There is a related excellent repository of ControlNet-for-Any-Basemodel that, among many other things, also shows similar examples of using ControlNet for inpainting. If you want to learn more about the process of denoising diffusion for images, check out the open-source course DiffusionFastForward with colab notebooks where networks are trained from scratch on high-resolution data! □ ⏩ DiffusionFastForward: learn diffusion from ground up! □ In this case, we demand a large semantic leap and that requires a more subtle guide from the control image! Let's see how tuning the controlnet_conditioning_scale works out for a more challenging example of turning the dog into a cheeseburger! Prompt: "an image of a room with a city skyline view" Let's start with turning a dog into a red panda! Canny Edgeįor the remaining modalities, the panda example doesn't really make much sense, so we use different images and prompts to illustrate the capability! M-LSD (Full example how to get images and run the results is available in the notebook!) ResultsĪll results below have been generated using the ControlNet-with-Inpaint-Demo.ipynb notebook. enable_xformers_memory_efficient_attention() # remove following line if xformers is not installed pipe. # speed up diffusion process with faster scheduler and memory optimization pipe. "runwayml/stable-diffusion-inpainting", controlnet = controlnet, torch_dtype = torch. ![]() Pipe = StableDiffusionControlNetInpaintPipeline. from_pretrained( "lllyasviel/sd-controlnet-canny", torch_dtype = torch. # load control net and stable diffusion v1-5 controlnet = ControlNetModel. Here's an example of how this new pipeline ( StableDiffusionControlNetInpaintPipeline) is used with the core backbone of "runwayml/stable-diffusion-inpainting": An upgrade to the latest version can be expected in the near future (currently, some breaking changes are present in 0.15.0 that should ideally be fixed on the side of the diffusers interface). This code is currently compatible with diffusers=0.14.0. ![]() Demos on □ HuggingFace Using ControlNetInpaint ✏️ Mask and SketchĬheck out the HuggingFace Space which allows you to scribble and describe how you want to recreate a part of an image:Ĭheck out the HuggingFace Space that reimagines scenes with human subjects using a text prompt: The key trick is to use the right value of the parameter controlnet_conditioning_scale - while value of 1.0 often works well, it is sometimes beneficial to bring it down a bit when the controlling image does not fit the selected text prompt very well. In this repository, you will find a basic example notebook that shows how this can work. □ The initial set of models of ControlNet were not trained to work with StableDiffusion inpainting backbone, but it turns out that the results can be pretty good! ControlNet has proven to be a great tool for guiding StableDiffusion models with image-based hints! But what about changing only a part of the image based on that hint?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |