mmgp 3.6.4__py3-none-any.whl → 3.6.5__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 CHANGED
@@ -1,4 +1,4 @@
1
- # ------------------ Memory Management 3.6.4 for the GPU Poor by DeepBeepMeep (mmgp)------------------
1
+ # ------------------ Memory Management 3.6.5 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
@@ -689,7 +689,7 @@ def _welcome():
689
689
  if welcome_displayed:
690
690
  return
691
691
  welcome_displayed = True
692
- print(f"{BOLD}{HEADER}************ Memory Management for the GPU Poor (mmgp 3.6.4) by DeepBeepMeep ************{ENDC}{UNBOLD}")
692
+ print(f"{BOLD}{HEADER}************ Memory Management for the GPU Poor (mmgp 3.6.5) by DeepBeepMeep ************{ENDC}{UNBOLD}")
693
693
 
694
694
  def change_dtype(model, new_dtype, exclude_buffers = False):
695
695
  for submodule_name, submodule in model.named_modules():
@@ -1294,6 +1294,7 @@ def sync_models_loras(model, model2):
1294
1294
 
1295
1295
  def unload_loras_from_model(model):
1296
1296
  if model is None: return
1297
+ if not hasattr(model, "_loras_model_data"): return
1297
1298
  for _, v in model._loras_model_data.items():
1298
1299
  v.clear()
1299
1300
  for _, v in model._loras_model_shortcuts.items():
@@ -1486,6 +1487,7 @@ def load_model_data(model, file_path, do_quantize = False, quantizationType = qi
1486
1487
  for no, file in enumerate(file_path):
1487
1488
  quantization_map = None
1488
1489
  tied_weights_map = None
1490
+ metadata = None
1489
1491
  if not (".safetensors" in file or ".sft" in file):
1490
1492
  if pinToMemory:
1491
1493
  raise Exception("Pinning to memory while loading only supported for safe tensors files")
@@ -1497,7 +1499,6 @@ def load_model_data(model, file_path, do_quantize = False, quantizationType = qi
1497
1499
  basename = os.path.basename(file)
1498
1500
 
1499
1501
  if "-of-" in basename:
1500
- metadata = None
1501
1502
  file_parts= basename.split("-")
1502
1503
  parts_max = int(file_parts[-1][:5])
1503
1504
  state_dict = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mmgp
3
- Version: 3.6.4
3
+ Version: 3.6.5
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.6.4 for the GPU Poor by DeepBeepMeep</H2>
18
+ <H2>Memory Management 3.6.5 for the GPU Poor by DeepBeepMeep</H2>
19
19
  </p>
20
20
 
21
21
 
@@ -0,0 +1,10 @@
1
+ __init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ mmgp/__init__.py,sha256=A9qBwyQMd1M7vshSTOBnFGP1MQvS2hXmTcTCMUcmyzE,509
3
+ mmgp/fp8_quanto_bridge.py,sha256=VtUaD6wzo7Yn9vGY0LMtbhwt6KMWRpSWLc65bU_sfZU,21155
4
+ mmgp/offload.py,sha256=GwM0o0rWUwY3tb_HDl_pO6S0XvMpVZsre3DzwFCLQh4,138988
5
+ mmgp/safetensors2.py,sha256=zYNMprt1KoxgVALbcz6DawxsQDNNRImvgO9cYRChUiY,19028
6
+ mmgp-3.6.5.dist-info/licenses/LICENSE.md,sha256=HjzvY2grdtdduZclbZ46B2M-XpT4MDCxFub5ZwTWq2g,93
7
+ mmgp-3.6.5.dist-info/METADATA,sha256=9wXPfJYiHExhfM-kSeA4mLoNh0laDRXJ3ZrBFSpQlUg,16309
8
+ mmgp-3.6.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ mmgp-3.6.5.dist-info/top_level.txt,sha256=waGaepj2qVfnS2yAOkaMu4r9mJaVjGbEi6AwOUogU_U,14
10
+ mmgp-3.6.5.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- __init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- mmgp/__init__.py,sha256=A9qBwyQMd1M7vshSTOBnFGP1MQvS2hXmTcTCMUcmyzE,509
3
- mmgp/fp8_quanto_bridge.py,sha256=VtUaD6wzo7Yn9vGY0LMtbhwt6KMWRpSWLc65bU_sfZU,21155
4
- mmgp/offload.py,sha256=hRSLKfUY_7bMRS2BUv79cB4BGjub5uLhVpZuoc9AWTI,138940
5
- mmgp/safetensors2.py,sha256=zYNMprt1KoxgVALbcz6DawxsQDNNRImvgO9cYRChUiY,19028
6
- mmgp-3.6.4.dist-info/licenses/LICENSE.md,sha256=HjzvY2grdtdduZclbZ46B2M-XpT4MDCxFub5ZwTWq2g,93
7
- mmgp-3.6.4.dist-info/METADATA,sha256=e2NavzQQfgehOKy1KRyy_I2sL3tIpePcBHMzlvFDOGE,16309
8
- mmgp-3.6.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- mmgp-3.6.4.dist-info/top_level.txt,sha256=waGaepj2qVfnS2yAOkaMu4r9mJaVjGbEi6AwOUogU_U,14
10
- mmgp-3.6.4.dist-info/RECORD,,
File without changes