Skip to content

Commit 8dbb673

Browse files
committed
add magcache
1 parent b010a8c commit 8dbb673

File tree

4 files changed

+520
-0
lines changed

4 files changed

+520
-0
lines changed

src/diffusers/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,13 @@
167167
"FirstBlockCacheConfig",
168168
"HookRegistry",
169169
"LayerSkipConfig",
170+
"MagCacheConfig",
170171
"PyramidAttentionBroadcastConfig",
171172
"SmoothedEnergyGuidanceConfig",
172173
"apply_faster_cache",
173174
"apply_first_block_cache",
174175
"apply_layer_skip",
176+
"apply_mag_cache",
175177
"apply_pyramid_attention_broadcast",
176178
]
177179
)
@@ -888,11 +890,13 @@
888890
FirstBlockCacheConfig,
889891
HookRegistry,
890892
LayerSkipConfig,
893+
MagCacheConfig,
891894
PyramidAttentionBroadcastConfig,
892895
SmoothedEnergyGuidanceConfig,
893896
apply_faster_cache,
894897
apply_first_block_cache,
895898
apply_layer_skip,
899+
apply_mag_cache,
896900
apply_pyramid_attention_broadcast,
897901
)
898902
from .models import (

src/diffusers/hooks/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
from .hooks import HookRegistry, ModelHook
2424
from .layer_skip import LayerSkipConfig, apply_layer_skip
2525
from .layerwise_casting import apply_layerwise_casting, apply_layerwise_casting_hook
26+
from .mag_cache import MagCacheConfig, apply_mag_cache
2627
from .pyramid_attention_broadcast import PyramidAttentionBroadcastConfig, apply_pyramid_attention_broadcast
2728
from .smoothed_energy_guidance_utils import SmoothedEnergyGuidanceConfig

0 commit comments

Comments
 (0)