mirror of
https://github.com/nod-ai/AMD-SHARK-Studio.git
synced 2026-02-19 11:56:43 -05:00
[WIP] ControlNet integration:
- Since this is dependent on
diffusersand currently there's a WIP draft PR, we'd need to clone takuma104/diffusers, checkoutcontrolnetbranch and builddiffusersas mentioned here. - NOTE: Run
pip uninstall diffusersbefore 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
diffuserscheckpoint 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"