Metadata Forge Update: Folder Batching, Passthrough Wiring, and Per File Timestamps (Patreon)
Content
Here is everything that changed and how to actually wire it up. (The new METADATA FORGE workflow has everything already wired up, if you head over to the post and redownload everything, it should be working properly)
What's new
Image and video passthrough. Read Metadata now has an image_in input, and Read Video Metadata has a video_in input. Wire a generated image or video straight in and it passes through untouched.
Folder batching. Both read nodes can process an entire folder instead of one file. New load_entire_folder toggle, a Choose folder button, plus include_subfolders and max_files.
A real folder picker. The button opens a browser that walks the folders on the machine running ComfyUI and tells you how many matching files are in each one before you commit. No typing paths, no copying files anywhere. It reads them in place.
New source_name output on both read nodes. This is the original filename minus the extension, and it is what makes per file timestamps work.
New source_name input on both iPhone preset nodes.
Drag and drop, paste, and the upload button all still work exactly as before. Nothing about single file use changed.
Setup 1: bolting it onto the end of a generation workflow
This is the one I use most. Your generation workflow ends in an image, and instead of saving that image straight out, you route it through the metadata pipeline so everything lands clean automatically.
Take the IMAGE output from your sampler chain and run it into image_in on Read Metadata. Then Read Metadata's IMAGE output goes to Save Image with Metadata, and iPhone Metadata Preset feeds metadata_json into that same save node. That's it. Three nodes on the end of any workflow.
One thing to understand: an image sitting in your workflow is a tensor in memory. It has no EXIF, no PNG text chunks, nothing. So when you pass one through, metadata_text comes back empty and tells you so. That is correct behavior, not a broken node. The read node is acting as a passthrough there, and the preset node is what supplies the actual camera data going onto the file.
Video is different. A VIDEO object usually still points at a real file, so wiring video_in gives you the genuine container tags and stream info off that file.
Setup 2: cleaning out a folder you already have
For a backlog of already generated content, the read node becomes the batch driver.
Drop in Read Metadata and turn load_entire_folder on.
Click Choose folder and browse to your folder. It shows you a live count like "212 image files in this folder" so you know you are pointing at the right place before you commit.
Set include_subfolders if your content is organized in subfolders. The count updates to match.
Leave max_files at 0 for everything, or set it to 5 for a test run first. I always test on 5.
Wire IMAGE into Save Image with Metadata and the preset node into metadata_json, same as before.
Hit run and ComfyUI executes the rest of the chain once per file. Different sized images are fine, they are handled one at a time rather than jammed into a single batch tensor.
The part that actually matters: per file dates
Set datetime_mode to random_last_n_days and random_days_range to 30, and the preset node picks a random moment in that 30 day window. The catch is that the preset node used to run once, so that one random roll got stamped onto every file in the folder.
Fix is one wire. Run source_name from the read node into source_name on the iPhone preset node.
That tells ComfyUI to run the preset once per file, so each image gets its own date, its own time, and its own subsecond value. I tested it on 8 files and got 8 different timestamps spread across 7 different calendar days, all inside the 30 day window. That is what a real camera roll looks like.
Manual mode ignores this and keeps your exact typed date on everything, which is what you want when you are backdating a set to one specific day.
Mistakes to avoid
Running a folder without wiring source_name. Every file gets an identical timestamp.
Expecting metadata out of image_in. A tensor has no EXIF. Empty output is correct.
Forgetting ComfyUI embeds your full prompt and workflow JSON into saved PNGs. Anyone who opens the file can read your entire graph.
Running a 2000 file folder before testing. Set max_files to 5 first.
Leaving the file picker set to an old image and wondering which one is being used. In folder mode the picker is ignored, it just still shows a filename.
Assuming the folder toggle overrides a wired input. It does not. A wired image_in always wins, then the folder toggle, then the picker.
How to Update to Metadata Forge V2
This is a clean replace, not a patch. Delete the old folder, drop in the new one. It takes about two minutes and none of your settings live inside the node pack, so there is nothing to back up.
‼️Grab comfyui-loratech-metadata-forge.zip (THIS IS UPDATED WITH THE VERSION 2 CHANGES ADDED) from the original Metadata Forge post before you start: https://www.patreon.com/LoRAtech/posts/metadata-forge-164266037 ‼️
Step 1: Close ComfyUI completely
Not just the browser tab. Close the console window that ComfyUI runs in as well. Windows will refuse to delete files that a running Python process still has open, and a half deleted node pack is the single most common way this goes wrong.
Step 2: Delete the old folder
Open your ComfyUI install and go into the custom_nodes folder. On the portable build that is ComfyUI_windows_portable\ComfyUI\custom_nodes.
Find the folder named comfyui-loratech-metadata-forge. If you installed by unzipping before, it might be named something like comfyui-loratech-metadata-forge-main. Same thing, delete it.
Delete the whole folder. Do not just copy the new files over the top of it. The old version leaves behind compiled __pycache__ files, and those will happily keep running instead of the new code and leave you wondering why nothing changed.
Step 3: Unzip the new one
Extract the zip into that same custom_nodes folder.
Check the folder depth. You want custom_nodes\comfyui-loratech-metadata-forge\__init__.py. If you end up with custom_nodes\comfyui-loratech-metadata-forge\comfyui-loratech-metadata-forge\__init__.py, Windows nested it one level too deep. Move the inner folder up and delete the empty outer one.
Inside the folder you should see __init__.py, pyproject.toml, server_routes.py, a nodes folder and a web folder. If server_routes.py or web are missing, you unzipped the old version.
Step 4: Start ComfyUI and hard refresh
Start ComfyUI, wait for it to finish loading, then in the browser press Ctrl+Shift+R.
Do not skip the hard refresh. This version ships browser side code for the folder picker, and your browser will keep serving the old cached version until you force it. If the Choose folder button does nothing when you click it, this is almost always why.
Step 5: Confirm it worked
Add a Read Metadata (LoRAtech) node and look for these, which did not exist in the old version:
An image_in input dot on the left side.
A load_entire_folder toggle.
A Choose folder button under the upload button.
A source_name output on the right side.
Click Choose folder. If a browser window opens listing your drives, everything is wired up correctly.
If something is wrong
Nodes missing entirely. Check the ComfyUI console for a red import error. Nine times out of ten it is the nested folder problem from step 3.
Choose folder does nothing. Hard refresh again with Ctrl+Shift+R. If it still does nothing, fully close and reopen the browser.
An error mentioning piexif. The pack needs the piexif library. If you were running the old version it is already installed. On the portable build you can install it by opening a command window in the ComfyUI_windows_portable folder and running python_embeded\python.exe -m pip install piexif.
An old workflow looks odd. The read node gained several widgets in this version. Existing workflows load fine, but if any widget shows a value that makes no sense, set it back by hand and save. Deleting the node and adding a fresh one also fixes it.