Remove the need for --generate-api-stubs

This commit is contained in:
Jacob Segal 2025-07-25 14:32:27 -07:00
parent b45a110de6
commit 689db36073
3 changed files with 1 additions and 8 deletions

View File

@ -153,7 +153,6 @@ parser.add_argument("--disable-metadata", action="store_true", help="Disable sav
parser.add_argument("--disable-all-custom-nodes", action="store_true", help="Disable loading all custom nodes.") parser.add_argument("--disable-all-custom-nodes", action="store_true", help="Disable loading all custom nodes.")
parser.add_argument("--whitelist-custom-nodes", type=str, nargs='+', default=[], help="Specify custom node folders to load even when --disable-all-custom-nodes is enabled.") parser.add_argument("--whitelist-custom-nodes", type=str, nargs='+', default=[], help="Specify custom node folders to load even when --disable-all-custom-nodes is enabled.")
parser.add_argument("--disable-api-nodes", action="store_true", help="Disable loading all api nodes.") parser.add_argument("--disable-api-nodes", action="store_true", help="Disable loading all api nodes.")
parser.add_argument("--generate-api-stubs", action="store_true", help="Generate .pyi stub files for API sync wrappers and exit.")
parser.add_argument("--multi-user", action="store_true", help="Enables per-user storage.") parser.add_argument("--multi-user", action="store_true", help="Enables per-user storage.")

View File

@ -10,7 +10,7 @@ import logging
import importlib import importlib
# Add ComfyUI to path so we can import modules # Add ComfyUI to path so we can import modules
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from comfy_api.internal.async_to_sync import AsyncToSyncConverter from comfy_api.internal.async_to_sync import AsyncToSyncConverter
from comfy_api.version_list import supported_versions from comfy_api.version_list import supported_versions

View File

@ -22,12 +22,6 @@ if __name__ == "__main__":
setup_logger(log_level=args.verbose, use_stdout=args.log_stdout) setup_logger(log_level=args.verbose, use_stdout=args.log_stdout)
# Handle --generate-api-stubs early
if args.generate_api_stubs:
from comfy_api.generate_api_stubs import main as generate_stubs_main
generate_stubs_main()
sys.exit(0)
def apply_custom_paths(): def apply_custom_paths():
# extra model paths # extra model paths
extra_model_paths_config_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "extra_model_paths.yaml") extra_model_paths_config_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "extra_model_paths.yaml")