transparent-background icon indicating copy to clipboard operation
transparent-background copied to clipboard

[Feature] Provide more control over where the model is downloaded, more info about download

Open set-soft opened this issue 7 months ago • 1 comments

The code currently does:

https://github.com/plemeri/transparent-background/blob/63e3443eddaec9a04ad9dcc86aa8a7ecd95bfe83/transparent_background/Remover.py#L42-L43

Which is quite incomplete IMHO. Just think about the following use: a ComfyUI node uses this code, models for ComfyUI are stored in ComfyUI/models, so you can separate data nicely, so now suppose the nodes sets the environment variable to ComfyUI/models, now you'll get ComfyUI/models/.transparent-background which is supposed to be a hidden file.

I think you should add a second environment variable to fix it (IMO the original environment variable should control the full path, but it doesn't). In this way the user can have full control over the destination for the weights.

A related detail. First time I run the ComfyUI node I saw in the logs it was downloading something. But I couldn't determine what exactly and where. The code already prints progress information, so it should also say what is downloading, from where and its destination. This is not debug information, this is important information. Are you downloading a trojan? How can I verify it? How can I claim the 350 MB if I don't know what to delete?

set-soft avatar May 31 '25 10:05 set-soft

Hi @set-soft, sorry for the late reply.

The ComfyUI that you're saying is not what I did, so I looked into it.

https://github.com/john-mnz/ComfyUI-Inspyrenet-Rembg/blob/87ac452ef1182e8f35f59b04010158d74dcefd06/Inspyrenet_Rembg.py#L34-L37

As you can see, they do not load checkpoint from their end. The code that you referenced is for the regular users who use our package on their own, without any intermediate framework, in this case ComfyUI. So, I think the author of Inspyrenet_Rembg can change the checkpoint loading part by using ckpt option in Remover.

So, long story short, it seems more make sense to control in the ComfyUI module since ComfyUI seems to have its own directories for the model checkpoints.

I hope the author of Inspyrenet_Rembg also adds some other options to control our package so that the users can access to our package with extended controllability as we offer. I thought I might make my own ComfyUI module but the users are already using our work through Inspyrenet_Rembg and thanks to them our package was able to be downloaded this much, so I didn't want to take the ownership from them.

It is always difficult to satisfy all users in different platforms to be honest. I learned a lot from this project and I'm truly grateful for all users who's still using my work and I also thank to you as well for sharing your thought. 😄

plemeri avatar Jul 18 '25 05:07 plemeri