Commit Graph

638 Commits

Author SHA1 Message Date
DenOfEquity
bae1bba891 avoid forcing API to send hr_additional_modules (#2406) 2024-12-02 22:15:59 +00:00
DenOfEquity
70f3499d0f avoid potential unnecessary model load with hiresfix quickbutton (#2189) 2024-10-26 21:48:36 +01:00
altoiddealer
145a46907e Improve option handling (sd_model_checkpoint / forge_additional_modules) (#2181)
* Sort modules when checking for changes
* Compare consistent checkpoint values
2024-10-26 21:10:05 +01:00
DenOfEquity
d4d8ad406e save (Hires) Distilled CFG to infotext (#2172)
changing hires model could lead to not writing
2024-10-24 20:37:34 +01:00
DenOfEquity
9a698e26d6 Properly load/save infotext for empty selection of hrfix additional modules (#2156)
empty selection for *Hires VAE / TE* means 'use modules built-in to the model file', same as top-row VAE / TE selection. But this must be written to infotext as something, to distinguish from the non-HiRes case.
2024-10-23 11:08:45 +01:00
DenOfEquity
0c97a5347a properly load/save 'Use same choices' infotext (#2147)
* save 'Use same choices' to infotext, and load
* reload models as needed for batch iterations
2024-10-22 16:34:40 +01:00
Kazancev Danil
518e3cdbd5 fix txt2img pydantic error (#2138)
Co-authored-by: kazanplova <kazanplova@mt-dev-gpu-hotel-01.novalocal>
2024-10-22 15:31:58 +01:00
DenOfEquity
e4ad1140c8 handle before_process scripts earlier (#2132)
this allows the built-in extension 'extra options section' to override correctly
2024-10-21 11:07:48 +01:00
DenOfEquity
aaa2fe761b Hires additional modules (#2116)
adds selection of none/same/different modules for hiresfix
('Use same choices' default option has priority over other selections made at same time.)
includes saving/loading from infotext
2024-10-21 11:03:12 +01:00
catboxanon
edc46380cc Automatically enable ztSNR when applicable (#2122) 2024-10-19 20:33:34 -04:00
catboxanon
aba35cde5f Fix Zero Terminal SNR option 2024-10-19 12:28:14 -04:00
DenOfEquity
a06cfc9634 Hiresfix checkpoint (#2100)
restores checkpoint selection for highres fix
2024-10-17 13:39:42 +01:00
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
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
cb412b290b CFG and Distilled CFG for hiresfix (#1810) 2024-09-13 15:01:40 +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
layerdiffusion
d1d0ec46aa Maintain patching related
1. fix several problems related to layerdiffuse not unloaded
2. fix several problems related to Fooocus inpaint
3. Slightly speed up on-the-fly LoRAs by precomputing them to computation dtype
2024-08-30 15:18:21 -07:00
layerdiffusion
df598c4df5 add "Diffusion in Low Bits" to info text 2024-08-22 23:23:14 -07:00
layerdiffusion
08f7487590 revise "send distilled_cfg_scale when generating hires conds" 2024-08-22 06:35:13 -07:00
DenOfEquity
bfd7fb1d9f send distilled_cfg_scale when generating hires conds (#1403) 2024-08-22 06:33:48 -07:00
layerdiffusion
14ac95f908 fix 2024-08-20 01:37:01 -07:00
layerdiffusion
d38e560e42 Implement some rethinking about LoRA system
1. Add an option to allow users to use UNet in fp8/gguf but lora in fp16.
2. All FP16 loras do not need patch. Others will only patch again when lora weight change.
3. FP8 unet + fp16 lora are available (somewhat only available) in Forge now. This also solves some “LoRA too subtle” problems.
4. Significantly speed up all gguf models (in Async mode) by using independent thread (CUDA stream) to compute and dequant at the same time, even when low-bit weights are already on GPU.
5. View “online lora” as a module similar to ControlLoRA so that it is moved to GPU together with model when sampling, achieving significant speedup and perfect low VRAM management simultaneously.
2024-08-19 04:31:59 -07:00
DenOfEquity
93bfd7f85b invalidate cond cache if distilled CFG changed (#1240)
* Update processing.py

add distilled_cfg_scale to params that invalidate cond cache

* Update ui.py

distilled CFG and CFG step size 0.1 (from 0.5)
2024-08-17 19:34:11 -07:00
layerdiffusion
0f266c48bd make clear_prompt_cache a function 2024-08-17 19:00:13 -07:00
lllyasviel
61f83dd610 support all flux models 2024-08-13 05:42:17 -07:00
layerdiffusion
19b41b9438 Add option to experiment with results from other impl
Setting -> Compatibility -> Try to reproduce the results from external software
2024-08-11 17:02:50 -07:00
lllyasviel
cfa5242a75 forge 2.0.0
see also discussions
2024-08-10 19:24:19 -07:00
layerdiffusion
593455c4de global unload after env var change 2024-08-08 22:34:55 -07:00
layerdiffusion
20e1ba4a82 fix 2024-08-08 15:08:20 -07:00
lllyasviel
6921420b3f Load Model only when click Generate
#964
2024-08-08 14:51:13 -07:00
layerdiffusion
a189f3e53e distilled cfg scale info text 2024-08-08 01:22:27 -07:00
layerdiffusion
572a3c3d8b distilled cfg scale 2024-08-08 00:57:40 -07:00
layerdiffusion
653be0a3ad comments 2024-08-08 00:20:15 -07:00
layerdiffusion
396d9f378d we do not need to waste 10 seconds on T5 when CFG=1 2024-08-08 00:19:16 -07:00
lllyasviel
a6baf4a4b5 revise kernel
and add unused files
2024-08-07 16:51:24 -07:00
lllyasviel
71eaa5ca12 rework UI so that the toolbar is managed by Forge 2024-08-06 13:54:06 -07:00
layerdiffusion
ae1d995d0d Finally removed model_hijack
finally
2024-08-05 21:05:25 -07:00
layerdiffusion
27641043ee remove dirty cond_stage_key 2024-08-05 11:39:20 -07:00
layerdiffusion
d77582aa5a fix img2img inpaint model 2024-08-05 11:36:08 -07:00
layerdiffusion
bccf9fb23a Free WebUI from its Prison
Congratulations WebUI. Say Hello to freedom.
2024-08-05 04:21:35 -07:00
layerdiffusion
0863765173 rework sd1.5 and sdxl from scratch 2024-08-05 03:08:17 -07:00
layerdiffusion
9679232d29 fix TI embedding info text
original webui is also broken but forge is fixed now
2024-08-04 18:49:35 -07:00
layerdiffusion
a72154405e Text Processing Engine is Finished
100% reproduce all previous results, including TI embeddings, LoRAs in CLIP, emphasize settings, BREAK, timestep swap scheduling, AB mixture, advanced uncond, etc
Backend is 85% finished
2024-08-04 18:42:51 -07:00
layerdiffusion
8c087f920e rename files 2024-08-03 15:54:39 -07:00
layerdiffusion
f6a0c69f0f fix ADetailer 2024-07-26 15:11:12 -07:00
layerdiffusion
e26abf87ec Gradio 4 + WebUI 1.10 2024-07-26 12:02:46 -07:00
lllyasviel
10b5ca2541 vae already sliced in inner loop 2024-03-08 00:40:33 -08:00
Chengsong Zhang
b9705c58f6 fix alphas cumprod (#478)
* fix alphas cumprod

* indentation
2024-03-04 01:03:32 -06:00