parent
50708f3d22
commit
7900480360
|
|
@ -1 +1 @@
|
|||
version = '1.0.24'
|
||||
version = '1.0.25'
|
||||
|
|
|
|||
|
|
@ -72,9 +72,16 @@ def download_models():
|
|||
return
|
||||
|
||||
|
||||
def cuda_malloc():
|
||||
argv = sys.argv
|
||||
sys.argv = [sys.argv[0]]
|
||||
import cuda_malloc
|
||||
sys.argv = argv
|
||||
|
||||
|
||||
prepare_environment()
|
||||
|
||||
import cuda_malloc
|
||||
cuda_malloc()
|
||||
|
||||
download_models()
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,10 @@ def worker():
|
|||
|
||||
try:
|
||||
async_gradio_app = shared.gradio_root
|
||||
print(f'''App started successful. Use the app with {str(async_gradio_app.local_url)} or {str(async_gradio_app.server_name)}:{str(async_gradio_app.server_port)}''')
|
||||
flag = f'''App started successful. Use the app with {str(async_gradio_app.local_url)} or {str(async_gradio_app.server_name)}:{str(async_gradio_app.server_port)}'''
|
||||
if async_gradio_app.share:
|
||||
flag += f''' or {async_gradio_app.share_url}'''
|
||||
print(flag)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
### 1.0.25
|
||||
|
||||
* support sys.argv --listen --share --port
|
||||
|
||||
### 1.0.24
|
||||
|
||||
* Taller input textbox.
|
||||
|
|
|
|||
9
webui.py
9
webui.py
|
|
@ -2,6 +2,7 @@ import gradio as gr
|
|||
import sys
|
||||
import time
|
||||
import shared
|
||||
import argparse
|
||||
import modules.path
|
||||
import fooocus_version
|
||||
import modules.html
|
||||
|
|
@ -94,4 +95,10 @@ with shared.gradio_root:
|
|||
ctrls += [base_model, refiner_model] + lora_ctrls
|
||||
run_button.click(fn=generate_clicked, inputs=ctrls, outputs=[run_button, progress_html, progress_window, gallery])
|
||||
|
||||
shared.gradio_root.launch(inbrowser=True, server_name='0.0.0.0' if '--listen' in sys.argv else None)
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--listen", action='store_true', help="Listen remote port.")
|
||||
parser.add_argument("--port", type=int, default=None, help="Set the listen port.")
|
||||
parser.add_argument("--share", action='store_true', help="Set whether to share on Gradio.")
|
||||
args = parser.parse_args()
|
||||
shared.gradio_root.launch(inbrowser=True, server_name='0.0.0.0' if args.listen else None, server_port=args.port, share=args.share)
|
||||
|
|
|
|||
Loading…
Reference in New Issue