mmgp 3.2.8__tar.gz → 3.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mmgp might be problematic. Click here for more details.
- {mmgp-3.2.8/src/mmgp.egg-info → mmgp-3.3.0}/PKG-INFO +4 -3
- {mmgp-3.2.8 → mmgp-3.3.0}/README.md +1 -1
- {mmgp-3.2.8 → mmgp-3.3.0}/pyproject.toml +1 -1
- {mmgp-3.2.8 → mmgp-3.3.0}/src/mmgp/offload.py +10 -7
- {mmgp-3.2.8 → mmgp-3.3.0/src/mmgp.egg-info}/PKG-INFO +4 -3
- {mmgp-3.2.8 → mmgp-3.3.0}/LICENSE.md +0 -0
- {mmgp-3.2.8 → mmgp-3.3.0}/setup.cfg +0 -0
- {mmgp-3.2.8 → mmgp-3.3.0}/src/__init__.py +0 -0
- {mmgp-3.2.8 → mmgp-3.3.0}/src/mmgp/__init__.py +0 -0
- {mmgp-3.2.8 → mmgp-3.3.0}/src/mmgp/safetensors2.py +0 -0
- {mmgp-3.2.8 → mmgp-3.3.0}/src/mmgp.egg-info/SOURCES.txt +0 -0
- {mmgp-3.2.8 → mmgp-3.3.0}/src/mmgp.egg-info/dependency_links.txt +0 -0
- {mmgp-3.2.8 → mmgp-3.3.0}/src/mmgp.egg-info/requires.txt +0 -0
- {mmgp-3.2.8 → mmgp-3.3.0}/src/mmgp.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: mmgp
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Summary: Memory Management for the GPU Poor
|
|
5
5
|
Author-email: deepbeepmeep <deepbeepmeep@yahoo.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -13,10 +13,11 @@ Requires-Dist: optimum-quanto
|
|
|
13
13
|
Requires-Dist: accelerate
|
|
14
14
|
Requires-Dist: safetensors
|
|
15
15
|
Requires-Dist: psutil
|
|
16
|
+
Dynamic: license-file
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
<p align="center">
|
|
19
|
-
<H2>Memory Management 3.
|
|
20
|
+
<H2>Memory Management 3.3.0 for the GPU Poor by DeepBeepMeep</H2>
|
|
20
21
|
</p>
|
|
21
22
|
|
|
22
23
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ------------------ Memory Management 3.
|
|
1
|
+
# ------------------ Memory Management 3.3.0 for the GPU Poor by DeepBeepMeep (mmgp)------------------
|
|
2
2
|
#
|
|
3
3
|
# This module contains multiples optimisations so that models such as Flux (and derived), Mochi, CogView, HunyuanVideo, ... can run smoothly on a 24 GB GPU limited card.
|
|
4
4
|
# This a replacement for the accelerate library that should in theory manage offloading, but doesn't work properly with models that are loaded / unloaded several
|
|
@@ -882,10 +882,11 @@ def load_loras_into_model(model, lora_path, lora_multi = None, activate_all_lora
|
|
|
882
882
|
return source + CrLf + text
|
|
883
883
|
|
|
884
884
|
def trunc(text, sz):
|
|
885
|
+
text = str(text)
|
|
885
886
|
if len(text) < sz:
|
|
886
|
-
return
|
|
887
|
+
return text
|
|
887
888
|
else:
|
|
888
|
-
return
|
|
889
|
+
return text[0:sz] + '...'
|
|
889
890
|
|
|
890
891
|
if not isinstance(lora_path, list):
|
|
891
892
|
lora_path = [lora_path]
|
|
@@ -1408,7 +1409,9 @@ def extract_models(obj = None, prefix = None):
|
|
|
1408
1409
|
elif prefix[ -1:] != "/":
|
|
1409
1410
|
prefix + "/"
|
|
1410
1411
|
|
|
1411
|
-
for name in dir(obj):
|
|
1412
|
+
for name in dir(obj):
|
|
1413
|
+
if name in ["_execution_device"]:
|
|
1414
|
+
continue
|
|
1412
1415
|
element = getattr(obj,name)
|
|
1413
1416
|
if name in ("pipeline", "pipe"):
|
|
1414
1417
|
pipeline = element
|
|
@@ -1550,7 +1553,7 @@ class offload:
|
|
|
1550
1553
|
lora_A, lora_B, alpha = lora_data
|
|
1551
1554
|
key = adapter + '_GPU'
|
|
1552
1555
|
if to_GPU:
|
|
1553
|
-
lora_module[key] = [lora_A.cuda(), lora_B.cuda(), alpha]
|
|
1556
|
+
lora_module[key] = [lora_A.cuda(non_blocking=True), lora_B.cuda(non_blocking=True), alpha]
|
|
1554
1557
|
elif key in lora_module:
|
|
1555
1558
|
del lora_module[key]
|
|
1556
1559
|
|
|
@@ -1594,8 +1597,8 @@ class offload:
|
|
|
1594
1597
|
lora_data = loras_model_data.get(parent_module, None)
|
|
1595
1598
|
if lora_data != None:
|
|
1596
1599
|
loras_modules[parent_module]= lora_data
|
|
1597
|
-
|
|
1598
|
-
|
|
1600
|
+
if len(loras_modules) > 0:
|
|
1601
|
+
self._move_loras(loras_active_adapters, loras_modules, True)
|
|
1599
1602
|
|
|
1600
1603
|
loaded_block = self.loaded_blocks[model_id]
|
|
1601
1604
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: mmgp
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Summary: Memory Management for the GPU Poor
|
|
5
5
|
Author-email: deepbeepmeep <deepbeepmeep@yahoo.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -13,10 +13,11 @@ Requires-Dist: optimum-quanto
|
|
|
13
13
|
Requires-Dist: accelerate
|
|
14
14
|
Requires-Dist: safetensors
|
|
15
15
|
Requires-Dist: psutil
|
|
16
|
+
Dynamic: license-file
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
<p align="center">
|
|
19
|
-
<H2>Memory Management 3.
|
|
20
|
+
<H2>Memory Management 3.3.0 for the GPU Poor by DeepBeepMeep</H2>
|
|
20
21
|
</p>
|
|
21
22
|
|
|
22
23
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|