rembg
rembg copied to clipboard
Follow the XDG standard for storing u2net models
It is a bad practice in GNU/Linux to keep some dot files in the home directory.
There is an XDG standard that says that the directory to store user data files is defined by $XDG_DATA_HOME
variable.
After this refinement, the order for selecting the models directory is as follows:
-
$XDG_DATA_HOME/.u2net
(almost always~/.local/share/.u2net
) -
~/.u2net
(if$XDG_DATA_HOME
is not set)