{"record":{"id":"b34f85081d9f5a6b","repo":"Comfy-Org/ComfyUI","slug":"i-is-not-allowed-in-the-prompt-use-the-approp","errorCode":null,"errorMessage":"--{i} is not allowed in the prompt, use the appropriated widget input to change this value.","messagePattern":"--(.+?) is not allowed in the prompt, use the appropriated widget input to change this value\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance.py","lineNumber":1978,"sourceCode":"            f\"--duration {duration} \"\n            f\"--seed {seed} \"\n            f\"--watermark {str(watermark).lower()}\"\n        )\n        x = [\n            TaskTextContent(text=prompt),\n            *[TaskImageContent(image_url=TaskImageContentUrl(url=str(i)), role=\"reference_image\") for i in image_urls],\n        ]\n        return await process_video_task(\n            cls,\n            payload=Image2VideoTaskCreationRequest(model=model, content=x, generate_audio=None),\n            estimated_duration=max(1, math.ceil(VIDEO_TASKS_EXECUTION_TIME[model][resolution] * (duration / 10.0))),\n        )\n\n\ndef raise_if_text_params(prompt: str, text_params: list[str]) -> None:\n    for i in text_params:\n        if f\"--{i} \" in prompt:\n            raise ValueError(\n                f\"--{i} is not allowed in the prompt, use the appropriated widget input to change this value.\"\n            )\n\n\nPRICE_BADGE_VIDEO = IO.PriceBadge(\n    depends_on=IO.PriceBadgeDepends(widgets=[\"model\", \"duration\", \"resolution\", \"generate_audio\"]),\n    expr=\"\"\"\n    (\n      $priceByModel := {\n        \"seedance-1-5-pro\": {\n          \"480p\":[0.12,0.12],\n          \"720p\":[0.26,0.26],\n          \"1080p\":[0.58,0.59]\n        },\n        \"seedance-1-0-pro\": {\n          \"480p\":[0.23,0.24],\n          \"720p\":[0.51,0.56],\n          \"1080p\":[1.18,1.22]","sourceCodeStart":1960,"sourceCodeEnd":1996,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance.py#L1960-L1996","documentation":"Raised by raise_if_text_params (nodes_bytedance.py:1978), called by the Seedance video nodes, when the prompt string contains a '--<param> ' fragment for any of the parameters the node already injects itself (resolution, ratio, duration, seed, camerafixed, watermark). The node appends these as command-style flags to the prompt, so user-supplied duplicates would conflict or inject arbitrary values.","triggerScenarios":"A prompt literally containing e.g. '--resolution 720p ', '--ratio 16:9 ', '--duration 5 ', '--seed 123 ', '--camerafixed true ' or '--watermark false ' (trailing space required by the ' f\"--{i} \"' check) on any Seedance text/image/first-last video node.","commonSituations":"Copying prompts from BytePlus/Volcano Engine docs or other tools where Seedance is driven by inline flags; prompt templates reused from Dannadori/other frontends that embed Seedance parameters in text.","solutions":["Remove inline flags from the prompt and set the values in the node's widgets (resolution, aspect_ratio, duration, seed, camera_fixed, watermark).","If the literal text is stylistically needed, avoid the exact '--flag ' pattern (no trailing space) — but the intended fix is using widgets.","Sanitize external prompts programmatically before feeding the node."],"exampleFix":"# before\nprompt = \"a drone shot of a city --resolution 720p --duration 5\"\n# -> raises on '--resolution '\n\n# after\nprompt = \"a drone shot of a city\"\n# set resolution='720p', duration=5 in the node widgets","handlingStrategy":"validation","validationCode":"import re\nTEXT_PARAMS = ['resolution', 'ratio', 'duration', 'seed', 'camerafixed', 'watermark']\ndef sanitize_prompt(prompt: str) -> str:\n    return re.sub(r'--(?:' + '|'.join(TEXT_PARAMS) + r')\\s+\\S+', '', prompt).strip()","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never paste '--flag value' text from Volcano/BytePlus docs into Seedream prompts; use widgets.","Sanitize external/template prompts with the regex above before the node runs."],"tags":["bytedance","seedance","prompt-validation","video","api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}