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
997461d3
Commit
997461d3
authored
Jan 05, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add footer with versions
parent
01a1fee8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
5 deletions
+55
-5
html/footer.html
html/footer.html
+4
-0
launch.py
launch.py
+16
-4
modules/ui.py
modules/ui.py
+30
-1
style.css
style.css
+5
-0
No files found.
html/footer.html
View file @
997461d3
...
...
@@ -7,3 +7,7 @@
•
<a
href=
"/"
onclick=
"javascript:gradioApp().getElementById('settings_restart_gradio').click(); return false"
>
Reload UI
</a>
</div>
<br
/>
<div
class=
"versions"
>
{versions}
</div>
launch.py
View file @
997461d3
...
...
@@ -13,6 +13,21 @@ dir_extensions = "extensions"
python
=
sys
.
executable
git
=
os
.
environ
.
get
(
'GIT'
,
"git"
)
index_url
=
os
.
environ
.
get
(
'INDEX_URL'
,
""
)
stored_commit_hash
=
None
def
commit_hash
():
global
stored_commit_hash
if
stored_commit_hash
is
not
None
:
return
stored_commit_hash
try
:
stored_commit_hash
=
run
(
f
"{git} rev-parse HEAD"
)
.
strip
()
except
Exception
:
stored_commit_hash
=
"<none>"
return
stored_commit_hash
def
extract_arg
(
args
,
name
):
...
...
@@ -194,10 +209,7 @@ def prepare_environment():
xformers
=
'--xformers'
in
sys
.
argv
ngrok
=
'--ngrok'
in
sys
.
argv
try
:
commit
=
run
(
f
"{git} rev-parse HEAD"
)
.
strip
()
except
Exception
:
commit
=
"<none>"
commit
=
commit_hash
()
print
(
f
"Python {sys.version}"
)
print
(
f
"Commit hash: {commit}"
)
...
...
modules/ui.py
View file @
997461d3
...
...
@@ -1696,7 +1696,9 @@ def create_ui():
if
os
.
path
.
exists
(
"html/footer.html"
):
with
open
(
"html/footer.html"
,
encoding
=
"utf8"
)
as
file
:
gr
.
HTML
(
file
.
read
(),
elem_id
=
"footer"
)
footer
=
file
.
read
()
footer
=
footer
.
format
(
versions
=
versions_html
())
gr
.
HTML
(
footer
,
elem_id
=
"footer"
)
text_settings
=
gr
.
Textbox
(
elem_id
=
"settings_json"
,
value
=
lambda
:
opts
.
dumpjson
(),
visible
=
False
)
settings_submit
.
click
(
...
...
@@ -1857,3 +1859,30 @@ def reload_javascript():
if
not
hasattr
(
shared
,
'GradioTemplateResponseOriginal'
):
shared
.
GradioTemplateResponseOriginal
=
gradio
.
routes
.
templates
.
TemplateResponse
def
versions_html
():
import
torch
import
launch
python_version
=
"."
.
join
([
str
(
x
)
for
x
in
sys
.
version_info
[
0
:
3
]])
commit
=
launch
.
commit_hash
()
short_commit
=
commit
[
0
:
8
]
if
shared
.
xformers_available
:
import
xformers
xformers_version
=
xformers
.
__version__
else
:
xformers_version
=
"N/A"
return
f
"""
python: <span title="{sys.version}">{python_version}</span>
•
torch: {torch.__version__}
•
xformers: {xformers_version}
•
gradio: {gr.__version__}
•
commit: <a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/{commit}">{short_commit}</a>
"""
style.css
View file @
997461d3
...
...
@@ -628,6 +628,11 @@ footer {
display
:
inline-block
;
}
#footer
.versions
{
font-size
:
85%
;
opacity
:
0.85
;
}
/* The following handles localization for right-to-left (RTL) languages like Arabic.
The rtl media type will only be activated by the logic in javascript/localization.js.
If you change anything above, you need to make sure it is RTL compliant by just running
...
...
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