Fabrice-TIERCELIN commited on
Commit
5e2a644
·
verified ·
1 Parent(s): a87828a

Use TeaCache', value=False

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -514,7 +514,7 @@ def get_duration(input_image, prompt, generation_mode, n_prompt, randomize_seed,
514
  global total_second_length_debug_value
515
 
516
  if total_second_length_debug_value is not None:
517
- return min(total_second_length_debug_value * 60, 600)
518
  return total_second_length * 60
519
 
520
 
@@ -531,7 +531,7 @@ def process(input_image, prompt,
531
  gs=10.0,
532
  rs=0.0,
533
  gpu_memory_preservation=6,
534
- use_teacache=True,
535
  mp4_crf=16
536
  ):
537
  global stream, input_image_debug_value, prompt_debug_value, total_second_length_debug_value
@@ -844,7 +844,7 @@ def get_duration_video(input_video, prompt, n_prompt, randomize_seed, seed, batc
844
  global total_second_length_debug_value
845
  if total_second_length_debug_value is not None:
846
  return min(total_second_length_debug_value * 60 * 10, 600)
847
- return total_second_length * 60 * 10
848
 
849
  # 20250506 pftq: Modified process to pass clean frame count, etc from video_encode
850
  @spaces.GPU(duration=get_duration_video)
@@ -943,7 +943,7 @@ adapted from the official code repo [FramePack](https://github.com/lllyasviel/Fr
943
 
944
  with gr.Accordion("Advanced settings", open=False):
945
  with gr.Row():
946
- use_teacache = gr.Checkbox(label='Use TeaCache', value=True, info='Faster speed, but often makes hands and fingers slightly worse.')
947
  no_resize = gr.Checkbox(label='Force Original Video Resolution (no Resizing) (only for video extension)', value=False, info='Might run out of VRAM (720p requires > 24GB VRAM).')
948
 
949
  n_prompt = gr.Textbox(label="Negative Prompt", value="Missing arm, unrealistic position, blurred, blurry", info='Requires using normal CFG (undistilled) instead of Distilled (set Distilled=1 and CFG > 1).')
@@ -1019,7 +1019,7 @@ adapted from the official code repo [FramePack](https://github.com/lllyasviel/Fr
1019
  10.0, # gs
1020
  0.0, # rs
1021
  6, # gpu_memory_preservation
1022
- True, # use_teacache
1023
  16 # mp4_crf
1024
  ],
1025
  [
@@ -1036,7 +1036,7 @@ adapted from the official code repo [FramePack](https://github.com/lllyasviel/Fr
1036
  10.0, # gs
1037
  0.0, # rs
1038
  6, # gpu_memory_preservation
1039
- True, # use_teacache
1040
  16 # mp4_crf
1041
  ],
1042
  [
@@ -1053,7 +1053,7 @@ adapted from the official code repo [FramePack](https://github.com/lllyasviel/Fr
1053
  10.0, # gs
1054
  0.0, # rs
1055
  6, # gpu_memory_preservation
1056
- True, # use_teacache
1057
  16 # mp4_crf
1058
  ],
1059
  [
@@ -1070,7 +1070,7 @@ adapted from the official code repo [FramePack](https://github.com/lllyasviel/Fr
1070
  10.0, # gs
1071
  0.0, # rs
1072
  6, # gpu_memory_preservation
1073
- True, # use_teacache
1074
  16 # mp4_crf
1075
  ],
1076
  ],
@@ -1099,7 +1099,7 @@ adapted from the official code repo [FramePack](https://github.com/lllyasviel/Fr
1099
  10.0, # gs
1100
  0.0, # rs
1101
  6, # gpu_memory_preservation
1102
- True, # use_teacache
1103
  False, # no_resize
1104
  16, # mp4_crf
1105
  5, # num_clean_frames
 
514
  global total_second_length_debug_value
515
 
516
  if total_second_length_debug_value is not None:
517
+ return min(total_second_length_debug_value * 60 * 10, 600)
518
  return total_second_length * 60
519
 
520
 
 
531
  gs=10.0,
532
  rs=0.0,
533
  gpu_memory_preservation=6,
534
+ use_teacache=False,
535
  mp4_crf=16
536
  ):
537
  global stream, input_image_debug_value, prompt_debug_value, total_second_length_debug_value
 
844
  global total_second_length_debug_value
845
  if total_second_length_debug_value is not None:
846
  return min(total_second_length_debug_value * 60 * 10, 600)
847
+ return total_second_length * 60 * 2
848
 
849
  # 20250506 pftq: Modified process to pass clean frame count, etc from video_encode
850
  @spaces.GPU(duration=get_duration_video)
 
943
 
944
  with gr.Accordion("Advanced settings", open=False):
945
  with gr.Row():
946
+ use_teacache = gr.Checkbox(label='Use TeaCache', value=False, info='Faster speed, but often makes hands and fingers slightly worse.')
947
  no_resize = gr.Checkbox(label='Force Original Video Resolution (no Resizing) (only for video extension)', value=False, info='Might run out of VRAM (720p requires > 24GB VRAM).')
948
 
949
  n_prompt = gr.Textbox(label="Negative Prompt", value="Missing arm, unrealistic position, blurred, blurry", info='Requires using normal CFG (undistilled) instead of Distilled (set Distilled=1 and CFG > 1).')
 
1019
  10.0, # gs
1020
  0.0, # rs
1021
  6, # gpu_memory_preservation
1022
+ False, # use_teacache
1023
  16 # mp4_crf
1024
  ],
1025
  [
 
1036
  10.0, # gs
1037
  0.0, # rs
1038
  6, # gpu_memory_preservation
1039
+ False, # use_teacache
1040
  16 # mp4_crf
1041
  ],
1042
  [
 
1053
  10.0, # gs
1054
  0.0, # rs
1055
  6, # gpu_memory_preservation
1056
+ False, # use_teacache
1057
  16 # mp4_crf
1058
  ],
1059
  [
 
1070
  10.0, # gs
1071
  0.0, # rs
1072
  6, # gpu_memory_preservation
1073
+ False, # use_teacache
1074
  16 # mp4_crf
1075
  ],
1076
  ],
 
1099
  10.0, # gs
1100
  0.0, # rs
1101
  6, # gpu_memory_preservation
1102
+ False, # use_teacache
1103
  False, # no_resize
1104
  16, # mp4_crf
1105
  5, # num_clean_frames