Files
Mattia Moretti c58a16a401 docs: update README to reflect exhaustive parameter support and new features
Update the README to align with the latest node capabilities, shifting the description from "granular nodes" to "exhaustive control" over all API parameters. Key changes include documenting new features like live tooltips, metadata recovery (actual_seed), and improved batch processing. The node reference was also updated to clearly distinguish between required and optional parameters and to reflect the latest supported models.
2026-05-12 15:18:25 +02:00

26 lines
750 B
Python

"""
base.py — Base classes for SiliconFlow nodes.
"""
from .api_client import run_inference
from .utils import bytes_to_tensor
class SiliconFlowBaseNode:
CATEGORY = "SiliconFlow"
RETURN_TYPES = ("IMAGE", "INT")
RETURN_NAMES = ("image", "seed")
FUNCTION = "generate"
OUTPUT_NODE = False
def _generate_common(self, model, prompt, **kwargs):
try:
image_bytes_list, actual_seed = run_inference(
model=model,
prompt=prompt,
**kwargs
)
output_tensor = bytes_to_tensor(image_bytes_list)
return (output_tensor, actual_seed)
except Exception as e:
raise RuntimeError(f"[SiliconFlow] Inference error: {e}")