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
2f98a35f
Commit
2f98a35f
authored
Jan 07, 2024
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add assets repo; serve fonts locally rather than from google's servers
parent
30aa5e0a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
+9
-2
modules/launch_utils.py
modules/launch_utils.py
+3
-0
modules/sysinfo.py
modules/sysinfo.py
+2
-0
modules/ui.py
modules/ui.py
+3
-1
style.css
style.css
+1
-1
No files found.
modules/launch_utils.py
View file @
2f98a35f
...
@@ -344,11 +344,13 @@ def prepare_environment():
...
@@ -344,11 +344,13 @@ def prepare_environment():
clip_package
=
os
.
environ
.
get
(
'CLIP_PACKAGE'
,
"https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip"
)
clip_package
=
os
.
environ
.
get
(
'CLIP_PACKAGE'
,
"https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip"
)
openclip_package
=
os
.
environ
.
get
(
'OPENCLIP_PACKAGE'
,
"https://github.com/mlfoundations/open_clip/archive/bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b.zip"
)
openclip_package
=
os
.
environ
.
get
(
'OPENCLIP_PACKAGE'
,
"https://github.com/mlfoundations/open_clip/archive/bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b.zip"
)
assets_repo
=
os
.
environ
.
get
(
'ASSETS_REPO'
,
"https://github.com/AUTOMATIC1111/stable-diffusion-webui-assets.git"
)
stable_diffusion_repo
=
os
.
environ
.
get
(
'STABLE_DIFFUSION_REPO'
,
"https://github.com/Stability-AI/stablediffusion.git"
)
stable_diffusion_repo
=
os
.
environ
.
get
(
'STABLE_DIFFUSION_REPO'
,
"https://github.com/Stability-AI/stablediffusion.git"
)
stable_diffusion_xl_repo
=
os
.
environ
.
get
(
'STABLE_DIFFUSION_XL_REPO'
,
"https://github.com/Stability-AI/generative-models.git"
)
stable_diffusion_xl_repo
=
os
.
environ
.
get
(
'STABLE_DIFFUSION_XL_REPO'
,
"https://github.com/Stability-AI/generative-models.git"
)
k_diffusion_repo
=
os
.
environ
.
get
(
'K_DIFFUSION_REPO'
,
'https://github.com/crowsonkb/k-diffusion.git'
)
k_diffusion_repo
=
os
.
environ
.
get
(
'K_DIFFUSION_REPO'
,
'https://github.com/crowsonkb/k-diffusion.git'
)
blip_repo
=
os
.
environ
.
get
(
'BLIP_REPO'
,
'https://github.com/salesforce/BLIP.git'
)
blip_repo
=
os
.
environ
.
get
(
'BLIP_REPO'
,
'https://github.com/salesforce/BLIP.git'
)
assets_commit_hash
=
os
.
environ
.
get
(
'ASSETS_COMMIT_HASH'
,
"6f7db241d2f8ba7457bac5ca9753331f0c266917"
)
stable_diffusion_commit_hash
=
os
.
environ
.
get
(
'STABLE_DIFFUSION_COMMIT_HASH'
,
"cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf"
)
stable_diffusion_commit_hash
=
os
.
environ
.
get
(
'STABLE_DIFFUSION_COMMIT_HASH'
,
"cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf"
)
stable_diffusion_xl_commit_hash
=
os
.
environ
.
get
(
'STABLE_DIFFUSION_XL_COMMIT_HASH'
,
"45c443b316737a4ab6e40413d7794a7f5657c19f"
)
stable_diffusion_xl_commit_hash
=
os
.
environ
.
get
(
'STABLE_DIFFUSION_XL_COMMIT_HASH'
,
"45c443b316737a4ab6e40413d7794a7f5657c19f"
)
k_diffusion_commit_hash
=
os
.
environ
.
get
(
'K_DIFFUSION_COMMIT_HASH'
,
"ab527a9a6d347f364e3d185ba6d714e22d80cb3c"
)
k_diffusion_commit_hash
=
os
.
environ
.
get
(
'K_DIFFUSION_COMMIT_HASH'
,
"ab527a9a6d347f364e3d185ba6d714e22d80cb3c"
)
...
@@ -405,6 +407,7 @@ def prepare_environment():
...
@@ -405,6 +407,7 @@ def prepare_environment():
os
.
makedirs
(
os
.
path
.
join
(
script_path
,
dir_repos
),
exist_ok
=
True
)
os
.
makedirs
(
os
.
path
.
join
(
script_path
,
dir_repos
),
exist_ok
=
True
)
git_clone
(
assets_repo
,
repo_dir
(
'stable-diffusion-webui-assets'
),
"assets"
,
assets_commit_hash
)
git_clone
(
stable_diffusion_repo
,
repo_dir
(
'stable-diffusion-stability-ai'
),
"Stable Diffusion"
,
stable_diffusion_commit_hash
)
git_clone
(
stable_diffusion_repo
,
repo_dir
(
'stable-diffusion-stability-ai'
),
"Stable Diffusion"
,
stable_diffusion_commit_hash
)
git_clone
(
stable_diffusion_xl_repo
,
repo_dir
(
'generative-models'
),
"Stable Diffusion XL"
,
stable_diffusion_xl_commit_hash
)
git_clone
(
stable_diffusion_xl_repo
,
repo_dir
(
'generative-models'
),
"Stable Diffusion XL"
,
stable_diffusion_xl_commit_hash
)
git_clone
(
k_diffusion_repo
,
repo_dir
(
'k-diffusion'
),
"K-diffusion"
,
k_diffusion_commit_hash
)
git_clone
(
k_diffusion_repo
,
repo_dir
(
'k-diffusion'
),
"K-diffusion"
,
k_diffusion_commit_hash
)
...
...
modules/sysinfo.py
View file @
2f98a35f
...
@@ -24,9 +24,11 @@ environment_whitelist = {
...
@@ -24,9 +24,11 @@ environment_whitelist = {
"XFORMERS_PACKAGE"
,
"XFORMERS_PACKAGE"
,
"CLIP_PACKAGE"
,
"CLIP_PACKAGE"
,
"OPENCLIP_PACKAGE"
,
"OPENCLIP_PACKAGE"
,
"ASSETS_REPO"
,
"STABLE_DIFFUSION_REPO"
,
"STABLE_DIFFUSION_REPO"
,
"K_DIFFUSION_REPO"
,
"K_DIFFUSION_REPO"
,
"BLIP_REPO"
,
"BLIP_REPO"
,
"ASSETS_COMMIT_HASH"
,
"STABLE_DIFFUSION_COMMIT_HASH"
,
"STABLE_DIFFUSION_COMMIT_HASH"
,
"K_DIFFUSION_COMMIT_HASH"
,
"K_DIFFUSION_COMMIT_HASH"
,
"BLIP_COMMIT_HASH"
,
"BLIP_COMMIT_HASH"
,
...
...
modules/ui.py
View file @
2f98a35f
...
@@ -13,7 +13,7 @@ from PIL import Image, PngImagePlugin # noqa: F401
...
@@ -13,7 +13,7 @@ from PIL import Image, PngImagePlugin # noqa: F401
from
modules.call_queue
import
wrap_gradio_gpu_call
,
wrap_queued_call
,
wrap_gradio_call
from
modules.call_queue
import
wrap_gradio_gpu_call
,
wrap_queued_call
,
wrap_gradio_call
from
modules
import
gradio_extensons
# noqa: F401
from
modules
import
gradio_extensons
# noqa: F401
from
modules
import
sd_hijack
,
sd_models
,
script_callbacks
,
ui_extensions
,
deepbooru
,
extra_networks
,
ui_common
,
ui_postprocessing
,
progress
,
ui_loadsave
,
shared_items
,
ui_settings
,
timer
,
sysinfo
,
ui_checkpoint_merger
,
scripts
,
sd_samplers
,
processing
,
ui_extra_networks
,
ui_toprow
from
modules
import
sd_hijack
,
sd_models
,
script_callbacks
,
ui_extensions
,
deepbooru
,
extra_networks
,
ui_common
,
ui_postprocessing
,
progress
,
ui_loadsave
,
shared_items
,
ui_settings
,
timer
,
sysinfo
,
ui_checkpoint_merger
,
scripts
,
sd_samplers
,
processing
,
ui_extra_networks
,
ui_toprow
,
launch_utils
from
modules.ui_components
import
FormRow
,
FormGroup
,
ToolButton
,
FormHTML
,
InputAccordion
,
ResizeHandleRow
from
modules.ui_components
import
FormRow
,
FormGroup
,
ToolButton
,
FormHTML
,
InputAccordion
,
ResizeHandleRow
from
modules.paths
import
script_path
from
modules.paths
import
script_path
from
modules.ui_common
import
create_refresh_button
from
modules.ui_common
import
create_refresh_button
...
@@ -1223,3 +1223,5 @@ def setup_ui_api(app):
...
@@ -1223,3 +1223,5 @@ def setup_ui_api(app):
app
.
add_api_route
(
"/internal/sysinfo"
,
download_sysinfo
,
methods
=
[
"GET"
])
app
.
add_api_route
(
"/internal/sysinfo"
,
download_sysinfo
,
methods
=
[
"GET"
])
app
.
add_api_route
(
"/internal/sysinfo-download"
,
lambda
:
download_sysinfo
(
attachment
=
True
),
methods
=
[
"GET"
])
app
.
add_api_route
(
"/internal/sysinfo-download"
,
lambda
:
download_sysinfo
(
attachment
=
True
),
methods
=
[
"GET"
])
import
fastapi.staticfiles
app
.
mount
(
"/webui-assets"
,
fastapi
.
staticfiles
.
StaticFiles
(
directory
=
launch_utils
.
repo_dir
(
'stable-diffusion-webui-assets'
)),
name
=
"webui-assets"
)
style.css
View file @
2f98a35f
/* temporary fix to load default gradio font in frontend instead of backend */
/* temporary fix to load default gradio font in frontend instead of backend */
@import
url('
https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap
')
;
@import
url('
webui-assets/css/sourcesanspro.css
')
;
/* temporary fix to hide gradio crop tool until it's fixed https://github.com/gradio-app/gradio/issues/3810 */
/* temporary fix to hide gradio crop tool until it's fixed https://github.com/gradio-app/gradio/issues/3810 */
...
...
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