fix(Kling Image API Node): do not pass "image_type" when no image (#9271)

* fix(Kling Image API Node): do not pass "image_type" when no image

* fix(Kling Image API Node): raise client-side error when kling_v1 is used with reference image
This commit is contained in:
Alexander Piskun 2025-08-12 00:15:14 +03:00 committed by GitHub
parent 2208aa616d
commit f4231a80b1

View File

@ -1690,7 +1690,11 @@ class KlingImageGenerationNode(KlingImageGenerationBase):
):
self.validate_prompt(prompt, negative_prompt)
if image is not None:
if image is None:
image_type = None
elif model_name == KlingImageGenModelName.kling_v1:
raise ValueError(f"The model {KlingImageGenModelName.kling_v1.value} does not support reference images.")
else:
image = tensor_to_base64_string(image)
initial_operation = SynchronousOperation(