mmgp 3.5.0__py3-none-any.whl → 3.5.1__py3-none-any.whl
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/offload.py +4 -3
- {mmgp-3.5.0.dist-info → mmgp-3.5.1.dist-info}/METADATA +2 -2
- mmgp-3.5.1.dist-info/RECORD +9 -0
- mmgp-3.5.0.dist-info/RECORD +0 -9
- {mmgp-3.5.0.dist-info → mmgp-3.5.1.dist-info}/WHEEL +0 -0
- {mmgp-3.5.0.dist-info → mmgp-3.5.1.dist-info}/licenses/LICENSE.md +0 -0
- {mmgp-3.5.0.dist-info → mmgp-3.5.1.dist-info}/top_level.txt +0 -0
mmgp/offload.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ------------------ Memory Management 3.5.
|
|
1
|
+
# ------------------ Memory Management 3.5.1 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
|
|
@@ -658,7 +658,7 @@ def _welcome():
|
|
|
658
658
|
if welcome_displayed:
|
|
659
659
|
return
|
|
660
660
|
welcome_displayed = True
|
|
661
|
-
print(f"{BOLD}{HEADER}************ Memory Management for the GPU Poor (mmgp 3.5.
|
|
661
|
+
print(f"{BOLD}{HEADER}************ Memory Management for the GPU Poor (mmgp 3.5.1) by DeepBeepMeep ************{ENDC}{UNBOLD}")
|
|
662
662
|
|
|
663
663
|
def change_dtype(model, new_dtype, exclude_buffers = False):
|
|
664
664
|
for submodule_name, submodule in model.named_modules():
|
|
@@ -2014,6 +2014,8 @@ class offload:
|
|
|
2014
2014
|
weight = weight.clone()
|
|
2015
2015
|
for active_adapter in active_adapters:
|
|
2016
2016
|
data = loras_data.get(active_adapter + '_GPU', None)
|
|
2017
|
+
if data == None:
|
|
2018
|
+
continue
|
|
2017
2019
|
lora_A_weight, lora_B_weight, diff_b, alpha = data
|
|
2018
2020
|
scaling = self._get_lora_scaling(loras_scaling, model, active_adapter) * alpha
|
|
2019
2021
|
if lora_A_weight != None:
|
|
@@ -2028,7 +2030,6 @@ class offload:
|
|
|
2028
2030
|
original_bias = False
|
|
2029
2031
|
bias.add_(diff_b, alpha=scaling)
|
|
2030
2032
|
# base_weight += scaling * lora_B_weight @ lora_A_weight
|
|
2031
|
-
break
|
|
2032
2033
|
if training:
|
|
2033
2034
|
pass
|
|
2034
2035
|
# result = torch.nn.functional.linear(dropout(x), base_weight, bias=submodule.bias)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mmgp
|
|
3
|
-
Version: 3.5.
|
|
3
|
+
Version: 3.5.1
|
|
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.1 for the GPU Poor by DeepBeepMeep</H2>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
21
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
mmgp/__init__.py,sha256=A9qBwyQMd1M7vshSTOBnFGP1MQvS2hXmTcTCMUcmyzE,509
|
|
3
|
+
mmgp/offload.py,sha256=3TpjzT7DJ2yGHIm-u2O-U2wAR_V2ZH1NqmC1bMYhfso,120962
|
|
4
|
+
mmgp/safetensors2.py,sha256=4nKV13qCMabnNEB1TA_ueFbfGYYmiQ9racR_C6SsGug,18693
|
|
5
|
+
mmgp-3.5.1.dist-info/licenses/LICENSE.md,sha256=HjzvY2grdtdduZclbZ46B2M-XpT4MDCxFub5ZwTWq2g,93
|
|
6
|
+
mmgp-3.5.1.dist-info/METADATA,sha256=IOEJfRTedEF4lv9A9DEHJF9-kr3UK1yhlo6Nsdhca10,16309
|
|
7
|
+
mmgp-3.5.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
mmgp-3.5.1.dist-info/top_level.txt,sha256=waGaepj2qVfnS2yAOkaMu4r9mJaVjGbEi6AwOUogU_U,14
|
|
9
|
+
mmgp-3.5.1.dist-info/RECORD,,
|
mmgp-3.5.0.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
mmgp/__init__.py,sha256=A9qBwyQMd1M7vshSTOBnFGP1MQvS2hXmTcTCMUcmyzE,509
|
|
3
|
-
mmgp/offload.py,sha256=wKWX4eq8FnD2JZuTNHQu3EsiqqsHQ89T9XDNS-dpUqk,120897
|
|
4
|
-
mmgp/safetensors2.py,sha256=4nKV13qCMabnNEB1TA_ueFbfGYYmiQ9racR_C6SsGug,18693
|
|
5
|
-
mmgp-3.5.0.dist-info/licenses/LICENSE.md,sha256=HjzvY2grdtdduZclbZ46B2M-XpT4MDCxFub5ZwTWq2g,93
|
|
6
|
-
mmgp-3.5.0.dist-info/METADATA,sha256=TunzrXOHz79NN8TRdE57wEE3NThzo-Uy1DXY3pSzcpQ,16309
|
|
7
|
-
mmgp-3.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
mmgp-3.5.0.dist-info/top_level.txt,sha256=waGaepj2qVfnS2yAOkaMu4r9mJaVjGbEi6AwOUogU_U,14
|
|
9
|
-
mmgp-3.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|