Skip to content

Commit

Permalink
Merge branch 'xieyongliang:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
xiehust committed Apr 1, 2023
2 parents 2eaf31c + 3ca3a57 commit 7146b33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions javascript/ui.js
Expand Up @@ -214,9 +214,11 @@ function restart_reload(){

function login(username) {
var user=gradioApp().querySelector('#tabs').querySelectorAll('button')[5];
var setting=gradioApp().querySelector('#tabs').querySelectorAll('button')[6];

if(username=='admin'){
user.style.display='block'
setting.style.display='none'
user.click()
}
else
Expand Down
4 changes: 2 additions & 2 deletions webui.py
Expand Up @@ -234,7 +234,7 @@ def webui():
api_endpoint = os.environ['api_endpoint']
endpoint_name = os.environ['endpoint_name']
for file in os.listdir(sd_models_dir):
if os.path.isfile(os.path.join(sd_models_dir, file)) and (file.endswith('.ckpt') or file.endswith('.safesentors')):
if os.path.isfile(os.path.join(sd_models_dir, file)) and (file.endswith('.ckpt') or file.endswith('.safetensors')):
hash = modules.sd_models.model_hash(os.path.join(sd_models_dir, file))
item = {}
item['model_name'] = file
Expand Down Expand Up @@ -263,7 +263,7 @@ def webui():
}
for file in os.listdir(cn_models_dir):
if os.path.isfile(os.path.join(cn_models_dir, file)) and \
(file.endswith('pt') or file.endswith('.pth') or file.endswith('.ckpt') or file.endswith('.safetensors')):
(file.endswith('.pt') or file.endswith('.pth') or file.endswith('.ckpt') or file.endswith('.safetensors')):
hash = modules.sd_models.model_hash(os.path.join(cn_models_dir, file))
item = {}
item['model_name'] = file
Expand Down

0 comments on commit 7146b33

Please sign in to comment.