Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xuwx1
LightX2V
Commits
1b5d336d
Commit
1b5d336d
authored
Jul 12, 2025
by
gushiqiao
Browse files
FIX
parent
39f3609d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
6 deletions
+6
-6
lightx2v/common/ops/conv/conv2d.py
lightx2v/common/ops/conv/conv2d.py
+1
-1
lightx2v/common/ops/conv/conv3d.py
lightx2v/common/ops/conv/conv3d.py
+1
-1
lightx2v/common/ops/mm/mm_weight.py
lightx2v/common/ops/mm/mm_weight.py
+1
-1
lightx2v/common/ops/norm/layer_norm_weight.py
lightx2v/common/ops/norm/layer_norm_weight.py
+1
-1
lightx2v/common/ops/norm/rms_norm_weight.py
lightx2v/common/ops/norm/rms_norm_weight.py
+1
-1
lightx2v/common/ops/tensor/tensor.py
lightx2v/common/ops/tensor/tensor.py
+1
-1
No files found.
lightx2v/common/ops/conv/conv2d.py
View file @
1b5d336d
...
...
@@ -58,7 +58,7 @@ class Conv2dWeight(Conv2dWeightTemplate):
return
destination
def
clear
(
self
):
attrs
=
[
"weight"
,
"bias"
]
attrs
=
[
"weight"
,
"bias"
,
"pinned_weight"
,
"pinned_bias"
]
for
attr
in
attrs
:
if
hasattr
(
self
,
attr
):
delattr
(
self
,
attr
)
...
...
lightx2v/common/ops/conv/conv3d.py
View file @
1b5d336d
...
...
@@ -68,7 +68,7 @@ class Conv3dWeight(Conv3dWeightTemplate):
return
destination
def
clear
(
self
):
attrs
=
[
"weight"
,
"bias"
]
attrs
=
[
"weight"
,
"bias"
,
"pinned_weight"
,
"pinned_bias"
]
for
attr
in
attrs
:
if
hasattr
(
self
,
attr
):
delattr
(
self
,
attr
)
...
...
lightx2v/common/ops/mm/mm_weight.py
View file @
1b5d336d
...
...
@@ -145,7 +145,7 @@ class MMWeightQuantTemplate(MMWeightTemplate):
self
.
pinned_weight
=
self
.
pinned_weight
.
t
()
def
clear
(
self
):
attrs
=
[
"weight"
,
"weight_scale"
,
"bias"
]
attrs
=
[
"weight"
,
"weight_scale"
,
"bias"
,
"pinned_weight"
,
"pinned_weight_scale"
,
"pinned_bias"
]
for
attr
in
attrs
:
if
hasattr
(
self
,
attr
):
delattr
(
self
,
attr
)
...
...
lightx2v/common/ops/norm/layer_norm_weight.py
View file @
1b5d336d
...
...
@@ -34,7 +34,7 @@ class LNWeightTemplate(metaclass=ABCMeta):
return
self
.
weight
.
numel
()
*
self
.
weight
.
element_size
()
def
clear
(
self
):
attrs
=
[
"weight"
,
"bias"
]
attrs
=
[
"weight"
,
"bias"
,
"pinned_weight"
,
"pinned_bias"
]
for
attr
in
attrs
:
if
hasattr
(
self
,
attr
):
delattr
(
self
,
attr
)
...
...
lightx2v/common/ops/norm/rms_norm_weight.py
View file @
1b5d336d
...
...
@@ -23,7 +23,7 @@ class RMSWeightTemplate(metaclass=ABCMeta):
self
.
pinned_weight
=
torch
.
empty
(
self
.
weight
.
shape
,
pin_memory
=
True
,
dtype
=
self
.
weight
.
dtype
)
def
clear
(
self
):
attrs
=
[
"weight"
]
attrs
=
[
"weight"
,
"pinned_weight"
]
for
attr
in
attrs
:
if
hasattr
(
self
,
attr
):
delattr
(
self
,
attr
)
...
...
lightx2v/common/ops/tensor/tensor.py
View file @
1b5d336d
...
...
@@ -22,7 +22,7 @@ class DefaultTensor:
self
.
pinned_tensor
=
torch
.
empty
(
self
.
tensor
.
shape
,
pin_memory
=
True
,
dtype
=
self
.
tensor
.
dtype
)
def
clear
(
self
):
attrs
=
[
"tensor"
]
attrs
=
[
"tensor"
,
"pinned_tensor"
]
for
attr
in
attrs
:
if
hasattr
(
self
,
attr
):
delattr
(
self
,
attr
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment