2 GB cards aren't exactly 2 GB

This commit is contained in:
cmdr2 2023-05-19 17:56:20 +05:30
parent 107323d8e7
commit 11e1436e2e

View File

@ -225,7 +225,7 @@ def is_device_compatible(device):
try: try:
_, mem_total = torch.cuda.mem_get_info(device) _, mem_total = torch.cuda.mem_get_info(device)
mem_total /= float(10**9) mem_total /= float(10**9)
if mem_total < 2.0: if mem_total < 1.9:
if is_device_compatible.history.get(device) == None: if is_device_compatible.history.get(device) == None:
log.warn(f"GPU {device} with less than 2 GB of VRAM is not compatible with Stable Diffusion") log.warn(f"GPU {device} with less than 2 GB of VRAM is not compatible with Stable Diffusion")
is_device_compatible.history[device] = 1 is_device_compatible.history[device] = 1