Closed sansmoraxz closed 1 day ago
The migration work is done by scanning the model and then scanning the related files. The working principle is basically the same as the scanned model list.
The error you are encountering may be caused by other problems.
Yeah, seems like an edge case.
This extension https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved adds objects to folder_paths.
For example these:
https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved/blob/main/video_formats/av1-webm.json
Perhaps that's why it's being treated. In any case these cannot be treated as metadata.
Also basic schema validation with the old model should happen (cause who knows if some other extension follows similar naming convention but different keys).
Thanks for the information, it helped me a lot. These issues do need to be considered more rigorously.
Not all json files in models folders are metadata, but presently it's scanning all txt, json and image files https://github.com/hayden-fr/ComfyUI-Model-Manager/blob/1796b101c565f527b5c459dc016f65288499c006/py/services.py#L263-L272
However ideally there should be a check for whether the json file is related to a model or not. In my case it was giving error for line 270 for animatediff artifacts because it was not able to find corresponding field in the model.
Same with the other artifacts that's being scanned.