mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-01 01:00:20 +08:00
ruff
This commit is contained in:
parent
aef8d003c9
commit
96e5d45642
@ -18,7 +18,7 @@ import comfy.memory_management
|
||||
|
||||
|
||||
def trange(*args, **kwargs):
|
||||
if comfy.memory_management.aimdo_allocator == None:
|
||||
if comfy.memory_management.aimdo_allocator is None:
|
||||
return trange_(*args, **kwargs)
|
||||
|
||||
pbar = trange_(*args, **kwargs, smoothing=1.0)
|
||||
@ -26,7 +26,6 @@ def trange(*args, **kwargs):
|
||||
pbar.set_postfix_str(" Model Initializing ... ")
|
||||
|
||||
_update = pbar.update
|
||||
initialized = False
|
||||
|
||||
def warmup_update(n=1):
|
||||
pbar._i += 1
|
||||
|
||||
@ -32,7 +32,6 @@ from comfy.cli_args import args, enables_dynamic_vram
|
||||
import json
|
||||
import time
|
||||
import mmap
|
||||
import ctypes
|
||||
|
||||
import packaging
|
||||
|
||||
@ -96,7 +95,8 @@ def load_safetensors(ckpt):
|
||||
|
||||
sd = {}
|
||||
for name, info in header.items():
|
||||
if name == "__metadata__": continue
|
||||
if name == "__metadata__":
|
||||
continue
|
||||
|
||||
start, end = info["data_offsets"]
|
||||
sd[name] = data_area[start:end].view(_TYPES[info["dtype"]]).view(info["shape"])
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import gc
|
||||
import copy
|
||||
import heapq
|
||||
import inspect
|
||||
|
||||
Loading…
Reference in New Issue
Block a user