fix tests, make fixture of core workflow test function to reclaim RAM better

This commit is contained in:
doctorpangloss 2025-10-21 10:37:25 -07:00
parent f54af2c7ff
commit 358cb834d6
6 changed files with 9 additions and 10 deletions

View File

@ -159,7 +159,7 @@ class FrontendManager:
@classmethod
def get_required_templates_version(cls) -> str:
# returns a stub, since this isn't a helpful check in this environment
return "0.0.1"
return "0.1.95"
@classmethod
def default_frontend_path(cls) -> str:

View File

@ -155,8 +155,6 @@ SENSITIVE_EXTRA_DATA_KEYS = ("auth_token_comfy_org", "api_key_comfy_org")
def get_input_data(inputs, class_def, unique_id, execution_list=None, dynprompt=None, extra_data=None):
if extra_data is None:
extra_data = {}
if outputs is None:
outputs = {}
is_v3 = issubclass(class_def, _ComfyNodeInternal)
if is_v3:
valid_inputs, schema = class_def.INPUT_TYPES(include_hidden=False, return_schema=True)

View File

@ -81,7 +81,7 @@ try:
if torch.backends.cudnn.version() >= 91002 and model_management.torch_version_numeric >= (2, 9) and model_management.torch_version_numeric <= (2, 10):
# TODO: change upper bound version once it's fixed'
NVIDIA_MEMORY_CONV_BUG_WORKAROUND = True
logger.info("working around nvidia conv3d memory bug.")
logger.debug("working around nvidia conv3d memory bug.")
except:
pass

View File

@ -64,7 +64,7 @@ class LTXVImgToVideo(io.ComfyNode):
)
@classmethod
def execute(cls, positive, negative, image, vae, width, height, length, batch_size, strength) -> io.NodeOutput:
def execute(cls, positive, negative, image, vae, width, height, length, batch_size, strength=1.0) -> io.NodeOutput:
pixels = comfy.utils.common_upscale(image.movedim(-1, 1), width, height, "bilinear", "center").movedim(1, -1)
encode_pixels = pixels[:, :, :, :3]
t = vae.encode(encode_pixels)

View File

@ -12,7 +12,7 @@ from comfy_extras.nodes.nodes_audio import TorchAudioNotFoundError
from . import workflows
@pytest.fixture(scope="module", autouse=False)
@pytest.fixture(scope="function", autouse=False)
async def client(tmp_path_factory) -> Comfy:
async with Comfy() as client:
yield client

View File

@ -207,6 +207,7 @@ numpy"""
assert version is None
@pytest.mark.skip("not used in this fork")
def test_get_templates_version():
# Arrange
expected_version = "0.1.41"
@ -224,7 +225,7 @@ numpy"""
# Assert
assert version == expected_version
@pytest.mark.skip("not used in this fork")
def test_get_templates_version_not_found():
# Arrange
mock_requirements_content = """torch
@ -240,7 +241,7 @@ numpy"""
# Assert
assert version is None
@pytest.mark.skip("not used in this fork")
def test_get_templates_version_invalid_semver():
# Arrange
mock_requirements_content = """torch
@ -256,7 +257,7 @@ numpy"""
# Assert
assert version is None
@pytest.mark.skip("not used in this fork")
def test_get_installed_templates_version():
# Arrange
expected_version = "0.1.40"
@ -268,7 +269,7 @@ def test_get_installed_templates_version():
# Assert
assert version == expected_version
@pytest.mark.skip("not used in this fork")
def test_get_installed_templates_version_not_installed():
# Act
with patch("app.frontend_management.version", side_effect=Exception("Package not found")):