Open Barry0121 opened 3 months ago
Hi @Barry0121,
Q1: The variable responsible for storing cached features is named as prv_features
at Line 723 and undergoes updates at Line 753. To understand the mechanism of feature caching, you can delve into the inference code of the UNet architecture. The function sample_from_quad_center
exclusively serves to adjust the caching schedule.
Q2: Each combination of cache_layer_id
and cache_block_id
corresponds uniquely to a skip connection.
Q3: I documented the modifications compared to the original pipeline in ReadMe, available here. You can find detailed information there.
Thank you for the response! Appreciate your insight.
Hi! I'm doing a deep dive into the implementation and have some questions.
DeepCache.sd.pipeline_stable_diffusion.py
under StableDiffusionPipeline's call() around lines 726 to 740 (It says "7. Denoising loop" at the top, so I assume it must be around here). However, I am struggling to see how/where you are storing the cached up-sample block output? Are you doing this throughsample_from_quad_center()
? But this function is only for non-uniform sampling right?There are parts of the paper I'm not sure about, so I apologize if my questions seem dumb. Thank you!