horseee / DeepCache

[CVPR 2024] DeepCache: Accelerating Diffusion Models for Free
https://horseee.github.io/Diffusion_DeepCache/
Apache License 2.0
687 stars 32 forks source link

No Speed Gains #24

Closed saqibameen closed 4 months ago

saqibameen commented 4 months ago

Hi,

I am trying to run DeepCache on v100 using the given instructions on huggingface, in all tests I see that DeepCache take ~10s longer than using SD wihtout DeepCache.

 import torch
 from diffusers import StableDiffusionPipeline
 pipe = StableDiffusionPipeline.from_pretrained('runwayml/stable-diffusion-v1-5', torch_dtype=torch.float16).to("cuda")

from DeepCache import DeepCacheSDHelper
helper = DeepCacheSDHelper(pipe=pipe)
helper.set_params(
    cache_interval=3,
    cache_branch_id=0,
)
helper.enable()

image = pipe("a photo of an astronaut on a moon").images[0]

This is the code that I am using

saqibameen commented 4 months ago

It was an issue at my end with time.