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
4ec6470a
Commit
4ec6470a
authored
Jan 04, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix checkpoint list API
parent
8d8a05a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
api.py
modules/api/api.py
+2
-2
No files found.
modules/api/api.py
View file @
4ec6470a
...
@@ -18,7 +18,7 @@ from modules.textual_inversion.textual_inversion import create_embedding, train_
...
@@ -18,7 +18,7 @@ from modules.textual_inversion.textual_inversion import create_embedding, train_
from
modules.textual_inversion.preprocess
import
preprocess
from
modules.textual_inversion.preprocess
import
preprocess
from
modules.hypernetworks.hypernetwork
import
create_hypernetwork
,
train_hypernetwork
from
modules.hypernetworks.hypernetwork
import
create_hypernetwork
,
train_hypernetwork
from
PIL
import
PngImagePlugin
,
Image
from
PIL
import
PngImagePlugin
,
Image
from
modules.sd_models
import
checkpoints_list
from
modules.sd_models
import
checkpoints_list
,
find_checkpoint_config
from
modules.realesrgan_model
import
get_realesrgan_models
from
modules.realesrgan_model
import
get_realesrgan_models
from
modules
import
devices
from
modules
import
devices
from
typing
import
List
from
typing
import
List
...
@@ -303,7 +303,7 @@ class Api:
...
@@ -303,7 +303,7 @@ class Api:
return
upscalers
return
upscalers
def
get_sd_models
(
self
):
def
get_sd_models
(
self
):
return
[{
"title"
:
x
.
title
,
"model_name"
:
x
.
model_name
,
"hash"
:
x
.
hash
,
"filename"
:
x
.
filename
,
"config"
:
x
.
config
}
for
x
in
checkpoints_list
.
values
()]
return
[{
"title"
:
x
.
title
,
"model_name"
:
x
.
model_name
,
"hash"
:
x
.
hash
,
"filename"
:
x
.
filename
,
"config"
:
find_checkpoint_config
(
x
)
}
for
x
in
checkpoints_list
.
values
()]
def
get_hypernetworks
(
self
):
def
get_hypernetworks
(
self
):
return
[{
"name"
:
name
,
"path"
:
shared
.
hypernetworks
[
name
]}
for
name
in
shared
.
hypernetworks
]
return
[{
"name"
:
name
,
"path"
:
shared
.
hypernetworks
[
name
]}
for
name
in
shared
.
hypernetworks
]
...
...
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