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
chenpangpang
ComfyUI
Commits
2db86b46
Commit
2db86b46
authored
Dec 06, 2023
by
comfyanonymous
Browse files
Slightly faster lora applying.
parent
e1345473
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
comfy/model_management.py
comfy/model_management.py
+4
-4
No files found.
comfy/model_management.py
View file @
2db86b46
...
@@ -550,12 +550,12 @@ def cast_to_device(tensor, device, dtype, copy=False):
...
@@ -550,12 +550,12 @@ def cast_to_device(tensor, device, dtype, copy=False):
if
device_supports_cast
:
if
device_supports_cast
:
if
copy
:
if
copy
:
if
tensor
.
device
==
device
:
if
tensor
.
device
==
device
:
return
tensor
.
to
(
dtype
,
copy
=
copy
)
return
tensor
.
to
(
dtype
,
copy
=
copy
,
non_blocking
=
True
)
return
tensor
.
to
(
device
,
copy
=
copy
).
to
(
dtyp
e
)
return
tensor
.
to
(
device
,
copy
=
copy
,
non_blocking
=
True
).
to
(
dtype
,
non_blocking
=
Tru
e
)
else
:
else
:
return
tensor
.
to
(
device
).
to
(
dtyp
e
)
return
tensor
.
to
(
device
,
non_blocking
=
True
).
to
(
dtype
,
non_blocking
=
Tru
e
)
else
:
else
:
return
tensor
.
to
(
d
type
).
to
(
device
,
copy
=
copy
)
return
tensor
.
to
(
d
evice
,
dtype
,
copy
=
copy
,
non_blocking
=
True
)
def
xformers_enabled
():
def
xformers_enabled
():
global
directml_enabled
global
directml_enabled
...
...
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