Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In OutPathBuilder, [model] is defined as "model name", however this parameter includes a subpath component. Proposal to add [model_filename]. #404

Closed
brendanhoar opened this issue Jun 15, 2024 · 11 comments

Comments

@brendanhoar
Copy link

brendanhoar commented Jun 15, 2024

For the purposes of the below, assume agreement on leaving out the file extension.

Issue:
I would like to use the model filename as part of my OutPathBuilder format string. As per the on screen documentation, [model] is defined as "model name". However, in reality [model] is "full sub path to model under the top level model directory."

Example/Request:
And since a picture is worth a thousand words, see yellow highlighted bits in the example below. In this example I would have preferred to only see [model] return "picxReal_10" instead of "_offload_i_sd15picxReal_10". Since [model] is already defined the way it is, I propose adding [model_filename] that does what I am requesting, which does not use the intervening directories in the output string.

  1. The definition of [model] is shown in GUI, as well as the example format string I entered:

filenaming_01

The generation screen showing the model sub-path:

filenaming_02

The resulting output path assigned to the image file, with the subpath component (slashes stripped) that I do not want:

filenaming_04

PS - if proposed enhancement is accepted, the on-screen documentation for [model] would obviously need to be updated.

mcmonkey4eva added a commit that referenced this issue Jun 15, 2024
@mcmonkey4eva
Copy link
Contributor

Oh that'd be [model_title]
The full documentation for out path builder didn't fit in a popup so the popup just links https://github.com/Stability-AI/StableSwarmUI/blob/master/docs/User%20Settings.md#path-format which documents model_title

[model]: the filename of the model
[model_title]: the metadata title of the model

*I've fixed the link to be clickable instead of just text of the url, heh

@brendanhoar
Copy link
Author

No, that's not what I am asking for.

I am requesting the model filename (at the operating system level), not anything from the internal metadata.

B

@mcmonkey4eva
Copy link
Contributor

You want... the filename, but not the full filename, and not the title either... why so specific? 0.o

@mcmonkey4eva mcmonkey4eva reopened this Jun 15, 2024
@brendanhoar
Copy link
Author

brendanhoar commented Jun 15, 2024

Basically:

Here are things that are the filename:
picxReal_10.safetensors

Here are things that are not the filename:
This OS-view file path is: G:\___all_webuis\StableSwarmUI\Models\Stable-Diffusion\_offload_i\_sd15\picxReal_10.safetensors
This app-view file path is: _offload_i\_sd15\picxReal_10.safetensors

I do not want any of the directory parts of the path, only the file name component.

 There are only two hard things in Computer Science: cache invalidation and naming things.

 -- Phil Karlton

(edits: backslashes are cursed, whyyyy)

@mcmonkey4eva
Copy link
Contributor

My question was why

@brendanhoar
Copy link
Author

brendanhoar commented Jun 15, 2024

My question was why

Short version number 1:
Well, at some point model organizing will become several more directory layers deep and it will just be too much noise in the filename. My policy is not to change data inside the files (e.g. metadata edits) as I have a slow side project of comparing hashes of files and file components, so directory organizing will continue to be useful here.

Short version number 2:
I've always done it that way with A1111. I'm probably not the only one.

@mcmonkey4eva
Copy link
Contributor

If you haven't customized metadata on the model, the title is the filename without directory info

@brendanhoar
Copy link
Author

brendanhoar commented Jun 15, 2024

That may be the case most of the time, but I have downloaded files which display a "Title" that does not match the filename. I think is only the filename under certain metadata conditions? I did not customize the metadata (perhaps the uploader did).

filenaming_06

B

@mcmonkey4eva
Copy link
Contributor

yes the uploader set a title on their model

@mcmonkey4eva
Copy link
Contributor

oh this is delayed for me to remember sorry, but that's what this option is for:

image

@brendanhoar
Copy link
Author

lol ok thanks man, I should have investigated more. :)

B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants