Merge branch 'master' into codex/rocm-gate-comfy-kitchen

This commit is contained in:
野生の男 2026-08-13 00:09:26 +09:00 committed by GitHub
commit 4a23bdc376
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 38 additions and 3 deletions

View File

@ -37,7 +37,7 @@
ComfyUI is the AI creation engine for visual professionals who demand control over every model, every parameter, and every output. Its powerful and modular node graph interface empowers creatives to generate images, videos, 3D models, audio, and more...
- ComfyUI natively supports the latest open-source state of the art models.
- API nodes provide access to the best closed source models such as Nano Banana, Seedance, Hunyuan3D, etc.
- [Partner nodes](https://docs.comfy.org/tutorials/partner-nodes/overview#partner-nodes) provide access to the best closed source models such as Nano Banana, Seedance, Hunyuan3D, etc.
- It is available on Windows, Linux, and macOS, locally with our [desktop application](https://www.comfy.org/download), our [portable install](#installing) or on our [cloud](https://www.comfy.org/cloud).
- The most sophisticated workflows can be exposed through a simple UI thanks to App Mode.
- It integrates seamlessly into production pipelines with our API endpoints.

View File

@ -22,6 +22,7 @@ import torch
import torch.nn.functional as F
from einops import rearrange
from torch import nn
import comfy.model_management
from comfy.ldm.lightricks.model import get_timestep_embedding
from .causal_video_autoencoder import Encoder, processor
@ -74,8 +75,12 @@ def default_rope_dim_split(head_dim):
def rope_inv_freqs(dim, base=10000.0, device=None):
out_device = device
if not comfy.model_management.supports_fp64(device):
device = torch.device("cpu")
exponents = torch.arange(0, dim, 2, dtype=torch.float64, device=device) / dim
return (1.0 / torch.pow(torch.tensor(float(base), dtype=torch.float64, device=device), exponents)).to(torch.float32)
return (1.0 / torch.pow(torch.tensor(float(base), dtype=torch.float64, device=device), exponents)).to(dtype=torch.float32, device=out_device)
def _rope_tables(lengths, inv_freqs, device):

View File

@ -29,7 +29,7 @@ class PreviewAny():
value = str(source)
elif source is not None:
try:
value = json.dumps(source, indent=4)
value = json.dumps(source, indent=4, ensure_ascii=False)
except Exception:
try:
value = str(source)

View File

@ -0,0 +1,30 @@
from unittest.mock import patch, MagicMock
mock_nodes = MagicMock()
mock_nodes.MAX_RESOLUTION = 16384
mock_server = MagicMock()
with patch.dict("sys.modules", {"nodes": mock_nodes, "server": mock_server}):
from comfy_extras.nodes_preview_any import PreviewAny
class TestPreviewAnyMain:
@staticmethod
def _exec(source) -> dict:
return PreviewAny().main(source)
def test_dict_keeps_non_ascii(self):
result = self._exec({"greeting": "你好"})
assert "你好" in result["ui"]["text"][0]
assert "\\u" not in result["ui"]["text"][0]
assert result["result"][0] == result["ui"]["text"][0]
def test_list_keeps_non_ascii(self):
result = self._exec(["你好", "こんにちは"])
assert "こんにちは" in result["result"][0]
assert "\\u" not in result["result"][0]
def test_string_passthrough(self):
result = self._exec("你好")
assert result["ui"]["text"][0] == "你好"
assert result["result"][0] == "你好"