fffiloni commited on
Commit
c9d89c3
·
verified ·
1 Parent(s): 4d4c22b

Update app_df.py

Browse files
Files changed (1) hide show
  1. app_df.py +15 -9
app_df.py CHANGED
@@ -12,7 +12,7 @@ from skyreels_v2_infer.modules import download_model
12
  from skyreels_v2_infer.pipelines import PromptEnhancer, resizecrop
13
 
14
  is_shared_ui = True if "fffiloni/SkyReels-V2" in os.environ['SPACE_ID'] else False
15
- is_shared_ui = False
16
 
17
  def generate_diffusion_forced_video(
18
  prompt,
@@ -195,9 +195,9 @@ with gr.Blocks() as demo:
195
  fps = gr.Slider(minimum=1, maximum=60, value=24, step=1, label="FPS")
196
  seed = gr.Number(label="Seed (optional)", precision=0)
197
  prompt_enhancer = gr.Checkbox(label="Prompt Enhancer")
198
- use_teacache = gr.Checkbox(label="Use TeaCache")
199
- teacache_thresh = gr.Slider(minimum=0.0, maximum=1.0, value=0.3, step=0.01, label="TeaCache Threshold")
200
- use_ret_steps = gr.Checkbox(label="Use Retention Steps")
201
 
202
  submit_btn = gr.Button("Generate")
203
 
@@ -221,13 +221,17 @@ with gr.Blocks() as demo:
221
  overlap_history = 0
222
  addnoise_condition = 0
223
  ar_step = 0
 
224
  causal_block_size = 1
225
- use_teacache = False
226
- teacache_thresh = 0.3
227
- use_ret_steps = False
228
 
229
  if target_l == "4":
230
  n_frames = 97
 
 
 
231
  elif target_l == "10":
232
  n_frames = 257
233
  overlap_history = 17
@@ -249,6 +253,7 @@ with gr.Blocks() as demo:
249
  use_teacache = True
250
  teacache_thresh = 0.3
251
  use_ret_steps = True
 
252
  ar_step = 5
253
  causal_block_size = 5
254
  elif target_l == "60":
@@ -258,16 +263,17 @@ with gr.Blocks() as demo:
258
  use_teacache = True
259
  teacache_thresh = 0.3
260
  use_ret_steps = True
 
261
  ar_step = 5
262
  causal_block_size = 5
263
 
264
- return n_frames, overlap_history, addnoise_condition, ar_step, causal_block_size, use_teacache, teacache_thresh, use_ret_steps
265
 
266
 
267
  target_length.change(
268
  fn = set_num_frames,
269
  inputs = [target_length],
270
- outputs = [num_frames, overlap_history, addnoise_condition, ar_step, causal_block_size, use_teacache, teacache_thresh, use_ret_steps],
271
  queue = False
272
  )
273
 
 
12
  from skyreels_v2_infer.pipelines import PromptEnhancer, resizecrop
13
 
14
  is_shared_ui = True if "fffiloni/SkyReels-V2" in os.environ['SPACE_ID'] else False
15
+ #is_shared_ui = False
16
 
17
  def generate_diffusion_forced_video(
18
  prompt,
 
195
  fps = gr.Slider(minimum=1, maximum=60, value=24, step=1, label="FPS")
196
  seed = gr.Number(label="Seed (optional)", precision=0)
197
  prompt_enhancer = gr.Checkbox(label="Prompt Enhancer")
198
+ use_teacache = gr.Checkbox(label="Use TeaCache", value=True)
199
+ teacache_thresh = gr.Slider(minimum=0.0, maximum=1.0, value=0.2, step=0.01, label="TeaCache Threshold")
200
+ use_ret_steps = gr.Checkbox(label="Use Retention Steps", value=True)
201
 
202
  submit_btn = gr.Button("Generate")
203
 
 
221
  overlap_history = 0
222
  addnoise_condition = 0
223
  ar_step = 0
224
+ causal_attention = False
225
  causal_block_size = 1
226
+ use_teacache = True
227
+ teacache_thresh = 0.2
228
+ use_ret_steps = True
229
 
230
  if target_l == "4":
231
  n_frames = 97
232
+ use_teacache = True
233
+ teacache_thresh = 0.2
234
+ use_ret_steps = True
235
  elif target_l == "10":
236
  n_frames = 257
237
  overlap_history = 17
 
253
  use_teacache = True
254
  teacache_thresh = 0.3
255
  use_ret_steps = True
256
+ causal_attention = True
257
  ar_step = 5
258
  causal_block_size = 5
259
  elif target_l == "60":
 
263
  use_teacache = True
264
  teacache_thresh = 0.3
265
  use_ret_steps = True
266
+ causal_attention = True
267
  ar_step = 5
268
  causal_block_size = 5
269
 
270
+ return n_frames, overlap_history, addnoise_condition, ar_step, causal_attention, causal_block_size, use_teacache, teacache_thresh, use_ret_steps
271
 
272
 
273
  target_length.change(
274
  fn = set_num_frames,
275
  inputs = [target_length],
276
+ outputs = [num_frames, overlap_history, addnoise_condition, ar_step, causal_attention, causal_block_size, use_teacache, teacache_thresh, use_ret_steps],
277
  queue = False
278
  )
279