diff --git a/modules/shared.py b/modules/shared.py index 8ba72f49..d9d01484 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -38,6 +38,7 @@ face_restorers = [] options_templates = None opts = None +restricted_opts = None sd_model: LatentDiffusion = None diff --git a/modules/shared_init.py b/modules/shared_init.py index e7fc18d2..b88d1d8e 100644 --- a/modules/shared_init.py +++ b/modules/shared_init.py @@ -20,6 +20,7 @@ def initialize(): from modules import options, shared_options 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): shared.opts.load(shared.config_filename)