Merge branch 'comfyanonymous:master' into master

This commit is contained in:
patientx 2024-12-31 12:22:04 +03:00 committed by GitHub
commit 419df8d958
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 63 additions and 58 deletions

View File

@ -5,7 +5,7 @@ This module provides type hinting and concrete convenience types for node develo
If cloned to the custom_nodes directory of ComfyUI, types can be imported using:
```python
from comfy_types import IO, ComfyNodeABC, CheckLazyMixin
from comfy.comfy_types import IO, ComfyNodeABC, CheckLazyMixin
class ExampleNode(ComfyNodeABC):
@classmethod

View File

@ -1,12 +1,12 @@
from comfy_types import IO, ComfyNodeABC, InputTypeDict
from comfy.comfy_types import IO, ComfyNodeABC, InputTypeDict
from inspect import cleandoc
class ExampleNode(ComfyNodeABC):
"""An example node that just adds 1 to an input integer.
* Requires an IDE configured with analysis paths etc to be worth looking at.
* Not intended for use in ComfyUI.
* Requires a modern IDE to provide any benefit (detail: an IDE configured with analysis paths etc).
* This node is intended as an example for developers only.
"""
DESCRIPTION = cleandoc(__doc__)

View File

@ -211,7 +211,9 @@ async def run(server_instance, address='', port=8188, verbose=True, call_on_star
addresses = []
for addr in address.split(","):
addresses.append((addr, port))
await asyncio.gather(server_instance.start_multi_address(addresses, call_on_start), server_instance.publish_loop())
await asyncio.gather(
server_instance.start_multi_address(addresses, call_on_start, verbose), server_instance.publish_loop()
)
def hijack_progress(server_instance):

View File

@ -5,6 +5,7 @@ lint.ignore = ["ALL"]
lint.select = [
"S307", # suspicious-eval-usage
"T201", # print-usage
"W291",
"W292",
"W293",
# The "F" series in Ruff stands for "Pyflakes" rules, which catch various Python syntax errors and undefined names.

View File

@ -807,7 +807,7 @@ class PromptServer():
async def start(self, address, port, verbose=True, call_on_start=None):
await self.start_multi_address([(address, port)], call_on_start=call_on_start)
async def start_multi_address(self, addresses, call_on_start=None):
async def start_multi_address(self, addresses, call_on_start=None, verbose=True):
runner = web.AppRunner(self.app, access_log=None)
await runner.setup()
ssl_ctx = None
@ -818,7 +818,8 @@ class PromptServer():
keyfile=args.tls_keyfile)
scheme = "https"
logging.info("Starting server\n")
if verbose:
logging.info("Starting server\n")
for addr in addresses:
address = addr[0]
port = addr[1]
@ -834,7 +835,8 @@ class PromptServer():
else:
address_print = address
logging.info("To see the GUI go to: {}://{}:{}".format(scheme, address_print, port))
if verbose:
logging.info("To see the GUI go to: {}://{}:{}".format(scheme, address_print, port))
if call_on_start is not None:
call_on_start(scheme, self.address, self.port)