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
4b023906
Commit
4b023906
authored
Feb 02, 2024
by
comfyanonymous
Browse files
Always use fp16 for the text encoders.
parent
d0e2354c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
comfy/model_management.py
comfy/model_management.py
+2
-4
No files found.
comfy/model_management.py
View file @
4b023906
...
@@ -546,10 +546,8 @@ def text_encoder_dtype(device=None):
...
@@ -546,10 +546,8 @@ def text_encoder_dtype(device=None):
if
is_device_cpu
(
device
):
if
is_device_cpu
(
device
):
return
torch
.
float16
return
torch
.
float16
if
should_use_fp16
(
device
,
prioritize_performance
=
False
):
return
torch
.
float16
return
torch
.
float16
else
:
return
torch
.
float32
def
intermediate_device
():
def
intermediate_device
():
if
args
.
gpu_only
:
if
args
.
gpu_only
:
...
...
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