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
fengzch-das
nunchaku
Commits
f11a2e2a
Commit
f11a2e2a
authored
Apr 09, 2025
by
Hyunsung Lee
Committed by
muyangli
Apr 19, 2025
Browse files
Update utils.py
parent
f04b603c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
nunchaku/caching/utils.py
nunchaku/caching/utils.py
+3
-0
No files found.
nunchaku/caching/utils.py
View file @
f11a2e2a
...
@@ -245,6 +245,9 @@ class FluxCachedTransformerBlocks(nn.Module):
...
@@ -245,6 +245,9 @@ class FluxCachedTransformerBlocks(nn.Module):
self
.
return_hidden_states_only
=
return_hidden_states_only
self
.
return_hidden_states_only
=
return_hidden_states_only
self
.
verbose
=
verbose
self
.
verbose
=
verbose
def
update_residual_diff_threshold
(
self
,
residual_diff_threshold
=
0.12
):
self
.
residual_diff_threshold
=
residual_diff_threshold
def
forward
(
self
,
hidden_states
,
encoder_hidden_states
,
*
args
,
**
kwargs
):
def
forward
(
self
,
hidden_states
,
encoder_hidden_states
,
*
args
,
**
kwargs
):
batch_size
=
hidden_states
.
shape
[
0
]
batch_size
=
hidden_states
.
shape
[
0
]
if
self
.
residual_diff_threshold
<=
0.0
or
batch_size
>
1
:
if
self
.
residual_diff_threshold
<=
0.0
or
batch_size
>
1
:
...
...
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