ComfyUI
ComfyUI copied to clipboard
How to display other files images on web pages?
I add the files in output\Year-month-day, and it getting work, but how to display images on web pages???
nodes.py
import time
class SaveImage: def init(self): #加入含有日期的存储图片路径# today=time.strftime("%Y-%m-%d",time.localtime()) #今天日期
ZZX ="\ComfyUI\output\{}".format(today) #想保存的路径名称
if not os.path.exists(ZZX): #如果不存在
os.makedirs(ZZX) #创建
self.output_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "output\{}".format(today))
Output stuff is really jank. We need to be able to output images from anywhere, and text as well. But right now it seems to be able to only display images from the output and input dir. No where else. My custom node won't display any image when saving to any custom folders.
My friend and I expand this work and its ok, try to add and change these place enough:
I think you can understand and I hope it can be helpful

My friend and I expand this work and its ok, try to add and change these place enough: I think you can understand and I hope it can be helpful
Very nice, so in the example we get images sorted by the day, like in webui. This is an appreciated share, and informational on the flow. Thank you, to you and your friend.