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
80d639a4
Commit
80d639a4
authored
Nov 05, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linter
parent
96ee3eff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
modules/sd_hijack.py
modules/sd_hijack.py
+1
-1
modules/sd_models.py
modules/sd_models.py
+2
-2
modules/sd_models_types.py
modules/sd_models_types.py
+1
-1
No files found.
modules/sd_hijack.py
View file @
80d639a4
...
@@ -183,7 +183,7 @@ class StableDiffusionModelHijack:
...
@@ -183,7 +183,7 @@ class StableDiffusionModelHijack:
except
Exception
as
e
:
except
Exception
as
e
:
errors
.
display
(
e
,
"applying cross attention optimization"
)
errors
.
display
(
e
,
"applying cross attention optimization"
)
undo_optimizations
()
undo_optimizations
()
def
conv_ssd
(
self
,
m
):
def
conv_ssd
(
self
,
m
):
delattr
(
m
.
model
.
diffusion_model
.
middle_block
,
'1'
)
delattr
(
m
.
model
.
diffusion_model
.
middle_block
,
'1'
)
delattr
(
m
.
model
.
diffusion_model
.
middle_block
,
'2'
)
delattr
(
m
.
model
.
diffusion_model
.
middle_block
,
'2'
)
...
...
modules/sd_models.py
View file @
80d639a4
...
@@ -355,10 +355,10 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer
...
@@ -355,10 +355,10 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer
model
.
is_ssd
=
model
.
is_sdxl
and
'model.diffusion_model.middle_block.1.transformer_blocks.0.attn1.to_q.weight'
not
in
state_dict
.
keys
()
model
.
is_ssd
=
model
.
is_sdxl
and
'model.diffusion_model.middle_block.1.transformer_blocks.0.attn1.to_q.weight'
not
in
state_dict
.
keys
()
if
model
.
is_sdxl
:
if
model
.
is_sdxl
:
sd_models_xl
.
extend_sdxl
(
model
)
sd_models_xl
.
extend_sdxl
(
model
)
if
model
.
is_ssd
:
if
model
.
is_ssd
:
sd_hijack
.
model_hijack
.
conv_ssd
(
model
)
sd_hijack
.
model_hijack
.
conv_ssd
(
model
)
if
shared
.
opts
.
sd_checkpoint_cache
>
0
:
if
shared
.
opts
.
sd_checkpoint_cache
>
0
:
# cache newly loaded model
# cache newly loaded model
checkpoints_loaded
[
checkpoint_info
]
=
state_dict
.
copy
()
checkpoints_loaded
[
checkpoint_info
]
=
state_dict
.
copy
()
...
...
modules/sd_models_types.py
View file @
80d639a4
...
@@ -23,7 +23,7 @@ class WebuiSdModel(LatentDiffusion):
...
@@ -23,7 +23,7 @@ class WebuiSdModel(LatentDiffusion):
is_sdxl
:
bool
is_sdxl
:
bool
"""True if the model's architecture is SDXL or SSD"""
"""True if the model's architecture is SDXL or SSD"""
is_ssd
:
bool
is_ssd
:
bool
"""True if the model is SSD"""
"""True if the model is SSD"""
...
...
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