Skip to content

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

@set-soft

Description

@set-soft

The code currently does:

cfg_path = os.environ.get('TRANSPARENT_BACKGROUND_FILE_PATH', os.path.abspath(os.path.expanduser('~')))
home_dir = os.path.join(cfg_path, ".transparent-background")

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions