mmgp 3.5.5__py3-none-any.whl → 3.5.6__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.5 for the GPU Poor by DeepBeepMeep (mmgp)------------------
1
+ # ------------------ Memory Management 3.5.6 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
@@ -668,7 +668,7 @@ def _welcome():
668
668
  if welcome_displayed:
669
669
  return
670
670
  welcome_displayed = True
671
- print(f"{BOLD}{HEADER}************ Memory Management for the GPU Poor (mmgp 3.5.5) by DeepBeepMeep ************{ENDC}{UNBOLD}")
671
+ print(f"{BOLD}{HEADER}************ Memory Management for the GPU Poor (mmgp 3.5.6) by DeepBeepMeep ************{ENDC}{UNBOLD}")
672
672
 
673
673
  def change_dtype(model, new_dtype, exclude_buffers = False):
674
674
  for submodule_name, submodule in model.named_modules():
@@ -2095,24 +2095,23 @@ class offload:
2095
2095
  if scaling == 0:
2096
2096
  continue
2097
2097
  if first_weight:
2098
- original_weight= weight.clone() if weight != None else None
2098
+ original_weight= weight.clone() if weight is not None else None
2099
2099
  first_weight = False
2100
2100
  if first_bias:
2101
- original_bias= bias.clone() if bias != None else None
2101
+ original_bias= bias.clone() if bias is not None else None
2102
2102
  first_bias = False
2103
2103
 
2104
- if diff_w != None:
2104
+ if diff_w is not None:
2105
2105
  weight.add_(diff_w, alpha= scaling)
2106
2106
  diff_w = None
2107
- if diff_b != None:
2107
+ if diff_b is not None:
2108
2108
  bias.add_(diff_b, alpha= scaling)
2109
2109
  diff_b = None
2110
2110
 
2111
2111
  ret = func(*args, **kwargs )
2112
2112
 
2113
- weight.data = original_weight if original_weight != None else None
2114
- if original_bias != None:
2115
- bias.data = original_bias
2113
+ if original_weight is not None: weight.data = original_weight
2114
+ if original_bias is not None: bias.data = original_bias
2116
2115
 
2117
2116
  return ret
2118
2117
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mmgp
3
- Version: 3.5.5
3
+ Version: 3.5.6
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.5 for the GPU Poor by DeepBeepMeep</H2>
18
+ <H2>Memory Management 3.5.6 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=uoif7gOSNmWg5eqvMkmuVkTErNL6q_QJ0Lmm0QP7FLo,126305
4
+ mmgp/safetensors2.py,sha256=4nKV13qCMabnNEB1TA_ueFbfGYYmiQ9racR_C6SsGug,18693
5
+ mmgp-3.5.6.dist-info/licenses/LICENSE.md,sha256=DD-WIS0BkPoWJ_8hQO3J8hMP9K_1-dyrYv1YCbkxcDU,94
6
+ mmgp-3.5.6.dist-info/METADATA,sha256=hgR8mrkLImQWNkSU3ayt78df5whCozfVqzIUvV9jo1I,16309
7
+ mmgp-3.5.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ mmgp-3.5.6.dist-info/top_level.txt,sha256=waGaepj2qVfnS2yAOkaMu4r9mJaVjGbEi6AwOUogU_U,14
9
+ mmgp-3.5.6.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=EnkDZp__eKmqWhAS9vM1hKGdXizeLYPTN5bdFbmVmlc,126301
4
- mmgp/safetensors2.py,sha256=4nKV13qCMabnNEB1TA_ueFbfGYYmiQ9racR_C6SsGug,18693
5
- mmgp-3.5.5.dist-info/licenses/LICENSE.md,sha256=DD-WIS0BkPoWJ_8hQO3J8hMP9K_1-dyrYv1YCbkxcDU,94
6
- mmgp-3.5.5.dist-info/METADATA,sha256=1IiXOasc93ZBWOCEPZTQ-0ajzR_pP74cTuqS_ROcZsU,16309
7
- mmgp-3.5.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- mmgp-3.5.5.dist-info/top_level.txt,sha256=waGaepj2qVfnS2yAOkaMu4r9mJaVjGbEi6AwOUogU_U,14
9
- mmgp-3.5.5.dist-info/RECORD,,
File without changes