aboutsummaryrefslogtreecommitdiffstats
path: root/modules/modelloader.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #10823 from akx/model-loadyAUTOMATIC11112023-06-271-4/+27
|\ | | | | Upscaler model loading cleanup
| * Fix up `if "http" in ...:` to be more sensible startswithsAarni Koskela2023-06-131-1/+1
| |
| * Move `load_file_from_url` to modelloaderAarni Koskela2023-06-131-3/+26
| |
* | Use os.makedirs(..., exist_ok=True)Aarni Koskela2023-06-131-2/+1
|/
* change upscalers to download models into user-specified directory (from ↵AUTOMATIC2023-05-191-2/+5
| | | | commandline args) rather than the default models/<...>
* add UI to edit defaultsAUTOMATIC2023-05-101-17/+10
| | | | | | allow setting defaults for elements in extensions' tabs fix a problem with ESRGAN upscalers disappearing after UI reload implicit change: HTML element id for train tab from tab_ti to tab_train (will this break things?)
* ruff auto fixesAUTOMATIC2023-05-101-1/+1
|
* imports cleanup for ruffAUTOMATIC2023-05-101-1/+0
|
* manual fixes for ruffAUTOMATIC2023-05-101-3/+3
|
* Merge pull request #10025 from acncagua/Upscaler_initializationAUTOMATIC11112023-05-081-3/+0
|\ | | | | Initialize the upscalers
| * No double calls will be madeAcncagua Slt2023-05-041-3/+0
| | | | | | Do not call load_upscalers in list_builtin_upscalers
* | directory hiding for extra networks: dirs starting with . will hide their ↵AUTOMATIC2023-05-081-19/+8
|/ | | | | | | | cards on extra network tabs unless specifically searched for create HTML for extra network pages only on demand allow directories starting with . to still list their models for lora, checkpoints, etc keep "search" filter for extra networks when user refreshes the page
* Move `load_file_from_url`ArrowM2023-03-221-1/+1
| | | | | Why? one of the internal calls of `load_file_from_url` import cv2, which locks the cv2 site-package, which extensions may (and in our case, is) breaking the installation of some libraries. The base project should be limiting its import of unnecessary libraries when possible during the installation phase.
* use lowercase name for sorting; keep `UpscalerLanczos` and `UpscalerNearest` ↵Brad Smith2023-03-061-2/+2
| | | | | | at the start of the list with `UpscalerNone` Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
* sort upscalers by nameBrad Smith2023-02-241-2/+6
|
* Update modelloader.pyspezialspezial2023-02-041-0/+3
| | | os.path.getmtime(filename) throws exception later in codepath when meeting broken symlink. For now catch it here early but more checks could be added for robustness.
* add more stuff to ignore when creating model from configAUTOMATIC2023-01-101-1/+3
| | | | prevent .vae.safetensors files from being listed as stable diffusion models
* Make it so that upscalers are not repeated when restarting UI.AUTOMATIC2023-01-031-0/+20
|
* add built-in extension systemAUTOMATIC2022-12-031-15/+5
| | | | | add support for adding upscalers in extensions move LDSR, ScuNET and SwinIR to built-in extensions
* Label and load SD .safetensors model filesTim Patton2022-11-191-0/+1
|
* add resrgan 8x, allow use 1x and up to 8x extra models, move BSRGAN model, ↵victorca252022-10-301-0/+3
| | | | add nearest
* Merge branch 'master' into ScuNETd8ahazard2022-10-021-2/+3
|\
| * fix incorrect use of glob in modelloader for #1410AUTOMATIC2022-10-021-1/+1
| |
| * Logging....d8ahazard2022-09-301-1/+0
| | | | | | | | Cleanup. Sorry.
| * Fix recursive model loadingd8ahazard2022-09-301-1/+3
| | | | | | | | Ensure we find checkpoints within subdirectories.
* | Optimize model loaderd8ahazard2022-09-301-3/+16
|/ | | | | | Child classes only get populated to __subclassess__ when they are imported. We don't actually need to import any of them to webui any more, so clean up webUI imports and make sure loader imports children. Also, fix command line paths not actually being passed to the scalers.
* remove unwanted formatting/functionality from the PRAUTOMATIC2022-09-301-1/+8
|
* undo upscaler model filename tamperingAUTOMATIC2022-09-301-1/+0
|
* Fixes, cleanup.d8ahazard2022-09-301-14/+0
|
* Holy $hit.d8ahazard2022-09-291-20/+54
| | | | | | | | | | | | | | | | | Yep. Fix gfpgan_model_arch requirement(s). Add Upscaler base class, move from images. Add a lot of methods to Upscaler. Re-work all the child upscalers to be proper classes. Add BSRGAN scaler. Add ldsr_model_arch class, removing the dependency for another repo that just uses regular latent-diffusion stuff. Add one universal method that will always find and load new upscaler models without having to add new "setup_model" calls. Still need to add command line params, but that could probably be automated. Add a "self.scale" property to all Upscalers so the scalers themselves can do "things" in response to the requested upscaling size. Ensure LDSR doesn't get stuck in a longer loop of "upscale/downscale/upscale" as we try to reach the target upscale size. Add typehints for IDE sanity. PEP-8 improvements. Moar.
* Remove debugging messaged8ahazard2022-09-271-1/+0
|
* Use model loader with stable-diffusion too.d8ahazard2022-09-271-7/+18
| | | | | | | | | | Hook the model loader into the SD_models file. Add default url/download if checkpoint is not found. Add matching stablediffusion-models-path argument. Add message that --ckpt-dir will be removed in the future, but have it pipe to stablediffusion-models-path for now. Update help strings for models-path args so they're more or less uniform. Move sd_model "setup" call to webUI with the others. Ensure "cleanup_models" method moves existing models to the new locations, including SD, and that we aren't deleting folders that still have stuff in them.
* Cleanup existing directories, fixesd8ahazard2022-09-261-0/+38
|
* Re-implement universal model loadingd8ahazard2022-09-261-0/+65