Spaces:
Sleeping
Sleeping
Update
Browse files
app.py
CHANGED
@@ -20,6 +20,8 @@ MAX_NUM_FRAMES = int(os.getenv('MAX_NUM_FRAMES', '200'))
|
|
20 |
DEFAULT_NUM_FRAMES = min(MAX_NUM_FRAMES,
|
21 |
int(os.getenv('DEFAULT_NUM_FRAMES', '24')))
|
22 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
|
|
23 |
|
24 |
if torch.cuda.is_available():
|
25 |
pipe = DiffusionPipeline.from_pretrained('cerspense/zeroscope_v2_576w',
|
@@ -110,7 +112,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
110 |
inputs=inputs,
|
111 |
outputs=result,
|
112 |
fn=generate,
|
113 |
-
cache_examples=
|
114 |
|
115 |
prompt.submit(
|
116 |
fn=randomize_seed_fn,
|
|
|
20 |
DEFAULT_NUM_FRAMES = min(MAX_NUM_FRAMES,
|
21 |
int(os.getenv('DEFAULT_NUM_FRAMES', '24')))
|
22 |
MAX_SEED = np.iinfo(np.int32).max
|
23 |
+
CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv(
|
24 |
+
'CACHE_EXAMPLES') == '1'
|
25 |
|
26 |
if torch.cuda.is_available():
|
27 |
pipe = DiffusionPipeline.from_pretrained('cerspense/zeroscope_v2_576w',
|
|
|
112 |
inputs=inputs,
|
113 |
outputs=result,
|
114 |
fn=generate,
|
115 |
+
cache_examples=CACHE_EXAMPLES)
|
116 |
|
117 |
prompt.submit(
|
118 |
fn=randomize_seed_fn,
|