diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-05 13:20:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 13:20:45 +0000 |
commit | 994136b9c2915aa0a7ae72f19426df5d60dc57d2 (patch) | |
tree | baaf04c26d2bd325d322084ae7fc4ba367836753 /modules/shared.py | |
parent | c9b2eef6a3b986fafdd1c13a3fb14969cbe909ca (diff) | |
parent | 37ba0070ec14d35addf00f6ae88b7b6c7a1c8ae6 (diff) | |
download | stable-diffusion-webui-gfx803-994136b9c2915aa0a7ae72f19426df5d60dc57d2.tar.gz stable-diffusion-webui-gfx803-994136b9c2915aa0a7ae72f19426df5d60dc57d2.tar.bz2 stable-diffusion-webui-gfx803-994136b9c2915aa0a7ae72f19426df5d60dc57d2.zip |
Merge pull request #4294 from evshiron/feat/allow-origins
add --cors-allow-origins cmd opt
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/shared.py b/modules/shared.py index 71587557..70b998ff 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -86,6 +86,7 @@ parser.add_argument("--nowebui", action='store_true', help="use api=True to laun parser.add_argument("--ui-debug-mode", action='store_true', help="Don't load model to quickly launch UI")
parser.add_argument("--device-id", type=str, help="Select the default CUDA device to use (export CUDA_VISIBLE_DEVICES=0,1,etc might be needed before)", default=None)
parser.add_argument("--administrator", action='store_true', help="Administrator rights", default=False)
+parser.add_argument("--cors-allow-origins", type=str, help="Allowed CORS origins", default=None)
parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requires --tls-certfile to fully function", default=None)
parser.add_argument("--tls-certfile", type=str, help="Partially enables TLS, requires --tls-keyfile to fully function", default=None)
parser.add_argument("--server-name", type=str, help="Sets hostname of server", default=None)
@@ -150,9 +151,9 @@ class State: self.interrupted = True
def nextjob(self):
- if opts.show_progress_every_n_steps == -1:
+ if opts.show_progress_every_n_steps == -1:
self.do_set_current_image()
-
+
self.job_no += 1
self.sampling_step = 0
self.current_image_sampling_step = 0
@@ -201,7 +202,7 @@ class State: return
if self.current_latent is None:
return
-
+
if opts.show_progress_grid:
self.current_image = sd_samplers.samples_to_image_grid(self.current_latent)
else:
|