InSPyReNet icon indicating copy to clipboard operation
InSPyReNet copied to clipboard

Suggestion: Upload the zoo to Hugging Face

Open set-soft opened this issue 2 months ago • 0 comments

I created some ComfyUI nodes that supports InSPyReNet and other DIS models.

In the current git code I also added support to the whole Zoo so people can do comparisons with models trained with the same datasets.

I got all working, including the one using Res2Net50 as backbone.

Why don't you upload the zoo to Hugging Face? Just the checkpoints in one repo, not separated repos with individual descriptions. I think Hugging Face is more suitable to distribute trained models.

Also: why not safetensors? They are safer, even when the loading mechanism you use is safe. You could also add metadata about the model, you could even embed the same information you have in the YAML files! You can even serialize the data in JSON format and put it in a variable.

I already repacked various DIS models, here is a BEN (MVANet) example Adding the metadata in the safetensors makes the file self contained. And makes the external YAML optional.

I think the most important detail is the training size, it can't be inferred from the weights (well you might try with an image ... not so practical) and if you use the wrong size the model works really bad.

BTW: InSPyReNet is licensed under MIT, which is the most common license for AI models, but you have the Res2Net v1B code in your repo. I know only one old checkpoint uses it. But looking at is license this is CC BY-NC-SA 4.0 stated here. How do you handle it? I ask because to support the whole Zoo I must do the same ... Also: how does this affect the output of the model using Res2Net50?If the code is for non-commercial use ... you can't generate commercial images using it. I asked the authors in an issue to reconsider it. In particular now that most people is using Swin Transformer. Is funny that Microsoft released it using MIT :-)

set-soft avatar Oct 25 '25 13:10 set-soft