Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
ee65237d
Unverified
Commit
ee65237d
authored
Dec 24, 2022
by
AUTOMATIC1111
Committed by
GitHub
Dec 24, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5747 from yuvalabou/singleton-comparison
Format singleton comparisons
parents
7578b50b
957e15c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
extras.py
modules/extras.py
+1
-1
ngrok.py
modules/ngrok.py
+2
-2
ui.py
modules/ui.py
+6
-2
No files found.
modules/extras.py
View file @
ee65237d
...
@@ -188,7 +188,7 @@ def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_
...
@@ -188,7 +188,7 @@ def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_
for
op
in
extras_ops
:
for
op
in
extras_ops
:
image
,
info
=
op
(
image
,
info
)
image
,
info
=
op
(
image
,
info
)
if
opts
.
use_original_name_batch
and
image_name
!=
None
:
if
opts
.
use_original_name_batch
and
image_name
is
not
None
:
basename
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
image_name
))[
0
]
basename
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
image_name
))[
0
]
else
:
else
:
basename
=
''
basename
=
''
...
...
modules/ngrok.py
View file @
ee65237d
...
@@ -2,7 +2,7 @@ from pyngrok import ngrok, conf, exception
...
@@ -2,7 +2,7 @@ from pyngrok import ngrok, conf, exception
def
connect
(
token
,
port
,
region
):
def
connect
(
token
,
port
,
region
):
account
=
None
account
=
None
if
token
==
None
:
if
token
is
None
:
token
=
'None'
token
=
'None'
else
:
else
:
if
':'
in
token
:
if
':'
in
token
:
...
@@ -14,7 +14,7 @@ def connect(token, port, region):
...
@@ -14,7 +14,7 @@ def connect(token, port, region):
auth_token
=
token
,
region
=
region
auth_token
=
token
,
region
=
region
)
)
try
:
try
:
if
account
==
None
:
if
account
is
None
:
public_url
=
ngrok
.
connect
(
port
,
pyngrok_config
=
config
,
bind_tls
=
True
)
.
public_url
public_url
=
ngrok
.
connect
(
port
,
pyngrok_config
=
config
,
bind_tls
=
True
)
.
public_url
else
:
else
:
public_url
=
ngrok
.
connect
(
port
,
pyngrok_config
=
config
,
bind_tls
=
True
,
auth
=
account
)
.
public_url
public_url
=
ngrok
.
connect
(
port
,
pyngrok_config
=
config
,
bind_tls
=
True
,
auth
=
account
)
.
public_url
...
...
modules/ui.py
View file @
ee65237d
...
@@ -49,10 +49,14 @@ if not cmd_opts.share and not cmd_opts.listen:
...
@@ -49,10 +49,14 @@ if not cmd_opts.share and not cmd_opts.listen:
gradio
.
utils
.
version_check
=
lambda
:
None
gradio
.
utils
.
version_check
=
lambda
:
None
gradio
.
utils
.
get_local_ip_address
=
lambda
:
'127.0.0.1'
gradio
.
utils
.
get_local_ip_address
=
lambda
:
'127.0.0.1'
if
cmd_opts
.
ngrok
!=
None
:
if
cmd_opts
.
ngrok
is
not
None
:
import
modules.ngrok
as
ngrok
import
modules.ngrok
as
ngrok
print
(
'ngrok authtoken detected, trying to connect...'
)
print
(
'ngrok authtoken detected, trying to connect...'
)
ngrok
.
connect
(
cmd_opts
.
ngrok
,
cmd_opts
.
port
if
cmd_opts
.
port
!=
None
else
7860
,
cmd_opts
.
ngrok_region
)
ngrok
.
connect
(
cmd_opts
.
ngrok
,
cmd_opts
.
port
if
cmd_opts
.
port
is
not
None
else
7860
,
cmd_opts
.
ngrok_region
)
def
gr_show
(
visible
=
True
):
def
gr_show
(
visible
=
True
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment