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
f9ba7e64
Commit
f9ba7e64
authored
Jan 29, 2024
by
Kohaku-Blueleaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Try to reverse the dtype checking mechanism"
This reverts commit
d243e24f
.
parent
d243e24f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
modules/devices.py
modules/devices.py
+5
-2
No files found.
modules/devices.py
View file @
f9ba7e64
...
@@ -4,7 +4,6 @@ from functools import lru_cache
...
@@ -4,7 +4,6 @@ from functools import lru_cache
import
torch
import
torch
from
modules
import
errors
,
shared
from
modules
import
errors
,
shared
from
modules
import
torch_utils
if
sys
.
platform
==
"darwin"
:
if
sys
.
platform
==
"darwin"
:
from
modules
import
mac_specific
from
modules
import
mac_specific
...
@@ -141,7 +140,11 @@ def manual_cast_forward(target_dtype):
...
@@ -141,7 +140,11 @@ def manual_cast_forward(target_dtype):
args
=
[
arg
.
to
(
target_dtype
)
if
isinstance
(
arg
,
torch
.
Tensor
)
else
arg
for
arg
in
args
]
args
=
[
arg
.
to
(
target_dtype
)
if
isinstance
(
arg
,
torch
.
Tensor
)
else
arg
for
arg
in
args
]
kwargs
=
{
k
:
v
.
to
(
target_dtype
)
if
isinstance
(
v
,
torch
.
Tensor
)
else
v
for
k
,
v
in
kwargs
.
items
()}
kwargs
=
{
k
:
v
.
to
(
target_dtype
)
if
isinstance
(
v
,
torch
.
Tensor
)
else
v
for
k
,
v
in
kwargs
.
items
()}
org_dtype
=
torch_utils
.
get_param
(
self
)
.
dtype
org_dtype
=
target_dtype
for
param
in
self
.
parameters
():
if
param
.
dtype
!=
target_dtype
:
org_dtype
=
param
.
dtype
break
if
org_dtype
!=
target_dtype
:
if
org_dtype
!=
target_dtype
:
self
.
to
(
target_dtype
)
self
.
to
(
target_dtype
)
...
...
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