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
103c487a
"vscode:/vscode.git/clone" did not exist on "6887f45720ce4cb93bc3dfb45978456682cb8190"
Commit
103c487a
authored
Jul 02, 2023
by
comfyanonymous
Browse files
Cleanup.
parent
ae948b42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
comfy/ldm/modules/attention.py
comfy/ldm/modules/attention.py
+6
-3
main.py
main.py
+0
-4
No files found.
comfy/ldm/modules/attention.py
View file @
103c487a
...
...
@@ -16,11 +16,14 @@ if model_management.xformers_enabled():
import
xformers
import
xformers.ops
from
comfy.cli_args
import
args
# CrossAttn precision handling
import
os
_ATTN_PRECISION
=
os
.
environ
.
get
(
"ATTN_PRECISION"
,
"fp32"
)
if
args
.
dont_upcast_attention
:
print
(
"disabling upcasting of attention"
)
_ATTN_PRECISION
=
"fp16"
else
:
_ATTN_PRECISION
=
"fp32"
from
comfy.cli_args
import
args
def
exists
(
val
):
return
val
is
not
None
...
...
main.py
View file @
103c487a
...
...
@@ -14,10 +14,6 @@ if os.name == "nt":
logging
.
getLogger
(
"xformers"
).
addFilter
(
lambda
record
:
'A matching Triton is not available'
not
in
record
.
getMessage
())
if
__name__
==
"__main__"
:
if
args
.
dont_upcast_attention
:
print
(
"disabling upcasting of attention"
)
os
.
environ
[
'ATTN_PRECISION'
]
=
"fp16"
if
args
.
cuda_device
is
not
None
:
os
.
environ
[
'CUDA_VISIBLE_DEVICES'
]
=
str
(
args
.
cuda_device
)
print
(
"Set cuda device to:"
,
args
.
cuda_device
)
...
...
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