Auto-generated nodes for the entire live fal catalog (1,391 models → 1,482 total nodes) built at startup from a committed registry, plus a full rewrite of the core layer. All 87 v1 node keys, inputs and outputs are preserved — existing workflows load and run unchanged. New: - data/fal_registry.json + scripts/build_registry.py: distills fal's catalog and per-endpoint OpenAPI schemas into a deterministic registry - nodes/dynamic/: schema→node factory (typed widgets, tooltips, pricing in node help, IMAGE/VIDEO/AUDIO auto-upload, native VIDEO/AUDIO outputs, seed -1=random, force_rerun), plus a generic Fal Any Endpoint node for arbitrary endpoints - nodes/utils/: rewritten core — FalApiError surfacing fal's real error payloads, queue progress logs, ComfyUI cancel support, retries and timeouts everywhere, parallel uploads/downloads, structured logging - tests/ (45 tests incl. a legacy-key snapshot lock), CI lint+test workflow, weekly registry-refresh workflow that opens a PR on changes - README regenerated from the registry (scripts/build_readme.py) Fixed: - GPTImage2 / GPTImage2Edit were defined but never registered - Topaz video upscale sent a nonexistent API field (desired_increase) - SeedVR video upscaler had its error handling commented out + wrong model label; ProRes enum value mismatch translated at argument level - 10x `is ""` comparisons, bare excepts, missing HTTP timeouts, temp-file leaks, fps=0 crash in LoadVideoURL, duplicate enum entry - opencv-python & friends missing from pyproject (Registry installs) - API failures now raise visible errors instead of silently returning blank images or "Error:" strings that downstream nodes tried to load BREAKING (behavioral only): failed API calls raise instead of returning blank/black images or error strings. Node signatures are unchanged.
39 lines
920 B
Python
39 lines
920 B
Python
"""Shared model/input fixture builders for the dynamic-node tests."""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
def _model(inputs, **overrides):
|
|
base = {
|
|
"endpoint_id": "fal-ai/test/model",
|
|
"title": "Test Model",
|
|
"category": "text-to-image",
|
|
"lab": "Test Lab",
|
|
"family": "",
|
|
"description": "",
|
|
"pricing": "",
|
|
"published_at": "2026-01-01T00:00:00Z",
|
|
"thumbnail": "",
|
|
"inputs": inputs,
|
|
"output_kind": "images",
|
|
"output_props": ["images"],
|
|
}
|
|
return {**base, **overrides}
|
|
|
|
|
|
def _input(name, type_, **kw):
|
|
base = {
|
|
"name": name,
|
|
"type": type_,
|
|
"required": False,
|
|
"default": None,
|
|
"enum": None,
|
|
"min": None,
|
|
"max": None,
|
|
"description": "",
|
|
"media_kind": None,
|
|
"is_list": False,
|
|
"multiline": False,
|
|
}
|
|
return {**base, **kw}
|