Update handler.py
Browse files- handler.py +5 -3
handler.py
CHANGED
@@ -202,7 +202,7 @@ class GenerationConfig:
|
|
202 |
|
203 |
# TeaCache settings
|
204 |
enable_teacache: bool = True
|
205 |
-
teacache_threshold: float = 0.
|
206 |
|
207 |
# Enhance-A-Video settings
|
208 |
enable_enhance_a_video: bool = True
|
@@ -390,7 +390,7 @@ class EndpointHandler:
|
|
390 |
- audio_negative_prompt (optional, str): nehative prompt to use for the audio generation (concepts to ignore)
|
391 |
- quality (optional, str, default to 18): The range of the CRF scale is 0–51, where 0 is lossless (for 8 bit only, for 10 bit use -qp 0), 23 is the default, and 51 is worst quality possible.
|
392 |
- enable_teacache (optional, bool, default to True): Generate faster at the cost of a slight quality loss
|
393 |
-
- teacache_threshold (optional, float, default to 0.
|
394 |
- enable_enhance_a_video (optional, bool, default to True): enable the enhance_a_video optimization
|
395 |
- enhance_a_video_weight(optional, float, default to 4.0): amount of video enhancement to apply
|
396 |
|
@@ -442,7 +442,9 @@ class EndpointHandler:
|
|
442 |
|
443 |
# TeaCache settings
|
444 |
enable_teacache=params.get("enable_teacache", True),
|
445 |
-
|
|
|
|
|
446 |
|
447 |
|
448 |
# Add enhance-a-video settings
|
|
|
202 |
|
203 |
# TeaCache settings
|
204 |
enable_teacache: bool = True
|
205 |
+
teacache_threshold: float = 0.05 # values: 0 (original), 0.03 (1.6x speedup), 0.05 (2.1x speedup).
|
206 |
|
207 |
# Enhance-A-Video settings
|
208 |
enable_enhance_a_video: bool = True
|
|
|
390 |
- audio_negative_prompt (optional, str): nehative prompt to use for the audio generation (concepts to ignore)
|
391 |
- quality (optional, str, default to 18): The range of the CRF scale is 0–51, where 0 is lossless (for 8 bit only, for 10 bit use -qp 0), 23 is the default, and 51 is worst quality possible.
|
392 |
- enable_teacache (optional, bool, default to True): Generate faster at the cost of a slight quality loss
|
393 |
+
- teacache_threshold (optional, float, default to 0.05): Amount of cache, 0 (original), 0.03 (1.6x speedup), 0.05 (Default, 2.1x speedup).
|
394 |
- enable_enhance_a_video (optional, bool, default to True): enable the enhance_a_video optimization
|
395 |
- enhance_a_video_weight(optional, float, default to 4.0): amount of video enhancement to apply
|
396 |
|
|
|
442 |
|
443 |
# TeaCache settings
|
444 |
enable_teacache=params.get("enable_teacache", True),
|
445 |
+
|
446 |
+
# values: 0 (original), 0.03 (1.6x speedup), 0.05 (2.1x speedup).
|
447 |
+
teacache_threshold=params.get("teacache_threshold", 0.05),
|
448 |
|
449 |
|
450 |
# Add enhance-a-video settings
|