SillyTavern/SillyTavern · error · Error
ComfyUI RunPod returned an error.
Error message
ComfyUI RunPod returned an error.
What it means
Thrown by validateComfyRunPodUrl() when the POST to /api/sd/comfyrunpod/ping returns a non-2xx status. The server proxy pings the RunPod serverless ComfyUI endpoint. Catch surfaces 'Could not validate ComfyUI RunPod API: ComfyUI RunPod returned an error.'
Source
Thrown at public/scripts/extensions/stable-diffusion/index.js:1477
toastr.error(`Could not validate ComfyUI API: ${error.message}`);
}
}
async function validateComfyRunPodUrl() {
try {
if (!extension_settings.sd.comfy_runpod_url) {
throw new Error('URL is not set.');
}
const result = await fetch('/api/sd/comfyrunpod/ping', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify({
url: extension_settings.sd.comfy_runpod_url,
}),
});
if (!result.ok) {
throw new Error('ComfyUI RunPod returned an error.');
}
await loadSettingOptions();
toastr.success('ComfyUI RunPod API connected.');
} catch (error) {
toastr.error(`Could not validate ComfyUI RunPod API: ${error.message}`);
}
}
async function onModelChange() {
const selectedModel = $('#sd_model').find(':selected');
extension_settings.sd.model = selectedModel.val();
saveSettingsDebounced();
if (extension_settings.sd.model && extension_settings.sd.source === sources.electronhub) {
const cachedModel = selectedModel.data('model');
const models = cachedModel ? [cachedModel] : await loadElectronHubModels();
ensureElectronHubQualitySelect(models);View on GitHub (pinned to 8172dcd0ee)
Solutions
- Check the SillyTavern server console for the real upstream error returned by /api/sd/comfyrunpod/ping.
- Confirm the RunPod serverless endpoint ID/URL is current and the deployment is running (check RunPod dashboard).
- Verify the RUNPOD_API_KEY is set on the SillyTavern server and valid.
- Retry once — serverless cold starts can fail the first ping.
Defensive patterns
Strategy: retry
Try / catch
async function validateWithRetry(max = 2) {
for (let i = 0; i <= max; i++) {
try { await validateComfyRunPodUrl(); return; }
catch (e) {
if (i === max || /not set/i.test(e.message)) throw e;
await new Promise(r => setTimeout(r, 2000 * (i + 1))); // backoff for cold starts
}
}
} Prevention
- Warm the RunPod serverless endpoint before validating (cold starts fail the first ping).
- Confirm RUNPOD_API_KEY is set server-side.
- Keep the deployment active in the RunPod dashboard.
When it happens
Trigger: The RunPod serverless endpoint URL is wrong or the deployment is scaled to zero/cold-starting; the RunPod API key is missing or invalid server-side; the serverless payload template errors; network egress from the SillyTavern host to RunPod is blocked.
Common situations: RunPod serverless ID mistyped; endpoint paused/deleted; cold start timeout exceeded; missing server-side RUNPOD_API_KEY env var.
Related errors
- ComfyUI returned an error.
- Internal Server Error
- Upload failed with status ${result.status}
- Extras API call failed
- Failed to caption image via Multimodal API.
AI-assisted analysis of SillyTavern/SillyTavern@8172dcd0ee (2026-08-13).
Data as JSON: /api/errors/e09d536309014e3b.
Report an issue: GitHub.