Files
Phaneesh Barwaria 604c0f81b9 Update model_wrappers.py
remove exception
2023-02-24 19:55:48 +05:30
..
2023-02-24 19:55:48 +05:30
2023-02-22 15:06:27 +00:00

[WIP] ControlNet integration:

  • Since this is dependent on diffusers and currently there's a WIP draft PR, we'd need to clone takuma104/diffusers, checkout controlnet branch and build diffusers as mentioned here.
  • NOTE: Run pip uninstall diffusers before building it from scratch in the previous step.
  • Currently we've included ControlNet (Canny feature) as part of our SharkStableDiffusion pipeline.
  • To test it you'd first need to download control_sd15_canny.pth and pass it through convert_controlnet_to_diffusers.py.
  • You then need to modify this line to point to the extracted diffusers checkpoint directory.
  • Download sample image and provide the path here.
  • Finally run
python apps/stable_diffusion/scripts/txt2img.py --precision=fp32 --device=cuda --prompt="bird" --max_length=64 --import_mlir --enable_stack_trace --no-use_tuned --hf_model_id="runwayml/stable-diffusion-v1-5" --scheduler="DDIM"