Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Auto-sync from GitHub Actions
Browse files- core/engine.py +1 -3
core/engine.py
CHANGED
|
@@ -711,9 +711,7 @@ class DanbooruTagger:
|
|
| 711 |
print(f' [1/3] 加载 embedding ({emb_size_mb:.0f} MB, {n_layers} 层) ...')
|
| 712 |
with safe_open(emb_path, framework="pt", device=self.device) as f:
|
| 713 |
for i, (name, attr, _) in enumerate(_LAYER_SPEC, 1):
|
| 714 |
-
|
| 715 |
-
shape_str = '×'.join(str(d) for d in shape)
|
| 716 |
-
print(f' [{i}/{n_layers}] {attr:12s} ({shape_str}) ...', end=' ', flush=True)
|
| 717 |
_t = time.time()
|
| 718 |
tensor = f.get_tensor(attr)
|
| 719 |
setattr(self, attr, tensor.float())
|
|
|
|
| 711 |
print(f' [1/3] 加载 embedding ({emb_size_mb:.0f} MB, {n_layers} 层) ...')
|
| 712 |
with safe_open(emb_path, framework="pt", device=self.device) as f:
|
| 713 |
for i, (name, attr, _) in enumerate(_LAYER_SPEC, 1):
|
| 714 |
+
print(f' [{i}/{n_layers}] {attr:12s} ...', end=' ', flush=True)
|
|
|
|
|
|
|
| 715 |
_t = time.time()
|
| 716 |
tensor = f.get_tensor(attr)
|
| 717 |
setattr(self, attr, tensor.float())
|