Commit Graph

8525 Commits

Author SHA1 Message Date
altoiddealer
2c543719e3 Improve options management (#2078)
- `/sdapi/v1/options` GET now calls `get_config()` from **sysinfo** module, instead of from its own version of the function.

- Defined a new, flexible and more robust `set_config()` function in **sysinfo** module, which:
  - obsoletes redundant code
  - skips updating values that are unchanged
  - has flexible args for both API and UI use

- `/sdapi/v1/options` POST and `override_settings` now use the new `set_config()` function.  `set_config()` could possibly obsolete additional functions, but I'm not going to get into that just yet.

- Options for `forge_additional_modules` can now be provided either as the file path, or just the module name.

- Most importantly, `refresh_model_loading_parameters()` is now only called ONCE per request, and **only** if necessary.

- It is now much easier to call `shared.opts.save()` as needed
2024-10-16 11:21:54 +01:00
altoiddealer
cce30d3340 Include Extra Images via API (#2066) 2024-10-15 13:52:08 +01:00
DenOfEquity
b4d2266dc6 Checkpoint vae+te metadata should be in new attribute (#2073)
* new metadata in new attribute
maintain compatibility with old webui by not reusing the vae metadata attribute
2024-10-15 13:40:15 +01:00
altoiddealer
77464215c3 Make SD Models work with Override Settings (#2054)
* Do refresh load params for modules
* Adjust call order for model mgmt/prompt cache
* new function `manage_model_and_prompt_cache()` to improve code clarity
2024-10-14 11:47:39 +01:00
altoiddealer
862c7a589e API Improvements: Modules Change AND Restore override_settings (#2027)
* Improve API modules change
* Restore override_settings and make it work
* Simplify some memory management
2024-10-13 12:29:02 +01:00
DenOfEquity
ae8187bf2d Unload all models control (#2038)
* make unload_model_weights do that
* rename Settings > Actions > unload checkpoint button to 'Unload all models'
* remove (comment out) reload button, as it does nothing and is unlikely to ever do anything since models are loaded on demand
2024-10-12 12:51:26 +01:00
DenOfEquity
82eb756617 checks for GPU weights from Settings (#2019)
for the case when GPU has changed and saved settings are not possible anymore
2024-10-09 22:10:06 +01:00
DenOfEquity
7eb824a0da fix for control images (#2011) 2024-10-08 13:37:46 +01:00
DenOfEquity
4b695514de preserve infotext with Extras > Single Image (#2006)
credit to @PumpkinHat
https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/1779#issuecomment-2364974588
2024-10-08 12:18:39 +01:00
Won-Kyu Park
c0a7438fd8 partial revert to fix compatible issue (#1892)
* partial revert to fix A1111 compatible issue
* fix for submit_extras()
2024-10-08 11:13:32 +01:00
layerdiffusion
e9d1736b9f [bot] dep ver 2024-10-07 20:52:55 -07:00
DenOfEquity
cc378589a4 (T5) pad chunks to length of largest chunk (#1990)
When the prompt is chunked using the BREAK keyword, chunks will be padded to the minimum size of 256 tokens - but chunks can be longer. torch.stack then fails if all chunks are not the same size, so find the largest and pad all to match.
#1988 (doesn't quite ID the real issue, prompts longer than 255 tokens work fine)
2024-10-07 11:37:06 +01:00
layerdiffusion
1d3f73b78d [bot] dep ver 2024-10-06 18:27:37 -07:00
DenOfEquity
2467c88c50 fix for XPU (#1997)
use float32 for XPU, same as previous fix for MPS
2024-10-06 14:33:47 +01:00
layerdiffusion
4f7f815b9f [bot] sync 2024-10-05 20:04:57 -07:00
layerdiffusion
953e3f3983 [bot] sync 2024-10-04 21:45:43 -07:00
layerdiffusion
7d88741f57 fix 2024-10-04 13:00:22 -07:00
layerdiffusion
4e16689ea9 update dep ver 2024-10-04 12:20:33 -07:00
layerdiffusion
4baf8ffb9c less prints 2024-10-03 21:23:56 -07:00
layerdiffusion
dc4f5e4119 remove some assets and dependences from repo 2024-10-03 21:17:51 -07:00
DenOfEquity
34609fde67 fix Extra networks tree show / edit (#1973)
Fix 'Show internal metadata' and 'Edit metadata' buttons when used from treeview. Issue seems like an oversight from an upstream change to handle filenames with an apostrophe.
#1244
2024-10-03 18:44:35 +01:00
altoiddealer
f4d5e8cac1 Apply memory changes via API (#1954)
Actually apply memory related changes posted to `/sdapi/v1/options`:
- 'forge_inference_memory'
- 'forge_async_loading'
- 'forge_pin_shared_memory'
2024-10-01 21:34:11 +01:00
DenOfEquity
f5190349b4 improved extra network search (#1953)
multiple search terms possible, split by ' '
also improved handling when changing UI setting
2024-09-30 15:13:11 +01:00
DenOfEquity
86d003266b Fix for comments in prompts with styles (#1948)
(#1862)
a fix for the 0.01% who use comments in prompts. Before this, styles could be considered part of a comment.

strips comments from prompts first, then from each applied style before merge
same process for extracting styles from prompts
updated tooltips for toolbuttons to apply styles
removed code made redundant by this change, from modules.processing_scripts.comments
2024-09-30 11:16:55 +01:00
DenOfEquity
22e2bc3bc0 handle old preference vae metadata (#1935) 2024-09-28 13:06:26 +01:00
DenOfEquity
2d3903db68 fix for null checkpoint with API (#1916)
#1915 API oversight
2024-09-26 09:28:04 +01:00
DenOfEquity
7876862c43 Vae/te preferences via cards (#1912)
Allows setting of preferred VAE and Text encoder(s) for checkpoints when selected via Checkpoint cards. No selection saved means no change to current toprow setting. 'Built in' option, if the only choice, means clear the toprow selection (therefore use vae/te built-in to checkpoint).
Also allows setting model type for checkpoints (SD1/SD2/SDXL/Flux/Unknown) (user set only, no attempt at autodetection), enabling filtering of the cards based on UI preset.
2024-09-25 20:45:11 +01:00
DenOfEquity
c2d290e6c9 respect disable lora filtering setting (#1904) 2024-09-24 11:58:23 +01:00
DenOfEquity
b1256b5fc9 More UI settings (#1903)
adds options for user-set defaults for Sampler and Scheduler to UI settings sd, xl, flux;
adds options for user-set defaults for GPU Weights to UI settings xl, flux;
necessitates change to .input event listener instead of .release for ui_forge_inference_memory, which may be more correct anyway.
2024-09-24 11:40:44 +01:00
DenOfEquity
a82d5d177c restore lora version filtering (#1885)
Added Flux to lora types in extra networks UI, so user can set.
Loras versioned first by user-set type, if any. Falls back to heuristics - these are much more reliable than the removed old A1111 tests and in case of no match default to Unknown (always displayed).
Filtering is done based on UI setting. 'all' setting does not filter. Filters lora lists on change.
Removed unused 'lora_hide_unknown_for_versions' setting.
2024-09-23 14:53:58 +01:00
DenOfEquity
95b54a27f1 Settings for UI defaults (#1890)
Three new settings pages, used by UI presets sd, xl, flux. Defaults unchanged.
2024-09-22 15:14:17 +01:00
DenOfEquity
bc0dece356 show neg prompt in lora tab (compact layout) (#1882) 2024-09-21 12:14:34 +01:00
Melyns
b20cb4bf0e temp fix for preprocessor_revision.py (#1860)
fix for #1420. Skip noise augmentation if model doesn't provide the method; allows Revision controlnet preprocessors to function.
2024-09-19 01:09:51 +01:00
DenOfEquity
93bcfd30fa opts for sigma_min and _max as Sliders (#1848)
Previously these were Numbers, and limited to integers, with no range check.
Some schedulers don't respect these values anyway, but that's a different issue.
2024-09-17 18:08:24 +01:00
DenOfEquity
cd244d29d7 add UI defaults for HiRes CFG (#1849) 2024-09-17 18:07:43 +01:00
DenOfEquity
791f04f71e autoset width and height (#1838)
* autoset width and height

When loading into img2img, added an option to autoset Width and Height from image (Settings -> img2img ->After loading into Img2img, automatically update Width and Height).
Also fixed scale_by display, now correctly rounded to multiple of 8
Also fixed img2img new width/height calculation, same way, (affects infotext)

* Update ui.py: hide progress animation on image size change
2024-09-16 19:14:31 +01:00
Haoming
210af4f804 [Space] Add the ability to reinstall requirements specifically (#1783)
* reinstall

* force_download=False
2024-09-14 12:54:52 +01:00
Conor Nash
8bd7e0568f Get Flux working on Apple Silicon (#1264)
Co-authored-by: Conor Nash <conor@nbs.consulting>
2024-09-13 15:40:11 +01:00
DenOfEquity
cb412b290b CFG and Distilled CFG for hiresfix (#1810) 2024-09-13 15:01:40 +01:00
DenOfEquity
e55cde9b33 better (not 100%) generate forever
Now doesn't spam clicks, so cancel will stop.
So works correctly when swapping tabs within webui.
But still won't continue generating if switch browser tab or minimise browser. It's like the click doesn't get processed. Possibly related to notification sound not playing if tab not active.
2024-09-12 10:58:59 +01:00
DenOfEquity
720b80daea force clipskip to int (#1775)
#1760, original solution by cmdr2. extended to 2 other locations where setting is read. I could replicate the issue only by manually entering a decimal value.

Possibly also #1764. Though I don't know how the clipskip setting became a string.
2024-09-10 14:39:53 +01:00
Panchovix
c13b26ba27 Rephrase low GPU warning (#1761)
Make emphasis that it's performance degradation, and for this diffusion process.
2024-09-09 14:30:22 -03:00
layerdiffusion
efe6fed499 add a way to exchange variables between modules 2024-09-08 20:22:04 -07:00
layerdiffusion
85f08eacc4 update quicklist 2024-09-08 18:51:38 -07:00
layerdiffusion
9439319007 better way to load google files 2024-09-08 18:03:14 -07:00
layerdiffusion
f40930c55b fix 2024-09-08 17:24:53 -07:00
DenOfEquity
c2c3decab2 SelfAttentionGuidance updates (#1725)
* SAG updates

* restore settings from infotext
* bypass if model is Flux (would error during generation)
* bypass if CFG == 1 (would error during generation)
* add control of blur mask threshold (previously hardcoded)
* change to InputAccordion

* forge_sag.py: update title
2024-09-08 21:09:55 +01:00
DenOfEquity
7d5b31bb78 restore use of Settings for hiresfix options (#1706)
Re-enables *hires_fix_show_sampler* and *hires_fix_show_prompts* user-configurable settings.

Also corrects the reported result width x height; now rounded down to multiple of 8.

#1247
2024-09-08 21:08:44 +01:00
layerdiffusion
44eb4ea837 Support T5&Clip Text Encoder LoRA from OneTrainer
requested by #1727
and some cleanups/licenses
PS: LoRA request must give download URL to at least one LoRA
2024-09-08 01:39:29 -07:00
layerdiffusion
c3366a7689 exclude torch jit objects from space memory management
todo: fix a bug that torch jit module offload does not work on some versions
2024-09-07 19:08:17 -07:00