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
022d8355
Commit
022d8355
authored
May 15, 2024
by
huchenlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use_checkpoint = False
parent
1c0a0c4c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
10 deletions
+13
-10
configs/alt-diffusion-inference.yaml
configs/alt-diffusion-inference.yaml
+1
-1
configs/alt-diffusion-m18-inference.yaml
configs/alt-diffusion-m18-inference.yaml
+1
-1
configs/instruct-pix2pix.yaml
configs/instruct-pix2pix.yaml
+1
-1
configs/sd_xl_inpaint.yaml
configs/sd_xl_inpaint.yaml
+1
-1
configs/v1-inference.yaml
configs/v1-inference.yaml
+1
-1
configs/v1-inpainting-inference.yaml
configs/v1-inpainting-inference.yaml
+1
-1
modules/sd_hijack_checkpoint.py
modules/sd_hijack_checkpoint.py
+6
-3
modules/sd_models_config.py
modules/sd_models_config.py
+1
-1
No files found.
configs/alt-diffusion-inference.yaml
View file @
022d8355
...
@@ -40,7 +40,7 @@ model:
...
@@ -40,7 +40,7 @@ model:
use_spatial_transformer
:
True
use_spatial_transformer
:
True
transformer_depth
:
1
transformer_depth
:
1
context_dim
:
768
context_dim
:
768
use_checkpoint
:
Tru
e
use_checkpoint
:
Fals
e
legacy
:
False
legacy
:
False
first_stage_config
:
first_stage_config
:
...
...
configs/alt-diffusion-m18-inference.yaml
View file @
022d8355
...
@@ -41,7 +41,7 @@ model:
...
@@ -41,7 +41,7 @@ model:
use_linear_in_transformer
:
True
use_linear_in_transformer
:
True
transformer_depth
:
1
transformer_depth
:
1
context_dim
:
1024
context_dim
:
1024
use_checkpoint
:
Tru
e
use_checkpoint
:
Fals
e
legacy
:
False
legacy
:
False
first_stage_config
:
first_stage_config
:
...
...
configs/instruct-pix2pix.yaml
View file @
022d8355
...
@@ -45,7 +45,7 @@ model:
...
@@ -45,7 +45,7 @@ model:
use_spatial_transformer
:
True
use_spatial_transformer
:
True
transformer_depth
:
1
transformer_depth
:
1
context_dim
:
768
context_dim
:
768
use_checkpoint
:
Tru
e
use_checkpoint
:
Fals
e
legacy
:
False
legacy
:
False
first_stage_config
:
first_stage_config
:
...
...
configs/sd_xl_inpaint.yaml
View file @
022d8355
...
@@ -21,7 +21,7 @@ model:
...
@@ -21,7 +21,7 @@ model:
params
:
params
:
adm_in_channels
:
2816
adm_in_channels
:
2816
num_classes
:
sequential
num_classes
:
sequential
use_checkpoint
:
Tru
e
use_checkpoint
:
Fals
e
in_channels
:
9
in_channels
:
9
out_channels
:
4
out_channels
:
4
model_channels
:
320
model_channels
:
320
...
...
configs/v1-inference.yaml
View file @
022d8355
...
@@ -40,7 +40,7 @@ model:
...
@@ -40,7 +40,7 @@ model:
use_spatial_transformer
:
True
use_spatial_transformer
:
True
transformer_depth
:
1
transformer_depth
:
1
context_dim
:
768
context_dim
:
768
use_checkpoint
:
Tru
e
use_checkpoint
:
Fals
e
legacy
:
False
legacy
:
False
first_stage_config
:
first_stage_config
:
...
...
configs/v1-inpainting-inference.yaml
View file @
022d8355
...
@@ -40,7 +40,7 @@ model:
...
@@ -40,7 +40,7 @@ model:
use_spatial_transformer
:
True
use_spatial_transformer
:
True
transformer_depth
:
1
transformer_depth
:
1
context_dim
:
768
context_dim
:
768
use_checkpoint
:
Tru
e
use_checkpoint
:
Fals
e
legacy
:
False
legacy
:
False
first_stage_config
:
first_stage_config
:
...
...
modules/sd_hijack_checkpoint.py
View file @
022d8355
...
@@ -4,16 +4,19 @@ import ldm.modules.attention
...
@@ -4,16 +4,19 @@ import ldm.modules.attention
import
ldm.modules.diffusionmodules.openaimodel
import
ldm.modules.diffusionmodules.openaimodel
# Setting flag=False so that torch skips checking parameters.
# parameters checking is expensive in frequent operations.
def
BasicTransformerBlock_forward
(
self
,
x
,
context
=
None
):
def
BasicTransformerBlock_forward
(
self
,
x
,
context
=
None
):
return
checkpoint
(
self
.
_forward
,
x
,
context
)
return
checkpoint
(
self
.
_forward
,
x
,
context
,
flag
=
False
)
def
AttentionBlock_forward
(
self
,
x
):
def
AttentionBlock_forward
(
self
,
x
):
return
checkpoint
(
self
.
_forward
,
x
)
return
checkpoint
(
self
.
_forward
,
x
,
flag
=
False
)
def
ResBlock_forward
(
self
,
x
,
emb
):
def
ResBlock_forward
(
self
,
x
,
emb
):
return
checkpoint
(
self
.
_forward
,
x
,
emb
)
return
checkpoint
(
self
.
_forward
,
x
,
emb
,
flag
=
False
)
stored
=
[]
stored
=
[]
...
...
modules/sd_models_config.py
View file @
022d8355
...
@@ -35,7 +35,7 @@ def is_using_v_parameterization_for_sd2(state_dict):
...
@@ -35,7 +35,7 @@ def is_using_v_parameterization_for_sd2(state_dict):
with
sd_disable_initialization
.
DisableInitialization
():
with
sd_disable_initialization
.
DisableInitialization
():
unet
=
ldm
.
modules
.
diffusionmodules
.
openaimodel
.
UNetModel
(
unet
=
ldm
.
modules
.
diffusionmodules
.
openaimodel
.
UNetModel
(
use_checkpoint
=
Tru
e
,
use_checkpoint
=
Fals
e
,
use_fp16
=
False
,
use_fp16
=
False
,
image_size
=
32
,
image_size
=
32
,
in_channels
=
4
,
in_channels
=
4
,
...
...
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