Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
5dcc2260
Commit
5dcc2260
authored
Dec 06, 2022
by
zhaohu xing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add hash and fix undo hijack bug
Signed-off-by:
zhaohu xing
<
920232796@qq.com
>
parent
a25dfebe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
6 deletions
+11
-6
.DS_Store
.DS_Store
+0
-0
launch.py
launch.py
+5
-5
sd_hijack.py
modules/sd_hijack.py
+5
-1
v2-inference-v.yaml
v2-inference-v.yaml
+1
-0
No files found.
.DS_Store
0 → 100644
View file @
5dcc2260
File added
launch.py
View file @
5dcc2260
...
...
@@ -234,11 +234,11 @@ def prepare_enviroment():
os
.
makedirs
(
dir_repos
,
exist_ok
=
True
)
git_clone
(
stable_diffusion_repo
,
repo_dir
(
'stable-diffusion-stability-ai'
),
"Stable Diffusion"
,
)
git_clone
(
taming_transformers_repo
,
repo_dir
(
'taming-transformers'
),
"Taming Transformers"
,
)
git_clone
(
k_diffusion_repo
,
repo_dir
(
'k-diffusion'
),
"K-diffusion"
,
)
git_clone
(
codeformer_repo
,
repo_dir
(
'CodeFormer'
),
"CodeFormer"
,
)
git_clone
(
blip_repo
,
repo_dir
(
'BLIP'
),
"BLIP"
,
)
git_clone
(
stable_diffusion_repo
,
repo_dir
(
'stable-diffusion-stability-ai'
),
"Stable Diffusion"
,
stable_diffusion_commit_hash
)
git_clone
(
taming_transformers_repo
,
repo_dir
(
'taming-transformers'
),
"Taming Transformers"
,
taming_transformers_commit_hash
)
git_clone
(
k_diffusion_repo
,
repo_dir
(
'k-diffusion'
),
"K-diffusion"
,
k_diffusion_commit_hash
)
git_clone
(
codeformer_repo
,
repo_dir
(
'CodeFormer'
),
"CodeFormer"
,
codeformer_commit_hash
)
git_clone
(
blip_repo
,
repo_dir
(
'BLIP'
),
"BLIP"
,
blip_commit_hash
)
if
not
is_installed
(
"lpips"
):
run_pip
(
f
"install -r {os.path.join(repo_dir('CodeFormer'), 'requirements.txt')}"
,
"requirements for CodeFormer"
)
...
...
modules/sd_hijack.py
View file @
5dcc2260
...
...
@@ -112,7 +112,11 @@ class StableDiffusionModelHijack:
self
.
layers
=
flatten
(
m
)
def
undo_hijack
(
self
,
m
):
if
type
(
m
.
cond_stage_model
)
==
sd_hijack_clip
.
FrozenCLIPEmbedderWithCustomWords
:
if
shared
.
text_model_name
==
"XLMR-Large"
:
m
.
cond_stage_model
=
m
.
cond_stage_model
.
wrapped
elif
type
(
m
.
cond_stage_model
)
==
sd_hijack_clip
.
FrozenCLIPEmbedderWithCustomWords
:
m
.
cond_stage_model
=
m
.
cond_stage_model
.
wrapped
model_embeddings
=
m
.
cond_stage_model
.
transformer
.
text_model
.
embeddings
...
...
v2-inference.yaml
→
v2-inference
-v
.yaml
View file @
5dcc2260
...
...
@@ -2,6 +2,7 @@ model:
base_learning_rate
:
1.0e-4
target
:
ldm.models.diffusion.ddpm.LatentDiffusion
params
:
parameterization
:
"
v"
linear_start
:
0.00085
linear_end
:
0.0120
num_timesteps_cond
:
1
...
...
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