mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-30 00:00:26 +08:00
Fix unexpected None type for images
This commit is contained in:
parent
d4218f3f19
commit
3a3e31a0a5
@ -67,6 +67,7 @@ class OpenAILanguageModelWrapper(LanguageModel):
|
|||||||
prompt = tokens.get("inputs", [])
|
prompt = tokens.get("inputs", [])
|
||||||
prompt = "".join(prompt)
|
prompt = "".join(prompt)
|
||||||
images = tokens.get("images", [])
|
images = tokens.get("images", [])
|
||||||
|
images = [image for image in images if image is not None]
|
||||||
messages: list[ChatCompletionMessageParam] = [
|
messages: list[ChatCompletionMessageParam] = [
|
||||||
{
|
{
|
||||||
"role": "user",
|
"role": "user",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user