mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 23:00:51 +08:00
- Run comfyui workflows directly inside other python applications using EmbeddedComfyClient. - Optional telemetry in prompts and models using anonymity preserving Plausible self-hosted or hosted. - Better OpenAPI schema - Basic support for distributed ComfyUI backends. Limitations: no progress reporting, no easy way to start your own distributed backend, requires RabbitMQ as a message broker.
20 lines
780 B
Python
20 lines
780 B
Python
import pytest
|
|
from comfy.client.aio_client import AsyncRemoteComfyClient
|
|
from comfy.client.sdxl_with_refiner_workflow import sdxl_workflow_with_refiner
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_completes_prompt(comfy_background_server):
|
|
client = AsyncRemoteComfyClient()
|
|
prompt = sdxl_workflow_with_refiner("test", inference_steps=1, refiner_steps=1)
|
|
png_image_bytes = await client.queue_prompt(prompt)
|
|
assert len(png_image_bytes) > 1000
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_completes_prompt_with_ui(comfy_background_server):
|
|
client = AsyncRemoteComfyClient()
|
|
prompt = sdxl_workflow_with_refiner("test", inference_steps=1, refiner_steps=1)
|
|
result_dict = await client.queue_prompt_ui(prompt)
|
|
# should contain one output
|
|
assert len(result_dict) == 1
|