mmgp 3.5.8__tar.gz → 3.5.9__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.5.8/src/mmgp.egg-info → mmgp-3.5.9}/PKG-INFO +2 -2
- {mmgp-3.5.8 → mmgp-3.5.9}/README.md +1 -1
- {mmgp-3.5.8 → mmgp-3.5.9}/pyproject.toml +1 -1
- {mmgp-3.5.8 → mmgp-3.5.9}/src/mmgp/offload.py +6 -6
- {mmgp-3.5.8 → mmgp-3.5.9/src/mmgp.egg-info}/PKG-INFO +2 -2
- {mmgp-3.5.8 → mmgp-3.5.9}/LICENSE.md +0 -0
- {mmgp-3.5.8 → mmgp-3.5.9}/setup.cfg +0 -0
- {mmgp-3.5.8 → mmgp-3.5.9}/src/__init__.py +0 -0
- {mmgp-3.5.8 → mmgp-3.5.9}/src/mmgp/__init__.py +0 -0
- {mmgp-3.5.8 → mmgp-3.5.9}/src/mmgp/safetensors2.py +0 -0
- {mmgp-3.5.8 → mmgp-3.5.9}/src/mmgp.egg-info/SOURCES.txt +0 -0
- {mmgp-3.5.8 → mmgp-3.5.9}/src/mmgp.egg-info/dependency_links.txt +0 -0
- {mmgp-3.5.8 → mmgp-3.5.9}/src/mmgp.egg-info/requires.txt +0 -0
- {mmgp-3.5.8 → mmgp-3.5.9}/src/mmgp.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mmgp
|
|
3
|
-
Version: 3.5.
|
|
3
|
+
Version: 3.5.9
|
|
4
4
|
Summary: Memory Management for the GPU Poor
|
|
5
5
|
Author-email: deepbeepmeep <deepbeepmeep@yahoo.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -15,7 +15,7 @@ Dynamic: license-file
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
<p align="center">
|
|
18
|
-
<H2>Memory Management 3.5.
|
|
18
|
+
<H2>Memory Management 3.5.9 for the GPU Poor by DeepBeepMeep</H2>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
21
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ------------------ Memory Management 3.5.
|
|
1
|
+
# ------------------ Memory Management 3.5.9 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
|
|
@@ -671,7 +671,7 @@ def _welcome():
|
|
|
671
671
|
if welcome_displayed:
|
|
672
672
|
return
|
|
673
673
|
welcome_displayed = True
|
|
674
|
-
print(f"{BOLD}{HEADER}************ Memory Management for the GPU Poor (mmgp 3.5.
|
|
674
|
+
print(f"{BOLD}{HEADER}************ Memory Management for the GPU Poor (mmgp 3.5.9) by DeepBeepMeep ************{ENDC}{UNBOLD}")
|
|
675
675
|
|
|
676
676
|
def change_dtype(model, new_dtype, exclude_buffers = False):
|
|
677
677
|
for submodule_name, submodule in model.named_modules():
|
|
@@ -1179,11 +1179,10 @@ def load_loras_into_model(model, lora_path, lora_multi = None, activate_all_lora
|
|
|
1179
1179
|
loras_adapter_data[1] = lora_B.to(module.weight.dtype)
|
|
1180
1180
|
else:
|
|
1181
1181
|
loras_adapter_data[2] = diff_b.to(module.weight.dtype)
|
|
1182
|
-
if rank != None:
|
|
1183
|
-
alpha_key = k[:-len(
|
|
1182
|
+
if rank != None and "lora" in lora_key:
|
|
1183
|
+
alpha_key = k[:-len(lora_key)] + "alpha"
|
|
1184
1184
|
alpha = lora_alphas.get(alpha_key, None)
|
|
1185
|
-
|
|
1186
|
-
loras_adapter_data[3] = alpha
|
|
1185
|
+
if alpha is not None: loras_adapter_data[3] = alpha / rank
|
|
1187
1186
|
lora_A = lora_B = diff = diff_b = v = loras_module_data = loras_adapter_data = lora_alphas = None
|
|
1188
1187
|
|
|
1189
1188
|
if len(invalid_keys) > 0:
|
|
@@ -2179,6 +2178,7 @@ class offload:
|
|
|
2179
2178
|
scaling = self._get_lora_scaling(loras_scaling, model, active_adapter) * alpha
|
|
2180
2179
|
if scaling == 0:
|
|
2181
2180
|
continue
|
|
2181
|
+
|
|
2182
2182
|
if lora_A == None:
|
|
2183
2183
|
result.add_(diff_b, alpha=scaling)
|
|
2184
2184
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mmgp
|
|
3
|
-
Version: 3.5.
|
|
3
|
+
Version: 3.5.9
|
|
4
4
|
Summary: Memory Management for the GPU Poor
|
|
5
5
|
Author-email: deepbeepmeep <deepbeepmeep@yahoo.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -15,7 +15,7 @@ Dynamic: license-file
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
<p align="center">
|
|
18
|
-
<H2>Memory Management 3.5.
|
|
18
|
+
<H2>Memory Management 3.5.9 for the GPU Poor by DeepBeepMeep</H2>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
21
|
|
|
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
|