Comfy-Org/ComfyUI · error · ValueError
Model refused to respond: {block.refusal}
Error message
Model refused to respond: {block.refusal} What it means
Raised while parsing a ByteDance Seed (LLM) responses-API reply: an output message contained a content block of type 'refusal' with non-empty text. This mirrors the OpenAI-style Responses API refusal mechanism — the model (or its safety layer) declined to answer, and the refusal text is passed through verbatim.
Source
Thrown at comfy_api_nodes/nodes_bytedance_llm.py:82
tooltip="Controls randomness. 0.0 is deterministic, higher values are more random.",
advanced=True,
),
]
def _get_text_from_response(response: BytePlusResponseObject) -> str:
"""Extract concatenated text from all assistant message output_text blocks."""
if not response.output:
return ""
chunks: list[str] = []
for item in response.output:
if item.type != "message" or not item.content:
continue
for block in item.content:
if block.type == "output_text" and block.text:
chunks.append(block.text)
elif block.type == "refusal" and block.refusal:
raise ValueError(f"Model refused to respond: {block.refusal}")
return "\n".join(chunks)
async def _build_image_content_blocks(
cls: type[IO.ComfyNode],
image_tensors: list[Input.Image],
) -> list[BytePlusInputImage]:
urls = await upload_images_to_comfyapi(
cls,
image_tensors,
max_images=SEED_MAX_IMAGES,
wait_label="Uploading reference images",
)
return [BytePlusInputImage(image_url=url) for url in urls]
async def _build_video_content_blocks(
cls: type[IO.ComfyNode],View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Read the refusal text in the error — it usually states which policy was hit.
- Rephrase the prompt to remove the triggering content or framing.
- Move the sensitive constraint into the system_prompt with a professional, clinical framing if it is legitimate.
- Try a different Seed model from the model dropdown if one is available with different filtering.
Defensive patterns
Strategy: try-catch
Try / catch
try:
result = await seed_node.execute(...)
except ValueError as e:
if "refused to respond" in str(e):
# policy refusal: rephrase prompt, do not retry unchanged
return fallback_text Prevention
- Keep prompts within the provider's content policy.
- Watch system prompts too — restrictive instructions can induce refusals.
- Have a fallback phrasing ready for automated pipelines that hit refusals.
When it happens
Trigger: A chat/completions call to BYTEPLUS_RESPONSES_ENDPOINT returns an assistant message whose content includes {type: 'refusal', refusal: '...'} — typically triggered by prompts the safety filter classifies as disallowed.
Common situations: Prompts touching violence, personal data, or other policy categories; jailbreak-adjacent phrasing; regionally restricted topics; occasionally over-triggering on benign medical/security research wording.
Related errors
- Seed Audio returned no audio (code={response.code}): {respon
- Up to {SEED_MAX_IMAGES} images are supported per request.
- Up to {SEED_MAX_VIDEOS} videos are supported per request.
- Seed API error ({response.error.code}): {response.error.mess
- Empty response from Seed model.
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/a74ae500c40a5678.
Report an issue: GitHub.