parent
7cbfb1bc2c
commit
0a2c1c4cbf
12
args_manager.py
Normal file
12
args_manager.py
Normal file
@ -0,0 +1,12 @@
|
||||
from comfy.options import enable_args_parsing
|
||||
enable_args_parsing(False)
|
||||
import comfy.cli_args as comfy_cli
|
||||
|
||||
|
||||
comfy_cli.parser.add_argument("--share", action='store_true', help="Set whether to share on Gradio.")
|
||||
|
||||
comfy_cli.args = comfy_cli.parser.parse_args()
|
||||
comfy_cli.args.disable_cuda_malloc = True
|
||||
comfy_cli.args.auto_launch = True
|
||||
|
||||
args = comfy_cli.args
|
12
launch.py
12
launch.py
@ -91,20 +91,12 @@ def download_models():
|
||||
|
||||
|
||||
def ini_comfy_args():
|
||||
argv = sys.argv
|
||||
sys.argv = [sys.argv[0]]
|
||||
|
||||
from comfy.cli_args import args as comfy_args
|
||||
comfy_args.disable_cuda_malloc = True
|
||||
comfy_args.auto_launch = False
|
||||
|
||||
sys.argv = argv
|
||||
from args_manager import args
|
||||
return args
|
||||
|
||||
|
||||
prepare_environment()
|
||||
|
||||
ini_comfy_args()
|
||||
|
||||
download_models()
|
||||
|
||||
from webui import *
|
||||
|
13
readme.md
13
readme.md
@ -169,7 +169,18 @@ Same with the above instructions. You need to change torch to AMD version
|
||||
|
||||
AMD is not intensively tested, however.
|
||||
|
||||
### Mac/Windows(AMD GPUs)
|
||||
### Windows(AMD GPUs)
|
||||
|
||||
Same with Windows. Download the software, edit the content of `run.bat` as:
|
||||
|
||||
.\python_embeded\python.exe -m pip uninstall torch torchvision torchaudio torchtext functorch xformers -y
|
||||
.\python_embeded\python.exe -m pip install torch-directml
|
||||
.\python_embeded\python.exe -s Fooocus\entry_with_update.py --directml
|
||||
pause
|
||||
|
||||
Then run the `run.bat`.
|
||||
|
||||
### Mac
|
||||
|
||||
Coming soon ...
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
# 2.1.25
|
||||
|
||||
AMD support on Linux and Windows.
|
||||
|
||||
# 2.1.0
|
||||
|
||||
* Image Prompt
|
||||
|
13
webui.py
13
webui.py
@ -10,6 +10,7 @@ import modules.async_worker as worker
|
||||
import modules.flags as flags
|
||||
import modules.gradio_hijack as grh
|
||||
import modules.advanced_parameters as advanced_parameters
|
||||
import args_manager
|
||||
|
||||
from modules.sdxl_styles import style_keys, aspect_ratios, fooocus_expansion, default_styles, default_aspect_ratio
|
||||
|
||||
@ -310,9 +311,9 @@ with shared.gradio_root:
|
||||
.then(lambda: (gr.update(visible=True), gr.update(visible=False)), outputs=[run_button, stop_button])
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
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.")
|
||||
parser.add_argument("--listen", type=str, default=None, metavar="IP", nargs="?", const="0.0.0.0", help="Set the listen interface.")
|
||||
args = parser.parse_args()
|
||||
shared.gradio_root.launch(inbrowser=True, server_name=args.listen, server_port=args.port, share=args.share)
|
||||
shared.gradio_root.launch(
|
||||
inbrowser=args_manager.args.auto_launch,
|
||||
server_name=args_manager.args.listen,
|
||||
server_port=args_manager.args.port,
|
||||
share=args_manager.args.share
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user