-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from konieshadow/dev
Add CMD flags support of Fooocus
- Loading branch information
Showing
7 changed files
with
83 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version = '0.3.24' | ||
version = '0.3.25' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from fooocusapi.base_args import add_base_args | ||
import ldm_patched.modules.args_parser as args_parser | ||
|
||
# Add Fooocus-API args to parser | ||
add_base_args(args_parser.parser, False) | ||
|
||
# Apply Fooocus's args | ||
from args_manager import args_parser | ||
|
||
# Override the port default value | ||
args_parser.parser.set_defaults( | ||
port=8888 | ||
) | ||
|
||
# Execute args parse again | ||
args_parser.args = args_parser.parser.parse_args() | ||
args = args_parser.args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from argparse import ArgumentParser | ||
|
||
|
||
def add_base_args(parser: ArgumentParser, before_prepared: bool): | ||
if before_prepared: | ||
parser.add_argument("--port", type=int, default=8888, help="Set the listen port, default: 8888") | ||
|
||
parser.add_argument("--host", type=str, default='127.0.0.1', help="Set the listen host, default: 127.0.0.1") | ||
parser.add_argument("--base-url", type=str, default=None, help="Set base url for outside visit, default is http://host:port") | ||
parser.add_argument("--log-level", type=str, default='info', help="Log info for Uvicorn, default: info") | ||
parser.add_argument("--sync-repo", default=None, help="Sync dependent git repositories to local, 'skip' for skip sync action, 'only' for only do the sync action and not launch app") | ||
parser.add_argument("--skip-pip", default=False, action="store_true", help="Skip automatic pip install when setup") | ||
parser.add_argument("--preload-pipeline", default=False, action="store_true", help="Preload pipeline before start http server") | ||
parser.add_argument("--queue-size", type=int, default=3, help="Working queue size, default: 3, generation requests exceeding working queue size will return failure") | ||
parser.add_argument("--queue-history", type=int, default=100, help="Finished jobs reserve size, tasks exceeding the limit will be deleted, including output image files, default: 100") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters