mmgp 3.5.9__py3-none-any.whl → 3.5.10__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.5.9 for the GPU Poor by DeepBeepMeep (mmgp)------------------
1
+ # ------------------ Memory Management 3.5.10 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.9) by DeepBeepMeep ************{ENDC}{UNBOLD}")
674
+ print(f"{BOLD}{HEADER}************ Memory Management for the GPU Poor (mmgp 3.5.10) 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():
@@ -1081,10 +1081,7 @@ def load_loras_into_model(model, lora_path, lora_multi = None, activate_all_lora
1081
1081
  invalid_keys = []
1082
1082
  unexpected_keys = []
1083
1083
  for k, v in state_dict.items():
1084
- lora_A = None
1085
- lora_B = None
1086
- diff_b = None
1087
- diff = None
1084
+ lora_A = lora_B = diff_b = diff = lora_key = None
1088
1085
  if k.endswith(".diff"):
1089
1086
  diff = v
1090
1087
  module_name = k[ : -5]
@@ -1179,7 +1176,7 @@ def load_loras_into_model(model, lora_path, lora_multi = None, activate_all_lora
1179
1176
  loras_adapter_data[1] = lora_B.to(module.weight.dtype)
1180
1177
  else:
1181
1178
  loras_adapter_data[2] = diff_b.to(module.weight.dtype)
1182
- if rank != None and "lora" in lora_key:
1179
+ if rank != None and lora_key is not None and "lora" in lora_key:
1183
1180
  alpha_key = k[:-len(lora_key)] + "alpha"
1184
1181
  alpha = lora_alphas.get(alpha_key, None)
1185
1182
  if alpha is not None: loras_adapter_data[3] = alpha / rank
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mmgp
3
- Version: 3.5.9
3
+ Version: 3.5.10
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.9 for the GPU Poor by DeepBeepMeep</H2>
18
+ <H2>Memory Management 3.5.10 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=trK86XTXP5sebBV2rn8TZ5q2kDcwyii1JsUTr3Fa_So,130319
4
+ mmgp/safetensors2.py,sha256=4nKV13qCMabnNEB1TA_ueFbfGYYmiQ9racR_C6SsGug,18693
5
+ mmgp-3.5.10.dist-info/licenses/LICENSE.md,sha256=DD-WIS0BkPoWJ_8hQO3J8hMP9K_1-dyrYv1YCbkxcDU,94
6
+ mmgp-3.5.10.dist-info/METADATA,sha256=xkcp_PywTbsEmhKdi5d6hgQl0dqcQn-mV7V1S9G1GWo,16311
7
+ mmgp-3.5.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ mmgp-3.5.10.dist-info/top_level.txt,sha256=waGaepj2qVfnS2yAOkaMu4r9mJaVjGbEi6AwOUogU_U,14
9
+ mmgp-3.5.10.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- __init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- mmgp/__init__.py,sha256=A9qBwyQMd1M7vshSTOBnFGP1MQvS2hXmTcTCMUcmyzE,509
3
- mmgp/offload.py,sha256=AViVBdUYDN42SnICeeTFa3K3JQ7a8rXB-eC2qPIY2yM,130347
4
- mmgp/safetensors2.py,sha256=4nKV13qCMabnNEB1TA_ueFbfGYYmiQ9racR_C6SsGug,18693
5
- mmgp-3.5.9.dist-info/licenses/LICENSE.md,sha256=DD-WIS0BkPoWJ_8hQO3J8hMP9K_1-dyrYv1YCbkxcDU,94
6
- mmgp-3.5.9.dist-info/METADATA,sha256=PXpq_dDRmAQED1dTW8NKUUB_FcYb54VRqlpjqOY771Y,16309
7
- mmgp-3.5.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- mmgp-3.5.9.dist-info/top_level.txt,sha256=waGaepj2qVfnS2yAOkaMu4r9mJaVjGbEi6AwOUogU_U,14
9
- mmgp-3.5.9.dist-info/RECORD,,
File without changes