czg1225 / AsyncDiff

[NeurIPS 2024] AsyncDiff: Parallelizing Diffusion Models by Asynchronous Denoising
https://czg1225.github.io/asyncdiff_page/
Apache License 2.0
155 stars 8 forks source link

splite_mode, pipe_id for "RunDiffusion/Juggernaut-X-v10" #4

Open ChuRuaNh0 opened 4 months ago

ChuRuaNh0 commented 4 months ago

Thank for your repo, It's so great, Can you support for RunDiffusion/Juggernaut-X-v10. I appreciate your help, thanks

czg1225 commented 4 months ago

Hi @ChuRuaNh0 , RunDiffusion/Juggernaut-X-v10 is supported now. You can try it following the simple usage example:

import torch
from diffusers import StableDiffusionXLPipeline
from src.async_sd import AsyncDiff

pipeline = StableDiffusionXLPipeline.from_pretrained("RunDiffusion/Juggernaut-X-v10", torch_dtype=torch.float16)

async_diff = AsyncDiff(pipeline, model_n=2, stride=1, time_shift=False)

async_diff.reset_state(warm_up=3)
image = pipeline(<prompts>).images[0]
if dist.get_rank() == 0:
  image.save(f"output.jpg")
ChuRuaNh0 commented 4 months ago

@czg1225 I have tried that you changed pipeline config the same sdxl-base-1.0 but it didn't work properly

czg1225 commented 4 months ago

@ChuRuaNh0 , Could you provide more details about your problem? I had no problems accelerating both sdxl-base-1.0 and RunDiffusion/Juggernaut-X-v10