ComfyUI
ComfyUI copied to clipboard
kornia: why copy instead of import?
Hi folks,
I am one of the kornia maintainers. I wonder is there any reason why you choose to copy from the kornia https://github.com/comfyanonymous/ComfyUI/blob/02409c30d9ea5314e5103d03f7c9933fa1012659/comfy_extras/nodes_canny.py#L1 instead of just importing it? If you have any issues with import, we can surely fix them. Also, by importing kornia, that would be very easy to use lots of image (pre)processing algorithms on GPU, like transforms, many blurs, morphology, etc.
-- Best, Dmytro.
Sorry about that. I was planning on adding some more image processing nodes and properly importing either opencv or kornia and getting rid of that copy paste but never got around to doing it.
No problem, we all know how overwhelming is open source development. If you have some list of image processing nodes in mind, we can do PR adding them, as well as making Canny import. How does it sound?
@comfyanonymous I took a liberty of creating PR myself. It migrates Canny, and also adds morphology nodes, which, as far as I know, are not implemented in other library for RGB images (OpenCV only supports b&w). Let me know, if you like it and/or need other image processing nodes. https://github.com/comfyanonymous/ComfyUI/pull/2781