- Image used to control the reverse diffusion process
The script will perform a image generation conditioned on the control image.
Images like this can be generated using the script in ailia-models/depth_estimation/depth_anything
.
- Prompt and optional negative prompt
By default, the prompt is set to "Beautiful flower garden full of tulips.", and the negative prompt is set to ""(empty string).
- Generated image
Internet connection is required when running the script for the first time, as it will download the necessary model files.
Running this script will generate an image conditioned on the control image.
Use --help
to see the help message with all the arguments.
$ python3 depth_anything_controlnet.py
$ python3 depth_anything_controlnet.py -i depth_flower.png -s output.png
-i
and -s
options can be used to specify the
input path and save path separately.
$ python3 depth_anything_controlnet.py --prompt "Flower garden full of yellow tulips" --negative_prompt "Low quality, unrealistic." --n_timesteps 50 --sampler ddim
The argument --n_timesteps
can be used to specify the number of steps the model takes to generate the image.
The sampling method specified in the --sampler
argument is used in the reverse diffusion process. Currently supports ddpm and ddim only.
$ python3 depth_anything_controlnet.py --width 512 --height 512
--width
and --height
argument can be used to change the size of the generated image. It may take longer or even be impossible to generate the image depending on the machine being used.
Pytorch
ONNX opset=12