Closed wutipong closed 1 year ago
Shouldn't you just escape your path, so that patterns can be used in it?
/some/path/torch\[gpu\]/images
sorta deal?
I thought that would work. However, after trying it it ... somehow the images become NoneType
at another node's input.
I'm not well verse enough in Python nor the ComfyUI to know what's going on. Strangely enough that patch work just fine.
Oh and looks like the proper way to escape the path is to wrap []
around the [
(ie. [[]
).
Some of the images I have is a directory with path containing
[
or]
character. This is interpret by theglob.glob()
function as a pattern rather than parts of the path. This results in image list being empty and causeindex out of bound
error.This patch escape the path so it's not considered as a pattern.
Without this patch, the user has to enter the escaped path instead which can be tricky.