diff --git a/clientlibs/utils.js b/clientlibs/utils.js index f056eaf..49ad500 100644 --- a/clientlibs/utils.js +++ b/clientlibs/utils.js @@ -1347,6 +1347,7 @@ function videoInferenceDimensionsHandler(videoInferenceNode) { "klingai:3@1": {width: 1280, height: 720}, "klingai:3@2": {width: 1920, height: 1080}, "klingai:4@3": {width: 1280, height: 720}, "klingai:5@1": {width: 1280, height: 720}, "klingai:5@2": {width: 1920, height: 1080}, "klingai:5@3": {width: 1920, height: 1080}, + "klingai:6@1": {width: 1920, height: 1080}, "klingai:7@1": {width: 0, height: 0}, "google:2@0": {width: 1280, height: 720}, "google:3@0": {width: 1280, height: 720}, "google:3@1": {width: 1280, height: 720}, "google:3@2": {width: 1280, height: 720}, @@ -1568,6 +1569,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) { "klingai:3@1 (KlingAI V1.6 Standard)", "klingai:3@2 (KlingAI V1.6 Pro)", "klingai:4@3 (KlingAI V2.1 Master)", "klingai:5@1 (KlingAI V2.1 Standard (I2V))", "klingai:5@2 (KlingAI V2.1 Pro (I2V))", "klingai:5@3 (KlingAI V2.0 Master)", + "klingai:6@1 (KlingAI 2.5 Turbo Pro)", "klingai:7@1 (KlingAI Lip-Sync)", ], "Veo": [ @@ -1626,6 +1628,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) { "klingai:5@1": {"width": 1280, "height": 720}, "klingai:5@2": {"width": 1920, "height": 1080}, "klingai:5@3": {"width": 1920, "height": 1080}, + "klingai:6@1": {"width": 1920, "height": 1080}, "klingai:7@1": {"width": 0, "height": 0}, "google:2@0": {"width": 1280, "height": 720}, "google:3@0": {"width": 1280, "height": 720}, diff --git a/modules/frameImages.py b/modules/frameImages.py index d1ccdd7..2e6372f 100644 --- a/modules/frameImages.py +++ b/modules/frameImages.py @@ -50,7 +50,7 @@ class RunwareFrameImages: def _createFrameData(self, image, position): """Create frame data object from image and position""" - imageData = rwUtils.convertTensor2IMG(image) + imageData = rwUtils.convertTensor2IMGBase64Only(image) frameData = {"inputImage": imageData} if position != "auto": diff --git a/modules/utils/runwareUtils.py b/modules/utils/runwareUtils.py index 8c2a4d5..777cf5a 100644 --- a/modules/utils/runwareUtils.py +++ b/modules/utils/runwareUtils.py @@ -467,6 +467,20 @@ def convertTensor2IMG(tensorImage): +def convertTensor2IMGBase64Only(tensorImage): + """Convert tensor to base64 data URI without caching - for frame images""" + imageNP = (tensorImage.squeeze().numpy() * 255).astype(np.uint8) + image = Image.fromarray(imageNP) + + with io.BytesIO() as buffer: + image.save(buffer, format="PNG") + imageRawData = buffer.getvalue() + imgb64 = base64.b64encode(imageRawData).decode("utf-8") + imgDataUri = f"data:image/png;base64,{imgb64}" + + return imgDataUri + + def convertTensor2IMGForVideo(tensorImage): """Convert tensor to image and force upload to get UUID for video frame images""" imageNP = (tensorImage.squeeze().numpy() * 255).astype(np.uint8) diff --git a/modules/videoInputsFrame.py b/modules/videoInputsFrame.py index 9191644..1a30456 100644 --- a/modules/videoInputsFrame.py +++ b/modules/videoInputsFrame.py @@ -49,8 +49,8 @@ class RunwareVideoInputsFrameImages: return (frameImages,) def _createFrameEntry(self, image, frameLabel): - imageData = rwUtils.convertTensor2IMG(image) - entry = {"image": imageData} + imageData = rwUtils.convertTensor2IMGBase64Only(image) + entry = {"inputImage": imageData} if isinstance(frameLabel, str) and frameLabel.strip() != "": if frameLabel.strip().isdigit(): diff --git a/modules/videoModelSearch.py b/modules/videoModelSearch.py index cb53edf..9687055 100644 --- a/modules/videoModelSearch.py +++ b/modules/videoModelSearch.py @@ -14,6 +14,7 @@ class videoModelSearch: "klingai:5@1 (KlingAI V2.1 Standard (I2V))", "klingai:5@2 (KlingAI V2.1 Pro (I2V))", "klingai:5@3 (KlingAI V2.0 Master)", + "klingai:6@1 (KlingAI 2.5 Turbo Pro)", "klingai:7@1 (KlingAI Lip-Sync)", ], "Veo": [ @@ -89,6 +90,7 @@ class videoModelSearch: "klingai:5@1": {"width": 1280, "height": 720}, "klingai:5@2": {"width": 1920, "height": 1080}, "klingai:5@3": {"width": 1920, "height": 1080}, + "klingai:6@1": {"width": 1920, "height": 1080}, "klingai:7@1": {"width": 0, "height": 0}, # Veo Models