mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-21 23:41:28 +08:00
Fix compatibility with Python 3.9, 3.10, fix Configuration class declaration issue
This commit is contained in:
@@ -3,6 +3,7 @@ import asyncio
|
||||
import pytest
|
||||
import torch
|
||||
|
||||
from comfy.cli_args_types import Configuration
|
||||
from comfy.client.embedded_comfy_client import EmbeddedComfyClient
|
||||
from comfy.client.sdxl_with_refiner_workflow import sdxl_workflow_with_refiner
|
||||
|
||||
@@ -34,6 +35,14 @@ async def test_embedded_comfy():
|
||||
outputs = await client.queue_prompt(prompt)
|
||||
assert outputs["13"]["images"][0]["abs_path"] is not None
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_configuration_options():
|
||||
config = Configuration()
|
||||
async with EmbeddedComfyClient(configuration=config) as client:
|
||||
prompt = sdxl_workflow_with_refiner("test")
|
||||
outputs = await client.queue_prompt(prompt)
|
||||
assert outputs["13"]["images"][0]["abs_path"] is not None
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_multithreaded_comfy():
|
||||
async with EmbeddedComfyClient(max_workers=2) as client:
|
||||
|
||||
Reference in New Issue
Block a user