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
f2a3c894
Commit
f2a3c894
authored
May 09, 2025
by
helloyongyang
Browse files
fix sparge bugs
parent
53c0d05c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
lightx2v/common/ops/attn/attn_weight.py
lightx2v/common/ops/attn/attn_weight.py
+5
-0
lightx2v/utils/set_config.py
lightx2v/utils/set_config.py
+1
-0
No files found.
lightx2v/common/ops/attn/attn_weight.py
View file @
f2a3c894
...
@@ -58,6 +58,11 @@ class AttnWeightTemplate(metaclass=ABCMeta):
...
@@ -58,6 +58,11 @@ class AttnWeightTemplate(metaclass=ABCMeta):
def
to_cuda
(
self
,
non_blocking
=
False
):
def
to_cuda
(
self
,
non_blocking
=
False
):
self
.
weight
=
self
.
weight
.
cuda
(
non_blocking
=
non_blocking
)
self
.
weight
=
self
.
weight
.
cuda
(
non_blocking
=
non_blocking
)
def
state_dict
(
self
,
destination
=
None
):
if
destination
is
None
:
destination
=
{}
return
destination
@
ATTN_WEIGHT_REGISTER
(
"flash_attn2"
)
@
ATTN_WEIGHT_REGISTER
(
"flash_attn2"
)
class
FlashAttn2Weight
(
AttnWeightTemplate
):
class
FlashAttn2Weight
(
AttnWeightTemplate
):
...
...
lightx2v/utils/set_config.py
View file @
f2a3c894
...
@@ -20,6 +20,7 @@ def get_default_config():
...
@@ -20,6 +20,7 @@ def get_default_config():
"strength_model"
:
1.0
,
"strength_model"
:
1.0
,
"mm_config"
:
{},
"mm_config"
:
{},
"use_prompt_enhancer"
:
False
,
"use_prompt_enhancer"
:
False
,
"sparge"
:
False
,
}
}
return
default_config
return
default_config
...
...
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