jbilcke-hf commited on
Commit
060887f
·
verified ·
1 Parent(s): 681c549

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +6 -1
handler.py CHANGED
@@ -129,13 +129,18 @@ class EndpointHandler:
129
  # https://github.com/huggingface/diffusers/pull/10163/files#diff-777f4ee62cb325371233a450e0f6cc0ba357a3fade2ec2dea912260b4f8d08ceR67-R74
130
 
131
  faster_cache_config = FasterCacheConfig(
 
132
  spatial_attention_block_skip_range=2,
133
  spatial_attention_timestep_skip_range=(-1, 901),
134
  unconditional_batch_skip_range=2,
135
  attention_weight_callback=lambda _: 0.5,
136
  is_guidance_distilled=True,
 
 
 
 
137
  )
138
-
139
  self.text_to_video.transformer.enable_cache(faster_cache_config)
140
 
141
 
 
129
  # https://github.com/huggingface/diffusers/pull/10163/files#diff-777f4ee62cb325371233a450e0f6cc0ba357a3fade2ec2dea912260b4f8d08ceR67-R74
130
 
131
  faster_cache_config = FasterCacheConfig(
132
+ current_timestep_callback=lambda: self.text_to_video.current_timestep,
133
  spatial_attention_block_skip_range=2,
134
  spatial_attention_timestep_skip_range=(-1, 901),
135
  unconditional_batch_skip_range=2,
136
  attention_weight_callback=lambda _: 0.5,
137
  is_guidance_distilled=True,
138
+
139
+ # do we need to uncomment those?
140
+ #unconditional_batch_timestep_skip_range=(-1, 901),
141
+ #tensor_format="BFCHW",
142
  )
143
+
144
  self.text_to_video.transformer.enable_cache(faster_cache_config)
145
 
146