Metadata-Version: 2.4
Name: bizytrd
Version: 0.1.18
Summary: Registry-driven ComfyUI nodes for BizyAir third-party model access
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Requires-Dist: aiohttp>=3.9
Requires-Dist: platformdirs>=4.0.0

# bizytrd

[![PyPI](https://img.shields.io/pypi/v/bizytrd.svg)](https://pypi.org/project/bizytrd/)
[![Python](https://img.shields.io/pypi/pyversions/bizytrd.svg)](https://pypi.org/project/bizytrd/)

**bizytrd** gives ComfyUI ready-to-use nodes for third-party generative models — video, image, audio, and text — served through the BizyAir platform. It also ships a standalone Python SDK (`bizytrd_sdk`) for calling the same models outside ComfyUI.

Wire a node into your graph, type a prompt, and get results back as native ComfyUI outputs. Media upload, task polling, and result conversion are handled for you.

## Installation

```bash
pip install bizytrd
```

Requires Python 3.10+.

If you use ComfyUI, you normally get bizytrd through a BizyAir host plugin (for example `BizyAir-CloudBerry` or `BizyAirCloudPlugin`): their `requirements.txt` pulls in bizytrd automatically when the plugin is installed.

> Note: importing `bizytrd` itself requires a ComfyUI runtime. To call the models from plain Python scripts or services, use the SDK instead — it has no ComfyUI dependency.

## Configuration

Nodes authenticate against the BizyAir platform with a single API key — no per-node settings.

Pick one of the following (in order of recommendation):

1. Environment variable:

   ```bash
   export BIZYAIR_API_KEY=sk-your-key
   ```

2. An `api_key.ini` file on the search path (for example `~/.bizytrd/api_key.ini` or next to your ComfyUI install):

   ```ini
   [auth]
   api_key = sk-your-key
   ```

3. Existing host-plugin config `~/.BizyAirPlus/apikey.ini` is picked up automatically, so users of the BizyAirPlus plugin do not need to configure anything twice.

Advanced overrides (base URLs, timeouts, polling intervals) are listed in the [SDK guide](docs/BIZYTRD_SDK_GUIDE.md).

## Supported models

The node catalog is generated from the BizyAir model catalog, so new models appear as they are enabled on the platform — no code change and no new release needed. Representative families currently available:

- **Video** — Wan 2.7, Seedance 2.0 (incl. mini / fast), Google Veo 3.1 (fast / lite / pro), Kling (o3 / 3.0), Vidu Q3 (pro / turbo), Grok Imagine, Skyreels v4, DreamActor 2.0, HappyHorse 1.0, Hailuo 2.3
- **Image** — GPT-Image 2, Qwen-Image 2.0 / Pro, Nano-Banana (2 / Pro), Seedream 4.5 / 5.0, Grok Image, Flux Klein, Ideogram 4, Z-Image / Z-Image Turbo, SeedVR2 upscale, and image-editing utilities (Birefnet, Kontext-Dev-LoRA)
- **Music & audio** — Mureka (v7.6 – v9, incl. song generation, lyrics, BGM), Ace-Step, Qwen3-TTS custom voice
- **Text & vision LLM** — Gemini 3.5 / 3.6 Flash (LLM / VLM), SiliconFlow chat & vision nodes, Joycaption3 captioning
- **3D** — Tripo3D H3.1, Pixal3D

Each node appears in ComfyUI under the **BizyTRD** category, with localized (Chinese) names and tooltips when ComfyUI runs in a Chinese locale.

## Python SDK quickstart

```python
import asyncio

from bizytrd_sdk import AsyncBizyTRD


async def main():
    async with AsyncBizyTRD(api_key="sk-your-key") as client:
        task = await client.create_task(
            "wan2.7-image",
            {"model": "wan2.7-image-pro", "prompt": "a cinematic mountain lake at sunrise"},
        )
        result = await client.wait_for_task(task.request_id)
        downloaded = await client.download_outputs(result.outputs)
        print("urls:", downloaded.urls)


asyncio.run(main())
```

A matching sync client (`BizyTRD`) covers uploads and everything the async client does not. Full usage: [SDK guide](docs/BIZYTRD_SDK_GUIDE.md).

## Using bizytrd from your own plugin

```python
from pathlib import Path

from bizytrd import get_node_mappings, sync_web_assets

NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS = get_node_mappings()
sync_web_assets(Path(__file__).resolve().parent / "web")
```

This merges all BizyTRD nodes into your plugin's mappings and syncs the bundled frontend assets (price badges, auto-grow inputs, localization) into your plugin's web directory. See the [development guide](docs/BIZYTRD_DEV_GUIDE.md) for the full integration API.

## Project & docs

- [SDK guide](docs/BIZYTRD_SDK_GUIDE.md) — complete SDK usage (clients, config, error types)
- [Development guide](docs/BIZYTRD_DEV_GUIDE.md) — architecture, repository layout, release pipeline, roadmap (for contributors and integrators)
- [AGENTS.md](AGENTS.md) — engineering commands: environment setup, tests, lint, CI

Source: <https://github.com/siliconflow/bizytrd>. Releases are published to <https://pypi.org/project/bizytrd/>.
