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
a5409a6e
Commit
a5409a6e
authored
Nov 02, 2022
by
Muhammad Rizqi Nur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save VAE provided by cmd_opts.vae_path
parent
056f06d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
sd_vae.py
modules/sd_vae.py
+4
-7
No files found.
modules/sd_vae.py
View file @
a5409a6e
...
@@ -78,27 +78,24 @@ def refresh_vae_list(vae_path=vae_path, model_path=model_path):
...
@@ -78,27 +78,24 @@ def refresh_vae_list(vae_path=vae_path, model_path=model_path):
vae_list
.
extend
(
default_vae_list
)
vae_list
.
extend
(
default_vae_list
)
vae_list
.
extend
(
list
(
res
.
keys
()))
vae_list
.
extend
(
list
(
res
.
keys
()))
vae_dict
.
clear
()
vae_dict
.
clear
()
vae_dict
.
update
(
default_vae_dict
)
vae_dict
.
update
(
res
)
vae_dict
.
update
(
res
)
vae_dict
.
update
(
default_vae_dict
)
return
vae_list
return
vae_list
def
resolve_vae
(
checkpoint_file
,
vae_file
=
"auto"
):
def
resolve_vae
(
checkpoint_file
,
vae_file
=
"auto"
):
global
first_load
,
vae_dict
,
vae_list
global
first_load
,
vae_dict
,
vae_list
# save_settings = False
# if vae_file argument is provided, it takes priority
# if vae_file argument is provided, it takes priority
, but not saved
if
vae_file
and
vae_file
not
in
default_vae_list
:
if
vae_file
and
vae_file
not
in
default_vae_list
:
if
not
os
.
path
.
isfile
(
vae_file
):
if
not
os
.
path
.
isfile
(
vae_file
):
vae_file
=
"auto"
vae_file
=
"auto"
# save_settings = True
print
(
"VAE provided as function argument doesn't exist"
)
print
(
"VAE provided as function argument doesn't exist"
)
# for the first load, if vae-path is provided, it takes priority and failure is reported
# for the first load, if vae-path is provided, it takes priority
, saved,
and failure is reported
if
first_load
and
shared
.
cmd_opts
.
vae_path
is
not
None
:
if
first_load
and
shared
.
cmd_opts
.
vae_path
is
not
None
:
if
os
.
path
.
isfile
(
shared
.
cmd_opts
.
vae_path
):
if
os
.
path
.
isfile
(
shared
.
cmd_opts
.
vae_path
):
vae_file
=
shared
.
cmd_opts
.
vae_path
vae_file
=
shared
.
cmd_opts
.
vae_path
# save_settings = True
shared
.
opts
.
data
[
'sd_vae'
]
=
get_filename
(
vae_file
)
# print("Using VAE provided as command line argument")
else
:
else
:
print
(
"VAE provided as command line argument doesn't exist"
)
print
(
"VAE provided as command line argument doesn't exist"
)
# else, we load from settings
# else, we load from settings
...
...
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