AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
142.1k stars 26.84k forks source link

[Feature Request]: Toggle for extra networks/checkpoints tabs to only show files/cards at a given directory level #15367

Open Vesperindustrial opened 7 months ago

Vesperindustrial commented 7 months ago

Is there an existing issue for this?

What would your feature do ?

Personally I use the tree view to navigate directories but this would work for the directory type as well: Not having all of the cards for the entire subdirectory tree displayed all at once at a given level, like every other typical file browser, it only shows the cards present at that level.

This would probably also help with the initial ui loading/display as when you first click the loras tab it is trying to parse every single item. Currently it makes sorting into folders somewhat less useful without a 'miscallaneous' as if not everything is in a leaf subdirectory then you get not only everything in the current level, but every other level in that directory.

The only time you should be showing everything under a given directory is when you explicitly want it to, Primarily for searches, but I could envision some browsing scenarios as well. So when you actually are using the search box for a search you would either search everything, or have the option to search under the current directory (it should probably be a toggle as I can see why you would want to do either or routinely). This should not be a setting in the settings tab, but a toggle to be switched on and off as needed while using it.

Proposed workflow

  1. Go to Lora/Checkpoint tab
  2. Press on a directory, either in the tree view or the directory view
  3. Files would only show at that selected level unless a subdirectories toggle is enabled
  4. If the user uses the search box, then search everything
  5. If a toggle 'search at current directory level only' is checked, then that search will only search at that directory level and its subdirectories

Additional information

No response

Sj-Si commented 6 months ago

I'm working on ironing out the bugs in a PR that will add this feature. https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/15530 If you want, feel free to pull that branch and let me know if there is anything else that needs fixed or modified.

So in this case, I made it so that clicking on a directory (in tree or dirs views) will only show direct children of that directory in the cards list. Then while you have a directory selected, anything you type in the search box will only filter those direct children. If no directories are selected then the search is applied to every card in all directories/subdirectories.