"docs/source/en/index.md" did not exist on "01a80807de9727fe9ccb1b35d1ea447647738111"
Commit f7388a80 authored by dengjb's avatar dengjb
Browse files

Update utils.py

parent df2d8442
...@@ -12,11 +12,8 @@ _VAE_SIZE_THRESHOLD_ = 300000000 # vae should not be smaller than this ...@@ -12,11 +12,8 @@ _VAE_SIZE_THRESHOLD_ = 300000000 # vae should not be smaller than this
_MODEL_SIZE_THRESHOLD_ = 3000000000 # model should not be smaller than this _MODEL_SIZE_THRESHOLD_ = 3000000000 # model should not be smaller than this
def compute_gpu_memory(): def compute_gpu_memory():
import pynvml
pynvml.nvmlInit() return round(64, 2)
handle = pynvml.nvmlDeviceGetHandleByIndex(0)
meminfo = pynvml.nvmlDeviceGetMemoryInfo(handle)
return round(meminfo.total / 1024 / 1024 / 1024, 2)
def empty_cache(): def empty_cache():
"""Empty CUDA cache. Essential in stable diffusion pipeline.""" """Empty CUDA cache. Essential in stable diffusion pipeline."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment