Commit Graph

4772 Commits

Author SHA1 Message Date
layerdiffusion
dc4f5e4119 remove some assets and dependences from repo 2024-10-03 21:17:51 -07: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
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
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
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
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
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
9439319007 better way to load google files 2024-09-08 18:03:14 -07: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
accf133a38 Upload "Google Blockly" prototyping tools 2024-09-07 01:43:40 -07:00
layerdiffusion
66211d9a06 add a way to add samplers dynamically 2024-09-07 01:43:12 -07:00
DenOfEquity
3dd5e19c83 Extras tab: gfpgan and cf fixes (#1722)
* fix GFPGAN to work with visibility < 1
* fix codeformer to work with visibility < 1
* try harder to download GFPGAN model. Old method would download only if there were no .pth models in the GFPGAN directory. If codeformer was used before GFPGAN, the supporting models are already downloaded into the GFPGAN directory.
2024-09-06 14:09:09 +01:00
DenOfEquity
668e87f920 keep user drawn foreground in img2img sub-tabs (#1666)
preserve (flatten) user-drawn foregrounds from Sketch and Inpaint sketch tabs when copying
2024-09-02 22:32:20 +01:00
cluder
4f64f6daa4 Fix model loading during Checkpoint Merging #1359,#1095 (#1639)
* Fix Checkpoint Merging #1359,#1095

- checkpoint_list[] contains the CheckpointInfo.title which is "checkpointname.safetensor [hash]"
  when a checkpoint is selected to be loaded during merge, we try to match it with just "checkpointname.safetensor".
  -> use checkpoint_aliases[] which already contains the checkpoint key in all possible variants.
- replaced removed sd_models.read_state_dict() with sd_models.load_torch_file()
- replaced removed sd_vae.load_vae_dict() with sd_vae.load_torch_file()
- uncommented create_config() for now, since it calls a removed method: sd_models_config.find_checkpoint_config_near_filename()

* Follow up merge fix for #1359 #1095

- read_state_dict() does nothing, replaced 2 occurrences with load_torch_file()
- now merging actually merges again
2024-08-31 17:09:06 -07:00
DenOfEquity
69ffe37f14 Merge pull request #1538 from Haoming02/inpaint-brush-option
Reimplement Brush Color Settings
2024-08-31 22:19:43 +01:00
DenOfEquity
87abf98815 Update ui.py
hide the color/opacity/softness controls on the inpaint tab:
consistent with high contrast option + 
they don't offer real control anyway (color irrelevant to mask, mask gets thresholded to binary)
2024-08-31 22:16:47 +01:00
layerdiffusion
70a555906a use safer codes 2024-08-31 10:55:19 -07:00
DenOfEquity
33b5b9d247 Merge pull request #1582 from DenOfEquity/tae-flux
add the new Tiny AutoEncoder for flux by madebyollin
2024-08-31 13:15:10 +01:00
DenOfEquity
f36fa7dc1a fix for sd2 2024-08-31 13:05:02 +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
DenOfEquity
7ffd124a9e add the new flux version
Ideally there would be an 'is_flux' bool to check; using `is not shared.sd_model.is_webui_legacy_model():` instead.
2024-08-29 16:41:47 +01:00
DenOfEquity
2b14bcbc6e allow repeated use of hrfix quickbutton
as discussed in #1535
2024-08-29 13:41:32 +01:00
DenOfEquity
408054f7e5 add 'Lora hashes' to infotext that can be ignored
In *Settings -> Disregard fields from pasted infotext* there is a very long list of things that can optionally be ignored when parsing infotext. Now it is a slightly longer list, and includes `Lora hashes`.
2024-08-28 11:58:32 +01:00
layerdiffusion
15f41b2e5e we do not need initial model download now
since we do not load model when UI start
2024-08-27 17:59:56 -07:00
layerdiffusion
20cdcf05f5 experimental: allow some tabs to hide model bar 2024-08-27 17:45:44 -07:00
layerdiffusion
9c03493262 add some misc fix related to info text 2024-08-27 07:51:28 -07:00
Haoming
f43226a322 reimplement brush colors 2024-08-27 15:17:32 +08:00
DenOfEquity
3c4eb78cd1 Merge pull request #1531 from DenOfEquity/fix-the-hrfix-fix
Update txt2img.py: fix the hrfix fix
2024-08-27 00:55:42 +01:00
DenOfEquity
d7b8127438 Update txt2img.py: fix the hrfix fix
main issue: Upscaling would fail on single image when controlnet used.

minor issues: On the way to fixing my oversight of not accounting for control images in the gallery, I found that attempting to upscale a control image would fail due to trying to access infotext that doesn't exist. Then I handled a case previously caught by an assert more gracefully. Unhandled, these minor issues would lose the current gallery, so these extra fixes are good QoL.
Then I found another related minor issue if grids are not displayed.
2024-08-27 00:40:21 +01:00
layerdiffusion
18b356c0dc fix 2024-08-26 16:15:07 -07:00
cluder
e94130a82a Fix Checkpoint Merging #1359,#1095 (#1454)
- checkpoint_list[] contains the CheckpointInfo.title which is "checkpointname.safetensor [hash]"
  when a checkpoint is selected to be loaded during merge, we try to match it with just "checkpointname.safetensor".
  -> use checkpoint_aliases[] which already contains the checkpoint key in all possible variants.
- replaced removed sd_models.read_state_dict() with sd_models.load_torch_file()
- replaced removed sd_vae.load_vae_dict() with sd_vae.load_torch_file()
- uncommented create_config() for now, since it calls a removed method: sd_models_config.find_checkpoint_config_near_filename()
2024-08-26 15:39:37 -07:00
altoiddealer
d55e6b5bfe Replace API sd-vae with sd-modules (#1463) 2024-08-26 15:08:02 -07:00
DenOfEquity
230e39110e Merge pull request #1492 from DenOfEquity/restore-postprocessing_focal_crop-script
Restore postprocessing_focal_crop script
2024-08-26 16:19:07 +01:00
DenOfEquity
a0e317518e update cmd_args.py: description
extra description for old clip argument
2024-08-26 11:27:35 +01:00
DenOfEquity
001f2305de Update cmd_args.py: add text-encoder-dir 2024-08-25 15:03:02 +01:00
DenOfEquity
fc9b80cf0e restore autocrop.py 2024-08-25 13:23:21 +01:00
altoiddealer
7dde12e5cf Correct commit_date type to 'int' 2024-08-24 21:17:08 -04:00
altoiddealer
86e3ccaa9d checkpoint change (#1427)
* checkpoint change

credit to @dermesut

https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/1421

Enables `sd_model_checkpoint` parameter for API payloads

* Omit redundant .save()
2024-08-23 09:01:30 -07:00
layerdiffusion
df598c4df5 add "Diffusion in Low Bits" to info text 2024-08-22 23:23:14 -07:00
layerdiffusion
0bf68c5448 revise NGMS 2024-08-22 23:07:05 -07:00
Haoming
7b3b5fd0fd ngms (#1434) 2024-08-22 23:06:17 -07:00
altoiddealer
d169cd5881 Gets type (#1410) 2024-08-22 12:50:09 -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
Igor Aherne
852e88564c Update api.py (#1389)
get_sd_models now also returning config - fixes the following error:

fastapi.exceptions.ResponseValidationError: 1 validation errors:
  {'type': 'missing', 'loc': ('response', 0, 'config'), 'msg': 'Field required', 'input': {'title': 'realisticVisionV51_v51VAE.safetensors', 'model_name': 'realisticVisionV51_v51VAE', 'hash': None, 'sha256': None, 'filename': 'C:\\Users\\Igor\\Documents\\StableProjectorz\\stable-diffusion-webui-forge\\webui\\models\\Stable-diffusion\\realisticVisionV51_v51VAE.safetensors'}, 'url': 'https://errors.pydantic.dev/2.8/v/missing'}
2024-08-21 22:47:40 -07:00