mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-04-19 03:13:01 -07:00
Avoid unnecessary isfile/exists calls
This commit is contained in:
parent
e4dcdcc955
commit
d9034b48a5
10 changed files with 41 additions and 35 deletions
|
|
@ -18,8 +18,10 @@ def initialize():
|
|||
shared.options_templates = shared_options.options_templates
|
||||
shared.opts = options.Options(shared_options.options_templates, shared_options.restricted_opts)
|
||||
shared.restricted_opts = shared_options.restricted_opts
|
||||
if os.path.exists(shared.config_filename):
|
||||
try:
|
||||
shared.opts.load(shared.config_filename)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
from modules import devices
|
||||
devices.device, devices.device_interrogate, devices.device_gfpgan, devices.device_esrgan, devices.device_codeformer = \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue