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
bbc4b047
Commit
bbc4b047
authored
Mar 12, 2023
by
AUTOMATIC1111
Committed by
GitHub
Mar 12, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8518 from brkirch/remove-bool-test
Fix image generation on macOS 13.3 betas
parents
55ccc8fe
a4cb96d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
modules/mac_specific.py
modules/mac_specific.py
+1
-2
No files found.
modules/mac_specific.py
View file @
bbc4b047
...
...
@@ -23,7 +23,7 @@ def cumsum_fix(input, cumsum_func, *args, **kwargs):
output_dtype
=
kwargs
.
get
(
'dtype'
,
input
.
dtype
)
if
output_dtype
==
torch
.
int64
:
return
cumsum_func
(
input
.
cpu
(),
*
args
,
**
kwargs
)
.
to
(
input
.
device
)
elif
cumsum_needs_bool_fix
and
output_dtype
==
torch
.
bool
or
cumsum_needs_int_fix
and
(
output_dtype
==
torch
.
int8
or
output_dtype
==
torch
.
int16
):
elif
output_dtype
==
torch
.
bool
or
cumsum_needs_int_fix
and
(
output_dtype
==
torch
.
int8
or
output_dtype
==
torch
.
int16
):
return
cumsum_func
(
input
.
to
(
torch
.
int32
),
*
args
,
**
kwargs
)
.
to
(
torch
.
int64
)
return
cumsum_func
(
input
,
*
args
,
**
kwargs
)
...
...
@@ -45,7 +45,6 @@ if has_mps:
CondFunc
(
'torch.Tensor.numpy'
,
lambda
orig_func
,
self
,
*
args
,
**
kwargs
:
orig_func
(
self
.
detach
(),
*
args
,
**
kwargs
),
lambda
_
,
self
,
*
args
,
**
kwargs
:
self
.
requires_grad
)
elif
version
.
parse
(
torch
.
__version__
)
>
version
.
parse
(
"1.13.1"
):
cumsum_needs_int_fix
=
not
torch
.
Tensor
([
1
,
2
])
.
to
(
torch
.
device
(
"mps"
))
.
equal
(
torch
.
ShortTensor
([
1
,
1
])
.
to
(
torch
.
device
(
"mps"
))
.
cumsum
(
0
))
cumsum_needs_bool_fix
=
not
torch
.
BoolTensor
([
True
,
True
])
.
to
(
device
=
torch
.
device
(
"mps"
),
dtype
=
torch
.
int64
)
.
equal
(
torch
.
BoolTensor
([
True
,
False
])
.
to
(
torch
.
device
(
"mps"
))
.
cumsum
(
0
))
cumsum_fix_func
=
lambda
orig_func
,
input
,
*
args
,
**
kwargs
:
cumsum_fix
(
input
,
orig_func
,
*
args
,
**
kwargs
)
CondFunc
(
'torch.cumsum'
,
cumsum_fix_func
,
None
)
CondFunc
(
'torch.Tensor.cumsum'
,
cumsum_fix_func
,
None
)
...
...
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