Spaces:
Running
on
Zero
Running
on
Zero
Update
Browse files
app.py
CHANGED
@@ -23,10 +23,13 @@ DEFAULT_NUM_FRAMES = min(MAX_NUM_FRAMES,
|
|
23 |
int(os.getenv('DEFAULT_NUM_FRAMES', '24')))
|
24 |
MAX_SEED = np.iinfo(np.int32).max
|
25 |
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
28 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
29 |
-
pipe.enable_model_cpu_offload()
|
30 |
pipe.enable_vae_slicing()
|
31 |
|
32 |
|
|
|
23 |
int(os.getenv('DEFAULT_NUM_FRAMES', '24')))
|
24 |
MAX_SEED = np.iinfo(np.int32).max
|
25 |
|
26 |
+
if torch.cuda.is_available():
|
27 |
+
pipe = DiffusionPipeline.from_pretrained('cerspense/zeroscope_v2_576w',
|
28 |
+
torch_dtype=torch.float16)
|
29 |
+
pipe.enable_model_cpu_offload()
|
30 |
+
else:
|
31 |
+
pipe = DiffusionPipeline.from_pretrained('cerspense/zeroscope_v2_576w')
|
32 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
|
|
33 |
pipe.enable_vae_slicing()
|
34 |
|
35 |
|