fix: 🔥 much faster (using GPU) on windows
Linux should already work fine
This commit is contained in:
@@ -12,6 +12,8 @@ import numpy as np
|
||||
import subprocess
|
||||
import comfy
|
||||
|
||||
import tensorflow as tf
|
||||
|
||||
|
||||
class LoadFilmModel:
|
||||
"""Loads a FILM model"""
|
||||
@@ -79,6 +81,14 @@ class FilmInterpolation:
|
||||
film_model: interpolator.Interpolator,
|
||||
):
|
||||
n = images.size(0)
|
||||
# check if tensorflow GPU is available
|
||||
available_gpus = tf.config.list_physical_devices("GPU")
|
||||
if not len(available_gpus):
|
||||
log.warning(
|
||||
"Tensorflow GPU not available, falling back to CPU this will be very slow"
|
||||
)
|
||||
else:
|
||||
log.debug(f"Tensorflow GPU available, using {available_gpus}")
|
||||
|
||||
num_frames = (n - 1) * (2 ** (interpolate) - 1)
|
||||
log.debug(f"Will interpolate into {num_frames} frames")
|
||||
|
||||
+6
-1
@@ -8,4 +8,9 @@ mmcv==2.0.0
|
||||
mmdet==3.0.0
|
||||
rembg==2.0.37
|
||||
facexlib==0.3.0
|
||||
basicsr==1.4.2
|
||||
basicsr==1.4.2
|
||||
# on windows non WSL 2.10 is the last version with GPU support
|
||||
tensorflow==2.10.0; platform_system == "Windows"
|
||||
tensorflow; platform_system != "Windows"
|
||||
# the old tf version on windows comes with a breaking protobuf version
|
||||
protobuf==3.20.2; platform_system == "Windows"
|
||||
Reference in New Issue
Block a user