mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-10 08:27:13 +08:00
Merge 8d7087a7a9 into a3020f107e
This commit is contained in:
commit
3489df1d7b
@ -235,6 +235,13 @@ parser.add_argument(
|
|||||||
help="Set the base URL for the ComfyUI API. (default: https://api.comfy.org)",
|
help="Set the base URL for the ComfyUI API. (default: https://api.comfy.org)",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"--comfy-platform-base",
|
||||||
|
type=str,
|
||||||
|
default="https://platform.comfy.org",
|
||||||
|
help="Set the base URL for the ComfyUI Platform. (default: https://platform.comfy.org)",
|
||||||
|
)
|
||||||
|
|
||||||
database_default_path = os.path.abspath(
|
database_default_path = os.path.abspath(
|
||||||
os.path.join(os.path.dirname(__file__), "..", "user", "comfyui.db")
|
os.path.join(os.path.dirname(__file__), "..", "user", "comfyui.db")
|
||||||
)
|
)
|
||||||
|
|||||||
@ -104,6 +104,8 @@ _CORE_FEATURE_FLAGS: dict[str, Any] = {
|
|||||||
"extension": {"manager": {"supports_v4": True}},
|
"extension": {"manager": {"supports_v4": True}},
|
||||||
"node_replacements": True,
|
"node_replacements": True,
|
||||||
"assets": args.enable_assets,
|
"assets": args.enable_assets,
|
||||||
|
"comfy_api_base_url": args.comfy_api_base,
|
||||||
|
"comfy_platform_base_url": args.comfy_platform_base,
|
||||||
}
|
}
|
||||||
|
|
||||||
# CLI-provided flags cannot overwrite core flags
|
# CLI-provided flags cannot overwrite core flags
|
||||||
|
|||||||
@ -32,6 +32,17 @@ class TestFeatureFlags:
|
|||||||
assert "max_upload_size" in features
|
assert "max_upload_size" in features
|
||||||
assert isinstance(features["max_upload_size"], (int, float))
|
assert isinstance(features["max_upload_size"], (int, float))
|
||||||
|
|
||||||
|
def test_get_server_features_exposes_comfy_api_base_urls(self):
|
||||||
|
"""The frontend reads comfy_api_base_url / comfy_platform_base_url
|
||||||
|
from /features to learn which backend to talk to. The keys must be
|
||||||
|
present (with the CLI-provided or default URL) so an ephemeral or
|
||||||
|
self-hosted comfy-api can override them without a frontend rebuild."""
|
||||||
|
features = get_server_features()
|
||||||
|
assert isinstance(features.get("comfy_api_base_url"), str)
|
||||||
|
assert features["comfy_api_base_url"].startswith("http")
|
||||||
|
assert isinstance(features.get("comfy_platform_base_url"), str)
|
||||||
|
assert features["comfy_platform_base_url"].startswith("http")
|
||||||
|
|
||||||
def test_get_connection_feature_with_missing_sid(self):
|
def test_get_connection_feature_with_missing_sid(self):
|
||||||
"""Test getting feature for non-existent session ID."""
|
"""Test getting feature for non-existent session ID."""
|
||||||
sockets_metadata = {}
|
sockets_metadata = {}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user