arenasys / stable-diffusion-webui-model-toolkit

A Multipurpose toolkit for managing, editing and creating models.
MIT License
508 stars 34 forks source link

Model filenames get truncated when they contain multiple '.' characters in the filename when using the Toolkit tab. #28

Closed tarpeyd12 closed 1 year ago

tarpeyd12 commented 1 year ago

Similar issue to https://github.com/arenasys/stable-diffusion-webui-model-toolkit/issues/27, but was not fixed for the Toolkit tab.

There exists this line in scripts/toolkit_gui.py's get_name(tm, arch) function on line 367:

name = os.path.basename(tm.filename).split(".")[0]

it should read something like this: name = os.path.basename(tm.filename).rsplit(".", 1)[0]

tarpeyd12 commented 1 year ago

I created a pull request with the change in it. The actual change is 1 line, but my editor decided to eliminate trailing whitespace so that's why there are so many lines touched.