Compare commits

...

6 Commits

Author SHA1 Message Date
Silver
cf0524c024
Merge 4916544c8d into bbe2c13a70 2026-01-30 06:09:42 +01:00
comfyanonymous
bbe2c13a70
Make empty hunyuan latent 1.0 work with the 1.5 model. (#12171)
Some checks are pending
Execution Tests / test (macos-latest) (push) Waiting to run
Execution Tests / test (ubuntu-latest) (push) Waiting to run
Execution Tests / test (windows-latest) (push) Waiting to run
Python Linting / Run Ruff (push) Waiting to run
Test server launches without errors / test (push) Waiting to run
Python Linting / Run Pylint (push) Waiting to run
Unit Tests / test (macos-latest) (push) Waiting to run
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.10, [self-hosted Linux], stable) (push) Waiting to run
Unit Tests / test (ubuntu-latest) (push) Waiting to run
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.11, [self-hosted Linux], stable) (push) Waiting to run
Unit Tests / test (windows-2022) (push) Waiting to run
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.12, [self-hosted Linux], stable) (push) Waiting to run
Full Comfy CI Workflow Runs / test-unix-nightly (12.1, , linux, 3.11, [self-hosted Linux], nightly) (push) Waiting to run
2026-01-29 23:52:22 -05:00
Christian Byrne
3aace5c8dc
fix: count non-dict items in outputs_count (#12166)
Move count increment before isinstance(item, dict) check so that
non-dict output items (like text strings from PreviewAny node)
are included in outputs_count.

This aligns OSS Python with Cloud's Go implementation which uses
len(itemsArray) to count ALL items regardless of type.

Amp-Thread-ID: https://ampcode.com/threads/T-019c0bb5-14e0-744f-8808-1e57653f3ae3

Co-authored-by: Amp <amp@ampcode.com>
2026-01-29 17:10:08 -08:00
Silver
4916544c8d
Merge branch 'master' into patch-5 2026-01-01 00:45:32 +01:00
Silver
8a40614e7c
Merge branch 'comfyanonymous:master' into patch-5 2025-10-05 21:19:57 +02:00
Silver
ea1c370368
Make Float min and max use correct typing
Due to how floating point works with rounding, setting min to `-sys.maxsize` and max to `sys.maxsize` will result in following error:
```
* PrimitiveFloat 969:
  - Value -9.223372036854776e+18 smaller than min of -9223372036854775807: value
```

The error arises because the floating-point approximation (-9.223372036854776e+18) is slightly smaller (i.e., more negative) than the precise integer value of -sys.maxsize (-9223372036854775807). 

Alternative approach would be to use sys.float_info.min and sys.float_info.max instead but that range might seem a bit excessive for a primitive node.
2025-09-08 11:09:00 +02:00
3 changed files with 5 additions and 4 deletions

View File

@ -171,9 +171,10 @@ def get_outputs_summary(outputs: dict) -> tuple[int, Optional[dict]]:
continue
for item in items:
count += 1
if not isinstance(item, dict):
continue
count += 1
if preview_output is None and is_previewable(media_type, item):
enriched = {

View File

@ -56,7 +56,7 @@ class EmptyHunyuanLatentVideo(io.ComfyNode):
@classmethod
def execute(cls, width, height, length, batch_size=1) -> io.NodeOutput:
latent = torch.zeros([batch_size, 16, ((length - 1) // 4) + 1, height // 8, width // 8], device=comfy.model_management.intermediate_device())
return io.NodeOutput({"samples":latent})
return io.NodeOutput({"samples": latent, "downscale_ratio_spacial": 8})
generate = execute # TODO: remove
@ -73,7 +73,7 @@ class EmptyHunyuanVideo15Latent(EmptyHunyuanLatentVideo):
def execute(cls, width, height, length, batch_size=1) -> io.NodeOutput:
# Using scale factor of 16 instead of 8
latent = torch.zeros([batch_size, 32, ((length - 1) // 4) + 1, height // 16, width // 16], device=comfy.model_management.intermediate_device())
return io.NodeOutput({"samples": latent})
return io.NodeOutput({"samples": latent, "downscale_ratio_spacial": 16})
class HunyuanVideo15ImageToVideo(io.ComfyNode):

View File

@ -66,7 +66,7 @@ class Float(io.ComfyNode):
display_name="Float",
category="utils/primitive",
inputs=[
io.Float.Input("value", min=-sys.maxsize, max=sys.maxsize, step=0.1),
io.Float.Input("value", min=float(-sys.maxsize), max=float(sys.maxsize), step=0.1),
],
outputs=[io.Float.Output()],
)