mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-23 19:31:38 +02:00
formatting
This commit is contained in:
parent
063d14d2ac
commit
53b23756a4
@ -98,8 +98,8 @@ def auto_pick_devices(currently_active_devices):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
mem_free, mem_total = torch.cuda.mem_get_info(device)
|
mem_free, mem_total = torch.cuda.mem_get_info(device)
|
||||||
mem_free /= float(10 ** 9)
|
mem_free /= float(10**9)
|
||||||
mem_total /= float(10 ** 9)
|
mem_total /= float(10**9)
|
||||||
device_name = torch.cuda.get_device_name(device)
|
device_name = torch.cuda.get_device_name(device)
|
||||||
log.debug(
|
log.debug(
|
||||||
f"{device} detected: {device_name} - Memory (free/total): {round(mem_free, 2)}Gb / {round(mem_total, 2)}Gb"
|
f"{device} detected: {device_name} - Memory (free/total): {round(mem_free, 2)}Gb / {round(mem_total, 2)}Gb"
|
||||||
@ -181,7 +181,7 @@ def get_max_vram_usage_level(device):
|
|||||||
else:
|
else:
|
||||||
return "high"
|
return "high"
|
||||||
|
|
||||||
mem_total /= float(10 ** 9)
|
mem_total /= float(10**9)
|
||||||
if mem_total < 4.5:
|
if mem_total < 4.5:
|
||||||
return "low"
|
return "low"
|
||||||
elif mem_total < 6.5:
|
elif mem_total < 6.5:
|
||||||
@ -223,7 +223,7 @@ def is_device_compatible(device):
|
|||||||
# Memory check
|
# Memory check
|
||||||
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 < 2.0:
|
||||||
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")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user