czg1225 / AsyncDiff

Official implementation of "AsyncDiff: Parallelizing Diffusion Models by Asynchronous Denoising"
https://czg1225.github.io/asyncdiff_page/
Apache License 2.0
140 stars 7 forks source link

pipe for img2img #8

Open Hxd1995 opened 4 weeks ago

Hxd1995 commented 4 weeks ago

Thank for your repo,Can this method be used on img2img, such like diffusers/stable-diffusion-xl-1.0-inpainting-0.1?Looking forward to your reply,thanks!

czg1225 commented 4 weeks ago

@Hxd1995 , Thanks for your interest. AsyncDiff can be used on img2img models. We have supported super-resolution (Stable Diffusion x4 Upscaler) and inpainting models (Stable Diffusion XL Inpainting).

You can try them using the following scripts.

Accelerate Stable Diffusion x4 Upscaler:

CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.run --nproc_per_node=2 --run-path examples/run_sd_upscaler.py

Accelerate SDXL Inpainting:

CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.run --nproc_per_node=2 --run-path examples/run_sdxl_inpaint.py