From 99306c6e4b8e351f496222e02400d1e7b2bf34c6 Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Wed, 13 Mar 2019 11:59:42 -0400 Subject: [PATCH] =?UTF-8?q?fixed=20a=20NVIDIA=20=EC=A0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/video2x.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/video2x.py b/bin/video2x.py index b0f46f1..c42ab5d 100755 --- a/bin/video2x.py +++ b/bin/video2x.py @@ -108,9 +108,12 @@ def check_memory(): Avalon.warning('Nvidia-smi not available, skipping available memory check') Avalon.warning('If you experience error \"cudaSuccess out of memory\", try reducing number of threads you\'re using') else: - # "0" is GPU ID. Both waifu2x drivers use the first GPU available, therefore only 0 makes sense - gpu_memory_available = (GPUtil.getGPUs()[0].memoryTotal - GPUtil.getGPUs()[0].memoryUsed) / 1024 - memory_status.append(('GPU', gpu_memory_available)) + try: + # "0" is GPU ID. Both waifu2x drivers use the first GPU available, therefore only 0 makes sense + gpu_memory_available = (GPUtil.getGPUs()[0].memoryTotal - GPUtil.getGPUs()[0].memoryUsed) / 1024 + memory_status.append(('GPU', gpu_memory_available)) + except ValueError: + pass # Go though each checkable memory type and check availability for memory_type, memory_available in memory_status: