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
3ec5ce94
Commit
3ec5ce94
authored
Aug 22, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add type annotations for extra fields of shared.sd_model
parent
016554e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
modules/sd_models_types.py
modules/sd_models_types.py
+31
-0
modules/shared.py
modules/shared.py
+2
-3
No files found.
modules/sd_models_types.py
0 → 100644
View file @
3ec5ce94
from
ldm.models.diffusion.ddpm
import
LatentDiffusion
from
typing
import
TYPE_CHECKING
if
TYPE_CHECKING
:
from
modules.sd_models
import
CheckpointInfo
class
WebuiSdModel
(
LatentDiffusion
):
"""This class is not actually instantinated, but its fields are created and fieeld by webui"""
lowvram
:
bool
"""True if lowvram/medvram optimizations are enabled -- see modules.lowvram for more info"""
sd_model_hash
:
str
"""short hash, 10 first characters of SHA1 hash of the model file; may be None if --no-hashing flag is used"""
sd_model_checkpoint
:
str
"""path to the file on disk that model weights were obtained from"""
sd_checkpoint_info
:
'CheckpointInfo'
"""structure with additional information about the file with model's weights"""
is_sdxl
:
bool
"""True if the model's architecture is SDXL"""
is_sd2
:
bool
"""True if the model's architecture is SD 2.x"""
is_sd1
:
bool
"""True if the model's architecture is SD 1.x"""
modules/shared.py
View file @
3ec5ce94
...
@@ -2,9 +2,8 @@ import sys
...
@@ -2,9 +2,8 @@ import sys
import
gradio
as
gr
import
gradio
as
gr
from
modules
import
shared_cmd_options
,
shared_gradio_themes
,
options
,
shared_items
from
modules
import
shared_cmd_options
,
shared_gradio_themes
,
options
,
shared_items
,
sd_models_types
from
modules.paths_internal
import
models_path
,
script_path
,
data_path
,
sd_configs_path
,
sd_default_config
,
sd_model_file
,
default_sd_model_file
,
extensions_dir
,
extensions_builtin_dir
# noqa: F401
from
modules.paths_internal
import
models_path
,
script_path
,
data_path
,
sd_configs_path
,
sd_default_config
,
sd_model_file
,
default_sd_model_file
,
extensions_dir
,
extensions_builtin_dir
# noqa: F401
from
ldm.models.diffusion.ddpm
import
LatentDiffusion
from
modules
import
util
from
modules
import
util
cmd_opts
=
shared_cmd_options
.
cmd_opts
cmd_opts
=
shared_cmd_options
.
cmd_opts
...
@@ -40,7 +39,7 @@ options_templates = None
...
@@ -40,7 +39,7 @@ options_templates = None
opts
=
None
opts
=
None
restricted_opts
=
None
restricted_opts
=
None
sd_model
:
LatentDiffusion
=
None
sd_model
:
sd_models_types
.
WebuiSdModel
=
None
settings_components
=
None
settings_components
=
None
"""assinged from ui.py, a mapping on setting names to gradio components repsponsible for those settings"""
"""assinged from ui.py, a mapping on setting names to gradio components repsponsible for those 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