File size: 782 Bytes
e0cf81a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import launch, torch


if not launch.is_installed("cupy"):
    cuda_version = int(round(float(torch.version.cuda)*10))
    if cuda_version <= 118:
        launch.run_pip("install cupy-cuda11x", "requirements for FastBlend (cupy)")
    else:
        launch.run_pip("install cupy-cuda12x", "requirements for FastBlend (cupy)")

if not launch.is_installed("imageio"):
    launch.run_pip("install imageio", "requirements for FastBlend (imageio)")

if not launch.is_installed("imageio_ffmpeg"):
    launch.run_pip("install imageio[ffmpeg]", "requirements for FastBlend (imageio[ffmpeg])")

if not launch.is_installed("cv2") and not launch.is_installed("opencv-python-headless"):
    launch.run_pip("install opencv-python-headless", "requirements for FastBlend (opencv-python-headless)")