-
Notifications
You must be signed in to change notification settings - Fork 149
Pallaidium Remote Backends (one‐click connectors)
Pallaidium can generate through an external backend that speaks a small
OpenAI-style /v1 contract ("Backend Contract v0.1"). The add-on stays
provider-agnostic — it only ever talks HTTP to a URL — so backends are swappable.
The connectors here are stdlib-only: the add-on launches one for you with
Blender's own Python. No pip install, no console.
- Edit → Preferences → Add-ons → Pallaidium → Remote Backend.
- Set Model Source to Remote (or Local & Remote).
- Pick an Adapter from the dropdown:
- Mock — tiny canned media; verifies the wiring with zero setup.
- ComfyUI — forwards to a running ComfyUI (set the ComfyUI URL field; start ComfyUI first).
- fal.ai — cloud models; paste your key in Remote Backend Key.
- Custom URL — connect to a backend you started yourself (type its URL).
- Click Start Backend. The add-on launches the adapter on a free port, fills in the URL, and loads the models. Generate as usual; click Stop Backend when done.
The adapter's log is written to <Blender DATAFILES>/Pallaidium/adapter_<id>.log.
Every ComfyUI "model" is a workflow graph. With the ComfyUI adapter selected:
-
Import Workflow — pick a workflow exported from ComfyUI with
Settings → enable Dev mode → Save (API Format). It's copied into
comfyui_workflows/and becomes a[Remote] <filename>model (the backend auto-reloads if it's running). -
Open Folder — opens
comfyui_workflows/to manage files directly.
Prompt / negative / size / steps / cfg / seed / reference image(s) are injected
into the graph by node title; complex graphs use a <id>.meta.json sidecar
with explicit bindings. Full convention: comfyui_workflows/README.md.
| File | What it does | Config |
|---|---|---|
mock_backend.py |
Canned PNG/WAV/MP4 for every contract path | none |
comfyui_adapter.py |
Maps each model to a ComfyUI workflow graph | ComfyUI URL |
fal_adapter.py |
Forwards to fal.ai's queue REST API | FAL_KEY |
Each ships a <name>.manifest.json that the add-on reads to build the Adapter
dropdown and its config fields. You can still run any of them by hand:
python comfyui_adapter.py --port 8000 --comfyui-url http://127.0.0.1:8188
python fal_adapter.py --port 8000 --fal-key YOUR_KEY
python mock_backend.py --port 8000…then choose Custom URL and point the add-on at http://localhost:8000.
- Create
myservice_adapter.pynext to these. Implement the contract endpoints you need (GET /v1/health,GET /v1/models,POST /v1/images/generationsand/or/v1/videos//v1/audio/speech,GET /v1/jobs/{id},POST /v1/files,GET /v1/files/{id}). The shared helpers in_adapter_http.pygive you a stdlibBaseAdapterHandler, multipart parsing, andurllibJSON/ bytes/multipart calls — copy the structure ofcomfyui_adapter.py. - Add a
myservice_adapter.manifest.json:{ "id": "myservice", "label": "My Service", "entry": "myservice_adapter.py", "order": 3, "description": "What it does.", "default_port": 8000, "config_fields": [ {"key": "MYSERVICE_KEY", "arg": "--key", "pref": "remote_backend_key", "label": "API Key", "type": "secret", "default": ""} ], "supports_workflow_import": false }config_fields[].prefnames the Blender preference the value comes from (remote_backend_keyfor a secret, orcomfyui_url); each becomes both an env var (key) and, ifargis set, a CLI flag. - Restart Blender — your connector appears in the Adapter dropdown. No add-on code changes needed. Keep it stdlib-only so the add-on can launch it.
GET /v1/health, GET /v1/models, POST /v1/videos,
POST /v1/images/generations, POST /v1/audio/speech,
POST /v1/audio/transcriptions, POST /v1/files, GET /v1/files/{id},
GET /v1/jobs/{id}. A backend only needs the endpoints for the capabilities it
offers. See ../docs/BACKEND_CONTRACT_EXTENSIONS.md
for discovery hints (display_name, max_ref_images, default_steps, …).