Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
0232a987
Commit
0232a987
authored
Aug 23, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set devices.dtype_unet correctly
parent
04cfcf91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
modules/sd_models.py
modules/sd_models.py
+2
-1
No files found.
modules/sd_models.py
View file @
0232a987
...
...
@@ -345,6 +345,7 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer
if
shared
.
cmd_opts
.
no_half
:
model
.
float
()
devices
.
dtype_unet
=
torch
.
float32
timer
.
record
(
"apply float()"
)
else
:
vae
=
model
.
first_stage_model
...
...
@@ -362,9 +363,9 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer
if
depth_model
:
model
.
depth_model
=
depth_model
devices
.
dtype_unet
=
torch
.
float16
timer
.
record
(
"apply half()"
)
devices
.
dtype_unet
=
torch
.
float16
if
model
.
is_sdxl
and
not
shared
.
cmd_opts
.
no_half
else
model
.
model
.
diffusion_model
.
dtype
devices
.
unet_needs_upcast
=
shared
.
cmd_opts
.
upcast_sampling
and
devices
.
dtype
==
torch
.
float16
and
devices
.
dtype_unet
==
torch
.
float16
model
.
first_stage_model
.
to
(
devices
.
dtype_vae
)
...
...
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