Skip to content

Commit

Permalink
cleaup
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyongliang committed Feb 12, 2023
1 parent a097d8d commit 241dd8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 0 additions & 6 deletions modules/sd_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ def get_closet_checkpoint_match(searchString):
return applicable[0]
return None

def get_closet_checkpoint_match_from_model_name(searchString):
applicable = sorted([info for info in checkpoints_list.values() if searchString in info.model_name], key = lambda x:len(x.model_name))
if len(applicable) > 0:
return applicable[0]
return None

def get_sd_model_checkpoint_from_title(sd_model_checkpoint_title):
pos = sd_model_checkpoint_title.rfind('[')
return sd_model_checkpoint_title[0 : pos - 1]
Expand Down
3 changes: 2 additions & 1 deletion webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ def api_only():
inputs = {
'items': items
}
response = requests.post(url=f'{api_endpoint}/sd/models', json=inputs)
if api_endpoint.startswith('http://'):
response = requests.post(url=f'{api_endpoint}/sd/models', json=inputs)

modules.script_callbacks.app_started_callback(None, app)

Expand Down

0 comments on commit 241dd8a

Please sign in to comment.