Spaces:
Running
on
L40S
Running
on
L40S
Update app_df.py
Browse files
app_df.py
CHANGED
@@ -195,7 +195,7 @@ with gr.Blocks() as demo:
|
|
195 |
seed = gr.Number(label="Seed (optional)", precision=0)
|
196 |
prompt_enhancer = gr.Checkbox(label="Prompt Enhancer")
|
197 |
use_teacache = gr.Checkbox(label="Use TeaCache")
|
198 |
-
teacache_thresh = gr.Slider(minimum=0.0, maximum=1.0, value=0.
|
199 |
use_ret_steps = gr.Checkbox(label="Use Retention Steps")
|
200 |
|
201 |
submit_btn = gr.Button("Generate")
|
@@ -221,6 +221,9 @@ with gr.Blocks() as demo:
|
|
221 |
addnoise_condition = 0
|
222 |
ar_step = 0
|
223 |
causal_block_size = 1
|
|
|
|
|
|
|
224 |
|
225 |
if target_l == "4":
|
226 |
n_frames = 97
|
@@ -228,10 +231,16 @@ with gr.Blocks() as demo:
|
|
228 |
n_frames = 257
|
229 |
overlap_history = 17
|
230 |
addnoise_condition = 20
|
|
|
|
|
|
|
231 |
elif target_l == "15":
|
232 |
n_frames = 377
|
233 |
overlap_history = 17
|
234 |
addnoise_condition = 20
|
|
|
|
|
|
|
235 |
elif target_l == "30":
|
236 |
n_frames = 737
|
237 |
overlap_history = 17
|
@@ -245,13 +254,13 @@ with gr.Blocks() as demo:
|
|
245 |
ar_step = 5
|
246 |
causal_block_size = 5
|
247 |
|
248 |
-
return n_frames, overlap_history, addnoise_condition, ar_step, causal_block_size
|
249 |
|
250 |
|
251 |
target_length.change(
|
252 |
fn = set_num_frames,
|
253 |
inputs = [target_length],
|
254 |
-
outputs = [num_frames, overlap_history, addnoise_condition, ar_step, causal_block_size],
|
255 |
queue = False
|
256 |
)
|
257 |
|
|
|
195 |
seed = gr.Number(label="Seed (optional)", precision=0)
|
196 |
prompt_enhancer = gr.Checkbox(label="Prompt Enhancer")
|
197 |
use_teacache = gr.Checkbox(label="Use TeaCache")
|
198 |
+
teacache_thresh = gr.Slider(minimum=0.0, maximum=1.0, value=0.3, step=0.01, label="TeaCache Threshold")
|
199 |
use_ret_steps = gr.Checkbox(label="Use Retention Steps")
|
200 |
|
201 |
submit_btn = gr.Button("Generate")
|
|
|
221 |
addnoise_condition = 0
|
222 |
ar_step = 0
|
223 |
causal_block_size = 1
|
224 |
+
use_teacache = False
|
225 |
+
teacache_tresh = 0.3
|
226 |
+
use_ret_steps = False
|
227 |
|
228 |
if target_l == "4":
|
229 |
n_frames = 97
|
|
|
231 |
n_frames = 257
|
232 |
overlap_history = 17
|
233 |
addnoise_condition = 20
|
234 |
+
use_teacache = True
|
235 |
+
teacache_tresh = 0.3
|
236 |
+
use_ret_steps = True
|
237 |
elif target_l == "15":
|
238 |
n_frames = 377
|
239 |
overlap_history = 17
|
240 |
addnoise_condition = 20
|
241 |
+
use_teacache = True
|
242 |
+
teacache_tresh = 0.3
|
243 |
+
use_ret_steps = True
|
244 |
elif target_l == "30":
|
245 |
n_frames = 737
|
246 |
overlap_history = 17
|
|
|
254 |
ar_step = 5
|
255 |
causal_block_size = 5
|
256 |
|
257 |
+
return n_frames, overlap_history, addnoise_condition, ar_step, causal_block_size, use_teacache, teacache_tresh, use_ret_steps
|
258 |
|
259 |
|
260 |
target_length.change(
|
261 |
fn = set_num_frames,
|
262 |
inputs = [target_length],
|
263 |
+
outputs = [num_frames, overlap_history, addnoise_condition, ar_step, causal_block_size, use_teacache, teacache_tresh, use_ret_steps],
|
264 |
queue = False
|
265 |
)
|
266 |
|