Skip to content

Commit

Permalink
Updated to disable the request for use_libuv issue in some environments
Browse files Browse the repository at this point in the history
  • Loading branch information
Isi-dev authored Oct 8, 2024
1 parent 75b6094 commit 014f7ed
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/inferences/inference_unianimate_entrance.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,18 @@ def worker(gpu, seed, steps, useFirstFrame, reference_image, ref_pose, pose_sequ
cfg.rank = cfg.pmi_rank * cfg.gpus_per_machine + gpu
setup_seed(cfg.seed + cfg.rank)

def is_libuv_supported():
build_info = torch.__config__.show()
return 'USE_LIBUV' in build_info

try:
if not is_libuv_supported():
print("libuv is not supported, disabling USE_LIBUV")
os.environ["USE_LIBUV"] = "0"
except Exception as e:
print(f"Unexpected error occured: {e}")
os.environ["USE_LIBUV"] = "0"

if not cfg.debug:
torch.cuda.set_device(gpu)
torch.backends.cudnn.benchmark = True
Expand Down

0 comments on commit 014f7ed

Please sign in to comment.