improve tests

This commit is contained in:
doctorpangloss 2025-12-09 19:51:55 -08:00
parent f294c5d401
commit e9d5210fcc
2 changed files with 6 additions and 1 deletions

View File

@ -34,7 +34,7 @@ class EmptyLatentAudio(IO.ComfyNode):
)
@classmethod
def execute(cls, seconds, batch_size) -> IO.NodeOutput:
def execute(cls, seconds=47.6, batch_size=1) -> IO.NodeOutput:
length = round((seconds * 44100 / 2048) / 2) * 2
latent = torch.zeros([batch_size, 64, length], device=comfy.model_management.intermediate_device())
return IO.NodeOutput({"samples": latent, "type": "audio"})

View File

@ -60,7 +60,12 @@ def _generate_config_params():
@pytest.fixture(scope="function", autouse=False, params=_generate_config_params())
async def client(tmp_path_factory, request) -> AsyncGenerator[Any, Any]:
config = default_configuration()
# this should help things go a little faster
config.disable_all_custom_nodes = True
# this enables compilation
config.disable_pinned_memory = True
config.update(request.param)
# use ProcessPoolExecutor to respect various config settings
async with Comfy(configuration=config, executor=ProcessPoolExecutor(max_workers=1)) as client:
yield client