More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
"""
|
|
|
|
|
API Nodes for Gemini Multimodal LLM Usage via Remote API
|
|
|
|
|
See: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference
|
|
|
|
|
"""
|
2025-10-26 00:35:30 +03:00
|
|
|
|
|
|
|
|
import base64
|
2025-08-22 20:51:14 +03:00
|
|
|
import json
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
import os
|
2025-10-26 00:35:30 +03:00
|
|
|
import time
|
2025-08-22 20:51:14 +03:00
|
|
|
import uuid
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
from enum import Enum
|
2025-10-26 00:35:30 +03:00
|
|
|
from io import BytesIO
|
2025-11-19 00:26:44 +02:00
|
|
|
from typing import Literal
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
|
|
|
|
import torch
|
2025-10-26 00:35:30 +03:00
|
|
|
from typing_extensions import override
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
|
|
|
|
import folder_paths
|
2025-10-26 00:35:30 +03:00
|
|
|
from comfy_api.latest import IO, ComfyExtension, Input
|
|
|
|
|
from comfy_api.util import VideoCodec, VideoContainer
|
2025-11-19 00:26:44 +02:00
|
|
|
from comfy_api_nodes.apis.gemini_api import (
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
GeminiContent,
|
|
|
|
|
GeminiGenerateContentRequest,
|
|
|
|
|
GeminiGenerateContentResponse,
|
2025-10-26 00:35:30 +03:00
|
|
|
GeminiImageConfig,
|
|
|
|
|
GeminiImageGenerateContentRequest,
|
|
|
|
|
GeminiImageGenerationConfig,
|
2025-11-19 00:26:44 +02:00
|
|
|
GeminiInlineData,
|
|
|
|
|
GeminiMimeType,
|
|
|
|
|
GeminiPart,
|
|
|
|
|
GeminiRole,
|
2025-11-21 02:17:47 +02:00
|
|
|
Modality,
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
)
|
2025-10-26 00:35:30 +03:00
|
|
|
from comfy_api_nodes.util import (
|
|
|
|
|
ApiEndpoint,
|
|
|
|
|
audio_to_base64_string,
|
|
|
|
|
bytesio_to_image_tensor,
|
2025-11-21 02:17:47 +02:00
|
|
|
get_number_of_images,
|
2025-10-26 00:35:30 +03:00
|
|
|
sync_op,
|
|
|
|
|
tensor_to_base64_string,
|
|
|
|
|
validate_string,
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
video_to_base64_string,
|
|
|
|
|
)
|
2025-10-26 00:35:30 +03:00
|
|
|
from server import PromptServer
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
|
|
|
|
GEMINI_BASE_ENDPOINT = "/proxy/vertexai/gemini"
|
|
|
|
|
GEMINI_MAX_INPUT_FILE_SIZE = 20 * 1024 * 1024 # 20 MB
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GeminiModel(str, Enum):
|
|
|
|
|
"""
|
|
|
|
|
Gemini Model Names allowed by comfy-api
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
gemini_2_5_pro_preview_05_06 = "gemini-2.5-pro-preview-05-06"
|
|
|
|
|
gemini_2_5_flash_preview_04_17 = "gemini-2.5-flash-preview-04-17"
|
2025-08-19 23:29:24 +03:00
|
|
|
gemini_2_5_pro = "gemini-2.5-pro"
|
|
|
|
|
gemini_2_5_flash = "gemini-2.5-flash"
|
2025-11-19 00:26:44 +02:00
|
|
|
gemini_3_0_pro = "gemini-3-pro-preview"
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
|
|
|
|
|
2025-08-26 19:20:44 -07:00
|
|
|
class GeminiImageModel(str, Enum):
|
|
|
|
|
"""
|
|
|
|
|
Gemini Image Model Names allowed by comfy-api
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
gemini_2_5_flash_image_preview = "gemini-2.5-flash-image-preview"
|
2025-10-11 02:17:20 +03:00
|
|
|
gemini_2_5_flash_image = "gemini-2.5-flash-image"
|
2025-08-26 19:20:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_image_parts(image_input: torch.Tensor) -> list[GeminiPart]:
|
|
|
|
|
"""
|
|
|
|
|
Convert image tensor input to Gemini API compatible parts.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
image_input: Batch of image tensors from ComfyUI.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
List of GeminiPart objects containing the encoded images.
|
|
|
|
|
"""
|
|
|
|
|
image_parts: list[GeminiPart] = []
|
|
|
|
|
for image_index in range(image_input.shape[0]):
|
2025-10-26 00:35:30 +03:00
|
|
|
image_as_b64 = tensor_to_base64_string(image_input[image_index].unsqueeze(0))
|
2025-08-26 19:20:44 -07:00
|
|
|
image_parts.append(
|
|
|
|
|
GeminiPart(
|
|
|
|
|
inlineData=GeminiInlineData(
|
|
|
|
|
mimeType=GeminiMimeType.image_png,
|
|
|
|
|
data=image_as_b64,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
return image_parts
|
|
|
|
|
|
|
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
def get_parts_by_type(response: GeminiGenerateContentResponse, part_type: Literal["text"] | str) -> list[GeminiPart]:
|
2025-08-26 19:20:44 -07:00
|
|
|
"""
|
|
|
|
|
Filter response parts by their type.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
response: The API response from Gemini.
|
|
|
|
|
part_type: Type of parts to extract ("text" or a MIME type).
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
List of response parts matching the requested type.
|
|
|
|
|
"""
|
2025-11-19 00:26:44 +02:00
|
|
|
if response.candidates is None:
|
|
|
|
|
if response.promptFeedback.blockReason:
|
|
|
|
|
feedback = response.promptFeedback
|
|
|
|
|
raise ValueError(
|
|
|
|
|
f"Gemini API blocked the request. Reason: {feedback.blockReason} ({feedback.blockReasonMessage})"
|
|
|
|
|
)
|
|
|
|
|
raise NotImplementedError(
|
|
|
|
|
"Gemini returned no response candidates. "
|
|
|
|
|
"Please report to ComfyUI repository with the example of workflow to reproduce this."
|
|
|
|
|
)
|
2025-08-26 19:20:44 -07:00
|
|
|
parts = []
|
2025-10-26 00:35:30 +03:00
|
|
|
for part in response.candidates[0].content.parts:
|
2025-08-26 19:20:44 -07:00
|
|
|
if part_type == "text" and hasattr(part, "text") and part.text:
|
|
|
|
|
parts.append(part)
|
2025-10-26 00:35:30 +03:00
|
|
|
elif hasattr(part, "inlineData") and part.inlineData and part.inlineData.mimeType == part_type:
|
2025-08-26 19:20:44 -07:00
|
|
|
parts.append(part)
|
|
|
|
|
# Skip parts that don't match the requested type
|
|
|
|
|
return parts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_text_from_response(response: GeminiGenerateContentResponse) -> str:
|
|
|
|
|
"""
|
|
|
|
|
Extract and concatenate all text parts from the response.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
response: The API response from Gemini.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
Combined text from all text parts in the response.
|
|
|
|
|
"""
|
|
|
|
|
parts = get_parts_by_type(response, "text")
|
|
|
|
|
return "\n".join([part.text for part in parts])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_image_from_response(response: GeminiGenerateContentResponse) -> torch.Tensor:
|
|
|
|
|
image_tensors: list[torch.Tensor] = []
|
|
|
|
|
parts = get_parts_by_type(response, "image/png")
|
|
|
|
|
for part in parts:
|
|
|
|
|
image_data = base64.b64decode(part.inlineData.data)
|
|
|
|
|
returned_image = bytesio_to_image_tensor(BytesIO(image_data))
|
|
|
|
|
image_tensors.append(returned_image)
|
|
|
|
|
if len(image_tensors) == 0:
|
2025-10-26 00:35:30 +03:00
|
|
|
return torch.zeros((1, 1024, 1024, 4))
|
2025-08-26 19:20:44 -07:00
|
|
|
return torch.cat(image_tensors, dim=0)
|
|
|
|
|
|
|
|
|
|
|
2025-11-21 02:17:47 +02:00
|
|
|
def calculate_tokens_price(response: GeminiGenerateContentResponse) -> float | None:
|
|
|
|
|
if not response.modelVersion:
|
|
|
|
|
return None
|
|
|
|
|
# Define prices (Cost per 1,000,000 tokens), see https://cloud.google.com/vertex-ai/generative-ai/pricing
|
|
|
|
|
if response.modelVersion in ("gemini-2.5-pro-preview-05-06", "gemini-2.5-pro"):
|
|
|
|
|
input_tokens_price = 1.25
|
|
|
|
|
output_text_tokens_price = 10.0
|
|
|
|
|
output_image_tokens_price = 0.0
|
|
|
|
|
elif response.modelVersion in (
|
|
|
|
|
"gemini-2.5-flash-preview-04-17",
|
|
|
|
|
"gemini-2.5-flash",
|
|
|
|
|
):
|
|
|
|
|
input_tokens_price = 0.30
|
|
|
|
|
output_text_tokens_price = 2.50
|
|
|
|
|
output_image_tokens_price = 0.0
|
|
|
|
|
elif response.modelVersion in (
|
|
|
|
|
"gemini-2.5-flash-image-preview",
|
|
|
|
|
"gemini-2.5-flash-image",
|
|
|
|
|
):
|
|
|
|
|
input_tokens_price = 0.30
|
|
|
|
|
output_text_tokens_price = 2.50
|
|
|
|
|
output_image_tokens_price = 30.0
|
|
|
|
|
elif response.modelVersion == "gemini-3-pro-preview":
|
|
|
|
|
input_tokens_price = 2
|
|
|
|
|
output_text_tokens_price = 12.0
|
|
|
|
|
output_image_tokens_price = 0.0
|
|
|
|
|
elif response.modelVersion == "gemini-3-pro-image-preview":
|
|
|
|
|
input_tokens_price = 2
|
|
|
|
|
output_text_tokens_price = 12.0
|
|
|
|
|
output_image_tokens_price = 120.0
|
|
|
|
|
else:
|
|
|
|
|
return None
|
|
|
|
|
final_price = response.usageMetadata.promptTokenCount * input_tokens_price
|
|
|
|
|
for i in response.usageMetadata.candidatesTokensDetails:
|
|
|
|
|
if i.modality == Modality.IMAGE:
|
|
|
|
|
final_price += output_image_tokens_price * i.tokenCount # for Nano Banana models
|
|
|
|
|
else:
|
|
|
|
|
final_price += output_text_tokens_price * i.tokenCount
|
|
|
|
|
if response.usageMetadata.thoughtsTokenCount:
|
|
|
|
|
final_price += output_text_tokens_price * response.usageMetadata.thoughtsTokenCount
|
|
|
|
|
return final_price / 1_000_000.0
|
|
|
|
|
|
|
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
class GeminiNode(IO.ComfyNode):
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
"""
|
|
|
|
|
Node to generate text responses from a Gemini model.
|
|
|
|
|
|
|
|
|
|
This node allows users to interact with Google's Gemini AI models, providing
|
|
|
|
|
multimodal inputs (text, images, audio, video, files) to generate coherent
|
|
|
|
|
text responses. The node works with the latest Gemini models, handling the
|
|
|
|
|
API communication and response parsing.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
@classmethod
|
2025-10-26 00:35:30 +03:00
|
|
|
def define_schema(cls):
|
|
|
|
|
return IO.Schema(
|
|
|
|
|
node_id="GeminiNode",
|
|
|
|
|
display_name="Google Gemini",
|
|
|
|
|
category="api node/text/Gemini",
|
|
|
|
|
description="Generate text responses with Google's Gemini AI model. "
|
|
|
|
|
"You can provide multiple types of inputs (text, images, audio, video) "
|
|
|
|
|
"as context for generating more relevant and meaningful responses.",
|
|
|
|
|
inputs=[
|
|
|
|
|
IO.String.Input(
|
|
|
|
|
"prompt",
|
|
|
|
|
multiline=True,
|
|
|
|
|
default="",
|
|
|
|
|
tooltip="Text inputs to the model, used to generate a response. "
|
|
|
|
|
"You can include detailed instructions, questions, or context for the model.",
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Combo.Input(
|
|
|
|
|
"model",
|
|
|
|
|
options=GeminiModel,
|
|
|
|
|
default=GeminiModel.gemini_2_5_pro,
|
|
|
|
|
tooltip="The Gemini model to use for generating responses.",
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Int.Input(
|
|
|
|
|
"seed",
|
|
|
|
|
default=42,
|
|
|
|
|
min=0,
|
|
|
|
|
max=0xFFFFFFFFFFFFFFFF,
|
|
|
|
|
control_after_generate=True,
|
|
|
|
|
tooltip="When seed is fixed to a specific value, the model makes a best effort to provide "
|
|
|
|
|
"the same response for repeated requests. Deterministic output isn't guaranteed. "
|
|
|
|
|
"Also, changing the model or parameter settings, such as the temperature, "
|
|
|
|
|
"can cause variations in the response even when you use the same seed value. "
|
|
|
|
|
"By default, a random seed value is used.",
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Image.Input(
|
|
|
|
|
"images",
|
|
|
|
|
optional=True,
|
|
|
|
|
tooltip="Optional image(s) to use as context for the model. "
|
|
|
|
|
"To include multiple images, you can use the Batch Images node.",
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Audio.Input(
|
|
|
|
|
"audio",
|
|
|
|
|
optional=True,
|
|
|
|
|
tooltip="Optional audio to use as context for the model.",
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Video.Input(
|
|
|
|
|
"video",
|
|
|
|
|
optional=True,
|
|
|
|
|
tooltip="Optional video to use as context for the model.",
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Custom("GEMINI_INPUT_FILES").Input(
|
|
|
|
|
"files",
|
|
|
|
|
optional=True,
|
|
|
|
|
tooltip="Optional file(s) to use as context for the model. "
|
|
|
|
|
"Accepts inputs from the Gemini Generate Content Input Files node.",
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
],
|
|
|
|
|
outputs=[
|
|
|
|
|
IO.String.Output(),
|
|
|
|
|
],
|
|
|
|
|
hidden=[
|
|
|
|
|
IO.Hidden.auth_token_comfy_org,
|
|
|
|
|
IO.Hidden.api_key_comfy_org,
|
|
|
|
|
IO.Hidden.unique_id,
|
|
|
|
|
],
|
|
|
|
|
is_api_node=True,
|
|
|
|
|
)
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
@classmethod
|
|
|
|
|
def create_video_parts(cls, video_input: Input.Video) -> list[GeminiPart]:
|
|
|
|
|
"""Convert video input to Gemini API compatible parts."""
|
2025-10-04 22:22:57 +03:00
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
base_64_string = video_to_base64_string(video_input, container_format=VideoContainer.MP4, codec=VideoCodec.H264)
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
return [
|
|
|
|
|
GeminiPart(
|
|
|
|
|
inlineData=GeminiInlineData(
|
|
|
|
|
mimeType=GeminiMimeType.video_mp4,
|
|
|
|
|
data=base_64_string,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
]
|
|
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
@classmethod
|
|
|
|
|
def create_audio_parts(cls, audio_input: Input.Audio) -> list[GeminiPart]:
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
"""
|
|
|
|
|
Convert audio input to Gemini API compatible parts.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
audio_input: Audio input from ComfyUI, containing waveform tensor and sample rate.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
List of GeminiPart objects containing the encoded audio.
|
|
|
|
|
"""
|
|
|
|
|
audio_parts: list[GeminiPart] = []
|
|
|
|
|
for batch_index in range(audio_input["waveform"].shape[0]):
|
|
|
|
|
# Recreate an IO.AUDIO object for the given batch dimension index
|
2025-10-26 00:35:30 +03:00
|
|
|
audio_at_index = Input.Audio(
|
|
|
|
|
waveform=audio_input["waveform"][batch_index].unsqueeze(0),
|
|
|
|
|
sample_rate=audio_input["sample_rate"],
|
|
|
|
|
)
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
# Convert to MP3 format for compatibility with Gemini API
|
|
|
|
|
audio_bytes = audio_to_base64_string(
|
|
|
|
|
audio_at_index,
|
|
|
|
|
container_format="mp3",
|
|
|
|
|
codec_name="libmp3lame",
|
|
|
|
|
)
|
|
|
|
|
audio_parts.append(
|
|
|
|
|
GeminiPart(
|
|
|
|
|
inlineData=GeminiInlineData(
|
|
|
|
|
mimeType=GeminiMimeType.audio_mp3,
|
|
|
|
|
data=audio_bytes,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
return audio_parts
|
|
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
@classmethod
|
|
|
|
|
async def execute(
|
|
|
|
|
cls,
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
prompt: str,
|
2025-10-26 00:35:30 +03:00
|
|
|
model: str,
|
|
|
|
|
seed: int,
|
2025-11-19 00:26:44 +02:00
|
|
|
images: torch.Tensor | None = None,
|
|
|
|
|
audio: Input.Audio | None = None,
|
|
|
|
|
video: Input.Video | None = None,
|
|
|
|
|
files: list[GeminiPart] | None = None,
|
2025-10-26 00:35:30 +03:00
|
|
|
) -> IO.NodeOutput:
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
validate_string(prompt, strip_whitespace=False)
|
|
|
|
|
|
|
|
|
|
# Create parts list with text prompt as the first part
|
2025-10-26 00:35:30 +03:00
|
|
|
parts: list[GeminiPart] = [GeminiPart(text=prompt)]
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
|
|
|
|
# Add other modal parts
|
|
|
|
|
if images is not None:
|
2025-08-26 19:20:44 -07:00
|
|
|
image_parts = create_image_parts(images)
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
parts.extend(image_parts)
|
|
|
|
|
if audio is not None:
|
2025-10-26 00:35:30 +03:00
|
|
|
parts.extend(cls.create_audio_parts(audio))
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
if video is not None:
|
2025-10-26 00:35:30 +03:00
|
|
|
parts.extend(cls.create_video_parts(video))
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
if files is not None:
|
|
|
|
|
parts.extend(files)
|
|
|
|
|
|
|
|
|
|
# Create response
|
2025-10-26 00:35:30 +03:00
|
|
|
response = await sync_op(
|
|
|
|
|
cls,
|
|
|
|
|
endpoint=ApiEndpoint(path=f"{GEMINI_BASE_ENDPOINT}/{model}", method="POST"),
|
|
|
|
|
data=GeminiGenerateContentRequest(
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
contents=[
|
|
|
|
|
GeminiContent(
|
2025-11-19 00:26:44 +02:00
|
|
|
role=GeminiRole.user,
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
parts=parts,
|
|
|
|
|
)
|
|
|
|
|
]
|
|
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
response_model=GeminiGenerateContentResponse,
|
2025-11-21 02:17:47 +02:00
|
|
|
price_extractor=calculate_tokens_price,
|
2025-10-26 00:35:30 +03:00
|
|
|
)
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
2025-08-26 19:20:44 -07:00
|
|
|
output_text = get_text_from_response(response)
|
2025-10-26 00:35:30 +03:00
|
|
|
if output_text:
|
2025-08-22 20:51:14 +03:00
|
|
|
# Not a true chat history like the OpenAI Chat node. It is emulated so the frontend can show a copy button.
|
|
|
|
|
render_spec = {
|
2025-10-26 00:35:30 +03:00
|
|
|
"node_id": cls.hidden.unique_id,
|
2025-08-22 20:51:14 +03:00
|
|
|
"component": "ChatHistoryWidget",
|
|
|
|
|
"props": {
|
|
|
|
|
"history": json.dumps(
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"prompt": prompt,
|
|
|
|
|
"response": output_text,
|
|
|
|
|
"response_id": str(uuid.uuid4()),
|
|
|
|
|
"timestamp": time.time(),
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
PromptServer.instance.send_sync(
|
|
|
|
|
"display_component",
|
|
|
|
|
render_spec,
|
|
|
|
|
)
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
return IO.NodeOutput(output_text or "Empty response from Gemini model...")
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
|
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
class GeminiInputFiles(IO.ComfyNode):
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
"""
|
|
|
|
|
Loads and formats input files for use with the Gemini API.
|
|
|
|
|
|
|
|
|
|
This node allows users to include text (.txt) and PDF (.pdf) files as input
|
|
|
|
|
context for the Gemini model. Files are converted to the appropriate format
|
|
|
|
|
required by the API and can be chained together to include multiple files
|
|
|
|
|
in a single request.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
@classmethod
|
2025-10-26 00:35:30 +03:00
|
|
|
def define_schema(cls):
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
"""
|
|
|
|
|
For details about the supported file input types, see:
|
|
|
|
|
https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference
|
|
|
|
|
"""
|
|
|
|
|
input_dir = folder_paths.get_input_directory()
|
|
|
|
|
input_files = [
|
|
|
|
|
f
|
|
|
|
|
for f in os.scandir(input_dir)
|
|
|
|
|
if f.is_file()
|
|
|
|
|
and (f.name.endswith(".txt") or f.name.endswith(".pdf"))
|
|
|
|
|
and f.stat().st_size < GEMINI_MAX_INPUT_FILE_SIZE
|
|
|
|
|
]
|
|
|
|
|
input_files = sorted(input_files, key=lambda x: x.name)
|
|
|
|
|
input_files = [f.name for f in input_files]
|
2025-10-26 00:35:30 +03:00
|
|
|
return IO.Schema(
|
|
|
|
|
node_id="GeminiInputFiles",
|
|
|
|
|
display_name="Gemini Input Files",
|
|
|
|
|
category="api node/text/Gemini",
|
|
|
|
|
description="Loads and prepares input files to include as inputs for Gemini LLM nodes. "
|
|
|
|
|
"The files will be read by the Gemini model when generating a response. "
|
|
|
|
|
"The contents of the text file count toward the token limit. "
|
|
|
|
|
"🛈 TIP: Can be chained together with other Gemini Input File nodes.",
|
|
|
|
|
inputs=[
|
|
|
|
|
IO.Combo.Input(
|
|
|
|
|
"file",
|
|
|
|
|
options=input_files,
|
|
|
|
|
default=input_files[0] if input_files else None,
|
|
|
|
|
tooltip="Input files to include as context for the model. "
|
|
|
|
|
"Only accepts text (.txt) and PDF (.pdf) files for now.",
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Custom("GEMINI_INPUT_FILES").Input(
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
"GEMINI_INPUT_FILES",
|
2025-10-26 00:35:30 +03:00
|
|
|
optional=True,
|
|
|
|
|
tooltip="An optional additional file(s) to batch together with the file loaded from this node. "
|
|
|
|
|
"Allows chaining of input files so that a single message can include multiple input files.",
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
],
|
|
|
|
|
outputs=[
|
|
|
|
|
IO.Custom("GEMINI_INPUT_FILES").Output(),
|
|
|
|
|
],
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
)
|
2025-10-26 00:35:30 +03:00
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def create_file_part(cls, file_path: str) -> GeminiPart:
|
|
|
|
|
mime_type = GeminiMimeType.application_pdf if file_path.endswith(".pdf") else GeminiMimeType.text_plain
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
# Use base64 string directly, not the data URI
|
|
|
|
|
with open(file_path, "rb") as f:
|
|
|
|
|
file_content = f.read()
|
|
|
|
|
base64_str = base64.b64encode(file_content).decode("utf-8")
|
|
|
|
|
|
|
|
|
|
return GeminiPart(
|
|
|
|
|
inlineData=GeminiInlineData(
|
|
|
|
|
mimeType=mime_type,
|
|
|
|
|
data=base64_str,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
@classmethod
|
2025-11-19 00:26:44 +02:00
|
|
|
def execute(cls, file: str, GEMINI_INPUT_FILES: list[GeminiPart] | None = None) -> IO.NodeOutput:
|
2025-10-26 00:35:30 +03:00
|
|
|
"""Loads and formats input files for Gemini API."""
|
|
|
|
|
if GEMINI_INPUT_FILES is None:
|
|
|
|
|
GEMINI_INPUT_FILES = []
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
file_path = folder_paths.get_annotated_filepath(file)
|
2025-10-26 00:35:30 +03:00
|
|
|
input_file_content = cls.create_file_part(file_path)
|
|
|
|
|
return IO.NodeOutput([input_file_content] + GEMINI_INPUT_FILES)
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
|
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
class GeminiImage(IO.ComfyNode):
|
2025-08-26 19:20:44 -07:00
|
|
|
|
|
|
|
|
@classmethod
|
2025-10-26 00:35:30 +03:00
|
|
|
def define_schema(cls):
|
|
|
|
|
return IO.Schema(
|
|
|
|
|
node_id="GeminiImageNode",
|
2025-11-19 00:26:44 +02:00
|
|
|
display_name="Nano Banana (Google Gemini Image)",
|
2025-10-26 00:35:30 +03:00
|
|
|
category="api node/image/Gemini",
|
|
|
|
|
description="Edit images synchronously via Google API.",
|
|
|
|
|
inputs=[
|
|
|
|
|
IO.String.Input(
|
|
|
|
|
"prompt",
|
|
|
|
|
multiline=True,
|
|
|
|
|
tooltip="Text prompt for generation",
|
|
|
|
|
default="",
|
2025-08-26 19:20:44 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Combo.Input(
|
|
|
|
|
"model",
|
|
|
|
|
options=GeminiImageModel,
|
|
|
|
|
default=GeminiImageModel.gemini_2_5_flash_image,
|
|
|
|
|
tooltip="The Gemini model to use for generating responses.",
|
2025-08-26 19:20:44 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Int.Input(
|
|
|
|
|
"seed",
|
|
|
|
|
default=42,
|
|
|
|
|
min=0,
|
|
|
|
|
max=0xFFFFFFFFFFFFFFFF,
|
|
|
|
|
control_after_generate=True,
|
|
|
|
|
tooltip="When seed is fixed to a specific value, the model makes a best effort to provide "
|
|
|
|
|
"the same response for repeated requests. Deterministic output isn't guaranteed. "
|
|
|
|
|
"Also, changing the model or parameter settings, such as the temperature, "
|
|
|
|
|
"can cause variations in the response even when you use the same seed value. "
|
|
|
|
|
"By default, a random seed value is used.",
|
2025-08-26 19:20:44 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Image.Input(
|
|
|
|
|
"images",
|
|
|
|
|
optional=True,
|
|
|
|
|
tooltip="Optional image(s) to use as context for the model. "
|
|
|
|
|
"To include multiple images, you can use the Batch Images node.",
|
2025-08-26 19:20:44 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Custom("GEMINI_INPUT_FILES").Input(
|
|
|
|
|
"files",
|
|
|
|
|
optional=True,
|
|
|
|
|
tooltip="Optional file(s) to use as context for the model. "
|
|
|
|
|
"Accepts inputs from the Gemini Generate Content Input Files node.",
|
2025-08-26 19:20:44 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
IO.Combo.Input(
|
|
|
|
|
"aspect_ratio",
|
|
|
|
|
options=["auto", "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"],
|
|
|
|
|
default="auto",
|
|
|
|
|
tooltip="Defaults to matching the output image size to that of your input image, "
|
|
|
|
|
"or otherwise generates 1:1 squares.",
|
|
|
|
|
optional=True,
|
2025-10-11 02:17:20 +03:00
|
|
|
),
|
2025-11-21 02:17:47 +02:00
|
|
|
IO.Combo.Input(
|
|
|
|
|
"response_modalities",
|
|
|
|
|
options=["IMAGE+TEXT", "IMAGE"],
|
|
|
|
|
tooltip="Choose 'IMAGE' for image-only output, or "
|
|
|
|
|
"'IMAGE+TEXT' to return both the generated image and a text response.",
|
|
|
|
|
optional=True,
|
|
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
],
|
|
|
|
|
outputs=[
|
|
|
|
|
IO.Image.Output(),
|
|
|
|
|
IO.String.Output(),
|
|
|
|
|
],
|
|
|
|
|
hidden=[
|
|
|
|
|
IO.Hidden.auth_token_comfy_org,
|
|
|
|
|
IO.Hidden.api_key_comfy_org,
|
|
|
|
|
IO.Hidden.unique_id,
|
|
|
|
|
],
|
|
|
|
|
is_api_node=True,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
async def execute(
|
|
|
|
|
cls,
|
2025-08-26 19:20:44 -07:00
|
|
|
prompt: str,
|
2025-10-26 00:35:30 +03:00
|
|
|
model: str,
|
|
|
|
|
seed: int,
|
2025-11-19 00:26:44 +02:00
|
|
|
images: torch.Tensor | None = None,
|
|
|
|
|
files: list[GeminiPart] | None = None,
|
2025-10-11 02:17:20 +03:00
|
|
|
aspect_ratio: str = "auto",
|
2025-11-21 02:17:47 +02:00
|
|
|
response_modalities: str = "IMAGE+TEXT",
|
2025-10-26 00:35:30 +03:00
|
|
|
) -> IO.NodeOutput:
|
2025-08-26 19:20:44 -07:00
|
|
|
validate_string(prompt, strip_whitespace=True, min_length=1)
|
2025-10-26 00:35:30 +03:00
|
|
|
parts: list[GeminiPart] = [GeminiPart(text=prompt)]
|
2025-08-26 19:20:44 -07:00
|
|
|
|
2025-10-11 02:17:20 +03:00
|
|
|
if not aspect_ratio:
|
|
|
|
|
aspect_ratio = "auto" # for backward compatability with old workflows; to-do remove this in December
|
|
|
|
|
image_config = GeminiImageConfig(aspectRatio=aspect_ratio)
|
|
|
|
|
|
2025-08-26 19:20:44 -07:00
|
|
|
if images is not None:
|
|
|
|
|
image_parts = create_image_parts(images)
|
|
|
|
|
parts.extend(image_parts)
|
|
|
|
|
if files is not None:
|
|
|
|
|
parts.extend(files)
|
|
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
response = await sync_op(
|
|
|
|
|
cls,
|
|
|
|
|
endpoint=ApiEndpoint(path=f"{GEMINI_BASE_ENDPOINT}/{model}", method="POST"),
|
|
|
|
|
data=GeminiImageGenerateContentRequest(
|
2025-08-26 19:20:44 -07:00
|
|
|
contents=[
|
2025-11-19 00:26:44 +02:00
|
|
|
GeminiContent(role=GeminiRole.user, parts=parts),
|
2025-08-26 19:20:44 -07:00
|
|
|
],
|
|
|
|
|
generationConfig=GeminiImageGenerationConfig(
|
2025-11-21 02:17:47 +02:00
|
|
|
responseModalities=(["IMAGE"] if response_modalities == "IMAGE" else ["TEXT", "IMAGE"]),
|
2025-10-11 02:17:20 +03:00
|
|
|
imageConfig=None if aspect_ratio == "auto" else image_config,
|
2025-10-26 00:35:30 +03:00
|
|
|
),
|
2025-08-26 19:20:44 -07:00
|
|
|
),
|
2025-10-26 00:35:30 +03:00
|
|
|
response_model=GeminiGenerateContentResponse,
|
2025-11-21 02:17:47 +02:00
|
|
|
price_extractor=calculate_tokens_price,
|
2025-10-26 00:35:30 +03:00
|
|
|
)
|
2025-08-26 19:20:44 -07:00
|
|
|
|
|
|
|
|
output_text = get_text_from_response(response)
|
2025-10-26 00:35:30 +03:00
|
|
|
if output_text:
|
2025-08-26 19:20:44 -07:00
|
|
|
render_spec = {
|
2025-10-26 00:35:30 +03:00
|
|
|
"node_id": cls.hidden.unique_id,
|
2025-08-26 19:20:44 -07:00
|
|
|
"component": "ChatHistoryWidget",
|
|
|
|
|
"props": {
|
|
|
|
|
"history": json.dumps(
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"prompt": prompt,
|
|
|
|
|
"response": output_text,
|
|
|
|
|
"response_id": str(uuid.uuid4()),
|
|
|
|
|
"timestamp": time.time(),
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
PromptServer.instance.send_sync(
|
|
|
|
|
"display_component",
|
|
|
|
|
render_spec,
|
|
|
|
|
)
|
2025-11-21 02:17:47 +02:00
|
|
|
return IO.NodeOutput(get_image_from_response(response), output_text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GeminiImage2(IO.ComfyNode):
|
2025-08-26 19:20:44 -07:00
|
|
|
|
2025-11-21 02:17:47 +02:00
|
|
|
@classmethod
|
|
|
|
|
def define_schema(cls):
|
|
|
|
|
return IO.Schema(
|
|
|
|
|
node_id="GeminiImage2Node",
|
|
|
|
|
display_name="Nano Banana Pro (Google Gemini Image)",
|
|
|
|
|
category="api node/image/Gemini",
|
|
|
|
|
description="Generate or edit images synchronously via Google Vertex API.",
|
|
|
|
|
inputs=[
|
|
|
|
|
IO.String.Input(
|
|
|
|
|
"prompt",
|
|
|
|
|
multiline=True,
|
|
|
|
|
tooltip="Text prompt describing the image to generate or the edits to apply. "
|
|
|
|
|
"Include any constraints, styles, or details the model should follow.",
|
|
|
|
|
default="",
|
|
|
|
|
),
|
|
|
|
|
IO.Combo.Input(
|
|
|
|
|
"model",
|
|
|
|
|
options=["gemini-3-pro-image-preview"],
|
|
|
|
|
),
|
|
|
|
|
IO.Int.Input(
|
|
|
|
|
"seed",
|
|
|
|
|
default=42,
|
|
|
|
|
min=0,
|
|
|
|
|
max=0xFFFFFFFFFFFFFFFF,
|
|
|
|
|
control_after_generate=True,
|
|
|
|
|
tooltip="When the seed is fixed to a specific value, the model makes a best effort to provide "
|
|
|
|
|
"the same response for repeated requests. Deterministic output isn't guaranteed. "
|
|
|
|
|
"Also, changing the model or parameter settings, such as the temperature, "
|
|
|
|
|
"can cause variations in the response even when you use the same seed value. "
|
|
|
|
|
"By default, a random seed value is used.",
|
|
|
|
|
),
|
|
|
|
|
IO.Combo.Input(
|
|
|
|
|
"aspect_ratio",
|
|
|
|
|
options=["auto", "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"],
|
|
|
|
|
default="auto",
|
|
|
|
|
tooltip="If set to 'auto', matches your input image's aspect ratio; "
|
|
|
|
|
"if no image is provided, generates a 1:1 square.",
|
|
|
|
|
),
|
|
|
|
|
IO.Combo.Input(
|
|
|
|
|
"resolution",
|
|
|
|
|
options=["1K", "2K", "4K"],
|
|
|
|
|
tooltip="Target output resolution. For 2K/4K the native Gemini upscaler is used.",
|
|
|
|
|
),
|
|
|
|
|
IO.Combo.Input(
|
|
|
|
|
"response_modalities",
|
|
|
|
|
options=["IMAGE+TEXT", "IMAGE"],
|
|
|
|
|
tooltip="Choose 'IMAGE' for image-only output, or "
|
|
|
|
|
"'IMAGE+TEXT' to return both the generated image and a text response.",
|
|
|
|
|
),
|
|
|
|
|
IO.Image.Input(
|
|
|
|
|
"images",
|
|
|
|
|
optional=True,
|
|
|
|
|
tooltip="Optional reference image(s). "
|
|
|
|
|
"To include multiple images, use the Batch Images node (up to 14).",
|
|
|
|
|
),
|
|
|
|
|
IO.Custom("GEMINI_INPUT_FILES").Input(
|
|
|
|
|
"files",
|
|
|
|
|
optional=True,
|
|
|
|
|
tooltip="Optional file(s) to use as context for the model. "
|
|
|
|
|
"Accepts inputs from the Gemini Generate Content Input Files node.",
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
outputs=[
|
|
|
|
|
IO.Image.Output(),
|
|
|
|
|
IO.String.Output(),
|
|
|
|
|
],
|
|
|
|
|
hidden=[
|
|
|
|
|
IO.Hidden.auth_token_comfy_org,
|
|
|
|
|
IO.Hidden.api_key_comfy_org,
|
|
|
|
|
IO.Hidden.unique_id,
|
|
|
|
|
],
|
|
|
|
|
is_api_node=True,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
async def execute(
|
|
|
|
|
cls,
|
|
|
|
|
prompt: str,
|
|
|
|
|
model: str,
|
|
|
|
|
seed: int,
|
|
|
|
|
aspect_ratio: str,
|
|
|
|
|
resolution: str,
|
|
|
|
|
response_modalities: str,
|
|
|
|
|
images: torch.Tensor | None = None,
|
|
|
|
|
files: list[GeminiPart] | None = None,
|
|
|
|
|
) -> IO.NodeOutput:
|
|
|
|
|
validate_string(prompt, strip_whitespace=True, min_length=1)
|
|
|
|
|
|
|
|
|
|
parts: list[GeminiPart] = [GeminiPart(text=prompt)]
|
|
|
|
|
if images is not None:
|
|
|
|
|
if get_number_of_images(images) > 14:
|
|
|
|
|
raise ValueError("The current maximum number of supported images is 14.")
|
|
|
|
|
parts.extend(create_image_parts(images))
|
|
|
|
|
if files is not None:
|
|
|
|
|
parts.extend(files)
|
|
|
|
|
|
|
|
|
|
image_config = GeminiImageConfig(imageSize=resolution)
|
|
|
|
|
if aspect_ratio != "auto":
|
|
|
|
|
image_config.aspectRatio = aspect_ratio
|
|
|
|
|
|
|
|
|
|
response = await sync_op(
|
|
|
|
|
cls,
|
|
|
|
|
ApiEndpoint(path=f"{GEMINI_BASE_ENDPOINT}/{model}", method="POST"),
|
|
|
|
|
data=GeminiImageGenerateContentRequest(
|
|
|
|
|
contents=[
|
|
|
|
|
GeminiContent(role=GeminiRole.user, parts=parts),
|
|
|
|
|
],
|
|
|
|
|
generationConfig=GeminiImageGenerationConfig(
|
|
|
|
|
responseModalities=(["IMAGE"] if response_modalities == "IMAGE" else ["TEXT", "IMAGE"]),
|
|
|
|
|
imageConfig=image_config,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
response_model=GeminiGenerateContentResponse,
|
|
|
|
|
price_extractor=calculate_tokens_price,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
output_text = get_text_from_response(response)
|
|
|
|
|
if output_text:
|
|
|
|
|
render_spec = {
|
|
|
|
|
"node_id": cls.hidden.unique_id,
|
|
|
|
|
"component": "ChatHistoryWidget",
|
|
|
|
|
"props": {
|
|
|
|
|
"history": json.dumps(
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"prompt": prompt,
|
|
|
|
|
"response": output_text,
|
|
|
|
|
"response_id": str(uuid.uuid4()),
|
|
|
|
|
"timestamp": time.time(),
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
PromptServer.instance.send_sync(
|
|
|
|
|
"display_component",
|
|
|
|
|
render_spec,
|
|
|
|
|
)
|
|
|
|
|
return IO.NodeOutput(get_image_from_response(response), output_text)
|
2025-10-26 00:35:30 +03:00
|
|
|
|
2025-08-26 19:20:44 -07:00
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
class GeminiExtension(ComfyExtension):
|
|
|
|
|
@override
|
|
|
|
|
async def get_node_list(self) -> list[type[IO.ComfyNode]]:
|
|
|
|
|
return [
|
|
|
|
|
GeminiNode,
|
|
|
|
|
GeminiImage,
|
2025-11-21 02:17:47 +02:00
|
|
|
GeminiImage2,
|
2025-10-26 00:35:30 +03:00
|
|
|
GeminiInputFiles,
|
|
|
|
|
]
|
2025-08-26 19:20:44 -07:00
|
|
|
|
More API nodes: Gemini/Open AI Chat, Tripo, Rodin, Runway Image (#8295)
* Add Ideogram generate node.
* Add staging api.
* Add API_NODE and common error for missing auth token (#5)
* Add Minimax Video Generation + Async Task queue polling example (#6)
* [Minimax] Show video preview and embed workflow in ouput (#7)
* Remove uv.lock
* Remove polling operations.
* Revert "Remove polling operations."
This reverts commit 8415404ce8fbc0262b7de54fc700c5c8854a34fc.
* Update stubs.
* Added Ideogram and Minimax back in.
* Added initial BFL Flux 1.1 [pro] Ultra node (#11)
* Manually add BFL polling status response schema (#15)
* Add function for uploading files. (#18)
* Add Luma nodes (#16)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Refactor util functions (#20)
* Add rest of Luma node functionality (#19)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Fix image_luma_ref not working (#28)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* [Bug] Remove duplicated option T2V-01 in MinimaxTextToVideoNode (#31)
* add veo2, bump av req (#32)
* Add Recraft nodes (#29)
* Add Kling Nodes (#12)
* Add Camera Concepts (luma_concepts) to Luma Video nodes (#33)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Runway nodes (#17)
* Convert Minimax node to use VIDEO output type (#34)
* Standard `CATEGORY` system for api nodes (#35)
* Set `Content-Type` header when uploading files (#36)
* add better error propagation to veo2 (#37)
* Add Realistic Image and Logo Raster styles for Recraft v3 (#38)
* Fix runway image upload and progress polling (#39)
* Fix image upload for Luma: only include `Content-Type` header field if it's set explicitly (#40)
* Moved Luma nodes to nodes_luma.py (#47)
* Moved Recraft nodes to nodes_recraft.py (#48)
* Move and fix BFL nodes to node_bfl.py (#49)
* Move and edit Minimax node to nodes_minimax.py (#50)
* Add Recraft Text to Vector node, add Save SVG node to handle its output (#53)
* Added pixverse_template support to Pixverse Text to Video node (#54)
* Added Recraft Controls + Recraft Color RGB nodes (#57)
* split remaining nodes out of nodes_api, make utility lib, refactor ideogram (#61)
* Set request type explicitly (#66)
* Add `control_after_generate` to all seed inputs (#69)
* Fix bug: deleting `Content-Type` when property does not exist (#73)
* Add Pixverse and updated Kling types (#75)
* Added Recraft Style - Infinite Style Library node (#82)
* add ideogram v3 (#83)
* [Kling] Split Camera Control config to its own node (#81)
* Add Pika i2v and t2v nodes (#52)
* Remove Runway nodes (#88)
* Fix: Prompt text can't be validated in Kling nodes when using primitive nodes (#90)
* Update Pika Duration and Resolution options (#94)
* Removed Infinite Style Library until later (#99)
* fix multi image return (#101)
close #96
* Serve SVG files directly (#107)
* Add a bunch of nodes, 3 ready to use, the rest waiting for endpoint support (#108)
* Revert "Serve SVG files directly" (#111)
* Expose 4 remaining Recraft nodes (#112)
* [Kling] Add `Duration` and `Video ID` outputs (#105)
* Add Kling nodes: camera control, start-end frame, lip-sync, video extend (#115)
* Fix error for Recraft ImageToImage error for nonexistent random_seed param (#118)
* Add remaining Pika nodes (#119)
* Make controls input work for Recraft Image to Image node (#120)
* Fix: Nested `AnyUrl` in request model cannot be serialized (Kling, Runway) (#129)
* Show errors and API output URLs to the user (change log levels) (#131)
* Apply small fixes and most prompt validation (if needed to avoid API error) (#135)
* Node name/category modifications (#140)
* Add back Recraft Style - Infinite Style Library node (#141)
* [Kling] Fix: Correct/verify supported subset of input combos in Kling nodes (#149)
* Remove pixverse_template from PixVerse Transition Video node (#155)
* Use 3.9 compat syntax (#164)
* Handle Comfy API key based authorizaton (#167)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* [BFL] Print download URL of successful task result directly on nodes (#175)
* Show output URL and progress text on Pika nodes (#168)
* [Ideogram] Print download URL of successful task result directly on nodes (#176)
* [Kling] Print download URL of successful task result directly on nodes (#181)
* Merge upstream may 14 25 (#186)
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
* Update instructions on how to develop API Nodes. (#171)
* Add Runway FLF and I2V nodes (#187)
* Add OpenAI chat node (#188)
* Update README.
* Add Google Gemini API node (#191)
* Add Runway Gen 4 Text to Image Node (#193)
* [Runway, Gemini] Update node display names and attributes (#194)
* Update path from "image-to-video" to "image_to_video" (#197)
* [Runway] Split I2V nodes into separate gen3 and gen4 nodes (#198)
* Update runway i2v ratio enum (#201)
* Rodin3D: implement Rodin3D API Nodes (#190)
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Add Tripo Nodes. (#189)
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
* Change casing of categories "3D" => "3d" (#208)
* [tripo] fix negtive_prompt and mv2model (#212)
* [tripo] set default param to None (#215)
* Add description and tooltip to Tripo Refine model. (#218)
* Update.
* Fix rebase errors.
* Fix rebase errors.
* Update templates.
* Bump frontend.
* Add file type info for file inputs.
---------
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: Chenlei Hu <hcl@comfy.org>
Co-authored-by: thot experiment <94414189+thot-experiment@users.noreply.github.com>
Co-authored-by: comfyanonymous <comfyanonymous@protonmail.com>
Co-authored-by: AustinMroz <austinmroz@utexas.edu>
Co-authored-by: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com>
Co-authored-by: Benjamin Lu <benceruleanlu@proton.me>
Co-authored-by: Andrew Kvochko <kvochko@users.noreply.github.com>
Co-authored-by: Pam <42671363+pamparamm@users.noreply.github.com>
Co-authored-by: chaObserv <154517000+chaObserv@users.noreply.github.com>
Co-authored-by: Yoland Yan <4950057+yoland68@users.noreply.github.com>
Co-authored-by: guill <guill@users.noreply.github.com>
Co-authored-by: Terry Jia <terryjia88@gmail.com>
Co-authored-by: Silver <65376327+silveroxides@users.noreply.github.com>
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Co-authored-by: liesen <liesen.dev@gmail.com>
Co-authored-by: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>
Co-authored-by: blepping <157360029+blepping@users.noreply.github.com>
Co-authored-by: Changrz <51637999+WhiteGiven@users.noreply.github.com>
Co-authored-by: WhiteGiven <c15838568211@163.com>
Co-authored-by: seed93 <liangding1990@163.com>
2025-05-27 00:00:58 -07:00
|
|
|
|
2025-10-26 00:35:30 +03:00
|
|
|
async def comfy_entrypoint() -> GeminiExtension:
|
|
|
|
|
return GeminiExtension()
|