Commit Graph

869 Commits

Author SHA1 Message Date
Manuel Schmid 5bc6a0c650
fix: use correct parameter for upscale (fast) 2024-06-21 19:56:35 +02:00
Manuel Schmid 51dc53b5c8
feat: save and output upscaled image with method fast in enhance 2024-06-20 02:49:22 +02:00
Manuel Schmid eada51dee4
feat: optimize progress bar, now correctly uses uov steps and overrides 2024-06-20 02:43:14 +02:00
Manuel Schmid 4e575b9eb1
wip: add upscale or variation to enhance 2024-06-19 23:53:15 +02:00
Manuel Schmid 87b3cec7d4
fix: download correct inpaint engine in enhance 2024-06-19 21:31:01 +02:00
Manuel Schmid 22e1b08e4f
feat: add detection prompt dataset for quick selection 2024-06-19 00:58:55 +02:00
Manuel Schmid 3b55e64990
fix: remove unused path_adetailer from config 2024-06-19 00:45:50 +02:00
Manuel Schmid cef92ffffe
Merge branch 'main_upstream' into feature/multi-step-rendering 2024-06-19 00:12:04 +02:00
Manuel Schmid 6cb0b2143b
fix: correctly initialize inpaint_mask var, rename task styles index 2024-06-18 22:38:36 +02:00
Manuel Schmid dd866616bc
refactor: code cleanup 2024-06-18 22:16:48 +02:00
Manuel Schmid c0f7c3a8ee
feat: add erode or dilate and mask invert to enhance mask inpaint settings 2024-06-18 21:39:27 +02:00
Manuel Schmid 229ff81738
refactor: rename max_num_boxes to max_detections 2024-06-18 21:07:27 +02:00
Manuel Schmid b7fb42436c
fix: correctly calculate current progress, display progressbar without any jumping 2024-06-18 12:35:41 +02:00
Manuel Schmid 1175df843b
fix: correctly proceed progress bar within tasks
does not yet include jumping back for preparation steps
2024-06-18 11:48:42 +02:00
Manuel Schmid 3567c04918
wip: refactor code to make it more efficient
now first processes all tasks and then does enhancements
2024-06-17 21:46:00 +02:00
Manuel Schmid 65cc25e5bf
feat: add debug setting for enhance mask output 2024-06-16 22:54:44 +02:00
Manuel Schmid e300930298
feat: improve performance, do not reload the pipeline when prompts are the same as in the original task 2024-06-16 22:18:11 +02:00
Manuel Schmid 33a9c156ad
fix: do not apply loras more than one time when not using lora in prompt 2024-06-16 21:40:39 +02:00
Manuel Schmid eeb1b79baa
feat: optimize prompt translation 2024-06-16 21:40:07 +02:00
Manuel Schmid 9c93c18d0b
fix: process other models than sam when using enhance 2024-06-16 21:05:10 +02:00
Manuel Schmid ff3418876d
feat: refresh the whole pipeline, allows usage of inpaint and enhancement prompts 2024-06-16 20:44:35 +02:00
Manuel Schmid e1be3fa37a
Merge branch 'main' into feature/multi-step-rendering 2024-06-16 18:54:52 +02:00
Manuel Schmid cecd6876a5
Merge branch 'hotfix/add-missing-method-in-performance' 2024-06-16 18:54:42 +02:00
Manuel Schmid 7c1a101c0f
hotfix: add missing method in performance enum (#3154) 2024-06-16 18:53:20 +02:00
Manuel Schmid 9ef7fe0843
hotfix: add missing method in performance enum 2024-06-16 18:52:20 +02:00
Manuel Schmid b64d6d393c
fix: use != for literal comparison 2024-06-16 18:49:52 +02:00
Manuel Schmid 9d41c9521b
fix: add workaround for same value in Steps IntEnum (#3153) 2024-06-16 18:44:16 +02:00
Manuel Schmid af209cda53
fix: add workaround for same value in Steps IntEnum
(cherry picked from commit ea1562d078)
2024-06-16 18:41:17 +02:00
Manuel Schmid bf6820812f
feat: only process enhance when checkbox is set
similar to input image
2024-06-16 18:39:40 +02:00
Manuel Schmid ea1562d078
fix: add workaround for same value in Steps IntEnum 2024-06-16 17:46:48 +02:00
Manuel Schmid 3e453501f7
fix: correctly identify and remove performance LoRA (#3150) 2024-06-16 16:52:58 +02:00
Manuel Schmid b947a5a4e6
fix: correctly identify and remove performance LoRA
(cherry picked from commit b3e4506009)
2024-06-16 16:48:35 +02:00
Manuel Schmid b3e4506009
fix: correctly identify and remove performance LoRA 2024-06-16 16:48:12 +02:00
Manuel Schmid 541fb2d445
feat: add support for enhance prompts 2024-06-16 15:58:27 +02:00
Manuel Schmid ef9fd293ff
wip: rename stage2 to enhance 2024-06-16 12:45:18 +02:00
Manuel Schmid 8b21303542
wip: refactor UI for stage2 2024-06-15 01:38:22 +02:00
Manuel Schmid a71739026b
refactor: change wording of hint when nothing has been detected 2024-06-13 01:19:28 +02:00
Manuel Schmid f8f36828c7
feat: add disclaimer + skipping, stage2 won't properly work when used with inpaint or outpaint 2024-06-13 01:13:21 +02:00
Manuel Schmid dbc844804b
feat: add handling for stage2_mask_sam_max_num_boxes and config 2024-06-12 22:16:02 +02:00
Manuel Schmid 9998b52dd2
feat: add gradio elements for input 2024-06-12 21:52:48 +02:00
Manuel Schmid 190c4b0a6f
fix: do not set denoising_strength to async_worker dynamically
use parameter input and output
2024-06-12 21:51:49 +02:00
Manuel Schmid e055510f1b
fix: use correct mask dimensions 2024-06-11 00:12:02 +02:00
Manuel Schmid ead1ed617a
refactor: remove adetailer code 2024-06-10 23:46:25 +02:00
Manuel Schmid b8578a080a
fix: remove already declared config option 2024-06-10 20:46:25 +02:00
Manuel Schmid 3873892b0a
feat: change default_inpaint_mask_sam_model to match sam model registry 2024-06-10 20:45:56 +02:00
Manuel Schmid ce1fb74270
feat: add download for sam models to config 2024-06-10 20:33:49 +02:00
Manuel Schmid 8087861743
refactor: reorder inpaint_mask_sam_model by model size ascending 2024-06-09 18:46:18 +02:00
Manuel Schmid 9affa32583
feat: set inpaint_respective_field manually 2024-06-09 01:36:32 +02:00
Manuel Schmid 85b9005fa7
wip: adjust progressbar 2024-06-09 01:23:44 +02:00
Manuel Schmid 5d8353eb74
fix: correctly reset pipeline
reset unet and inpaint worker after each adetailer task, improve memory efficiency
2024-06-09 01:10:11 +02:00
Manuel Schmid df70294a3e
wip: add adetailer 2024-06-08 23:30:45 +02:00
Manuel Schmid bb72938261
refactor: always use format width, height 2024-06-08 21:41:30 +02:00
Manuel Schmid c79f6bd461
refactor: move methods to handler scope 2024-06-08 20:33:47 +02:00
Manuel Schmid c1f62361ba
refactor: add EarlyReturnException to prevent return value issues 2024-06-08 20:25:50 +02:00
Manuel Schmid e58d913fbb
refactor: extract async_worker handle method into separate functions 2024-06-08 19:55:31 +02:00
Manuel Schmid 9c352b6eb7
Merge branch 'main_upstream'
# Conflicts:
#	fooocus_version.py
#	modules/config.py
#	modules/extra_utils.py
2024-06-06 19:50:15 +02:00
Manuel Schmid db36766f34
Merge branch 'fix/try-parse-env-var-strings-as-boolean'
# Conflicts:
#	modules/config.py
2024-06-06 19:40:14 +02:00
Manuel Schmid 5abae220c5
feat: parse env var strings to expected config value types (#3107)
* fix: add try_parse_bool for env var strings to enable config overrides of boolean values

* fix: fallback to given value if not parseable

* feat: extend eval to all valid types

* fix: remove return type

* fix: prevent strange type conversions by providing expected type

* feat: add tests
2024-06-06 19:29:08 +02:00
Manuel Schmid 09be2c972c
fix: prevent strange type conversions by providing expected type 2024-06-06 19:13:17 +02:00
Manuel Schmid 2186d3e15d
fix: remove return type 2024-06-06 18:38:58 +02:00
Manuel Schmid bef79e3cb4
feat: extend eval to all valid types 2024-06-06 18:37:00 +02:00
Manuel Schmid beab2b9d48
fix: fallback to given value if not parseable 2024-06-06 18:20:14 +02:00
Manuel Schmid c4faf2ae6c
fix: add try_parse_bool for env var strings to enable config overrides of boolean values 2024-06-06 18:05:55 +02:00
Manuel Schmid c8093ac1ca
Merge branch 'lllyasviel:main' into main 2024-06-06 14:03:19 +02:00
Manuel Schmid 04d764820e
fix: correctly set alphas_cumprod (#3106) 2024-06-06 13:42:26 +02:00
Manuel Schmid b113eca87e
release: bump version to 2.4.2, update changelog 2024-06-05 21:58:51 +02:00
Manuel Schmid 2d55a5f257
feat: add support for playground v2.5 (#3073)
* feat: add support for playground v2.5

* feat: add preset for playground v2.5

* feat: change URL to mashb1t

* feat: optimize playground v2.5 preset
2024-06-04 20:15:49 +02:00
Manuel Schmid cb24c686b0
Merge branch 'main_upstream' into develop_upstream 2024-06-04 20:11:42 +02:00
Manuel Schmid 30b2a9536e
Merge branch 'feature/playground-2.5'
# Conflicts:
#	modules/flags.py
2024-06-01 23:31:19 +02:00
Manuel Schmid 778416c5e0
Merge branch 'main_upstream' 2024-06-01 23:25:21 +02:00
Manuel Schmid fe58df35c9
feat: add support for playground 2.5 2024-06-01 22:43:27 +02:00
Manuel Schmid 7899261755
fix: turbo scheduler loading issue (#3065)
* fix: correctly load ModelPatcher

* feat: do not load model at all, not needed
2024-05-31 22:24:19 +02:00
Manuel Schmid 4e658bb63a
feat: optimize performance lora filtering in metadata (#3048)
* feat: add remove_performance_lora method

* feat: use class PerformanceLoRA instead of strings in config

* refactor: cleanup flags, use __member__ to check if enums contains key

* feat: only filter lora of selected performance instead of all performance LoRAs

* fix: disable intermediate results for all restricted performances

too fast for Gradio, which becomes a bottleneck

* refactor: rename parse_json to to_json, rename parse_string to to_string

* feat: use speed steps as default instead of hardcoded 30

* feat: add method to_steps to Performance

* refactor: remove method ordinal_suffix, not needed anymore

* feat: only filter lora of selected performance instead of all performance LoRAs

both metadata and history log

* feat: do not filter LoRAs in metadata parser but rather in metadata load action
2024-05-30 16:14:28 +02:00
Manuel Schmid 5768330142
Merge branch 'feature/optimize-performance-lora-filtering-in-metadata'
# Conflicts:
#	modules/flags.py
#	modules/util.py
#	webui.py
2024-05-30 15:21:04 +02:00
Manuel Schmid 2dca5ba638
feat: do not filter LoRAs in metadata parser but rather in metadata load action 2024-05-30 01:32:09 +02:00
Manuel Schmid 91281e5561
feat: only filter lora of selected performance instead of all performance LoRAs
both metadata and history log
2024-05-30 00:22:31 +02:00
Manuel Schmid 9c8ffbbe18
refactor: remove method ordinal_suffix, not needed anymore 2024-05-30 00:21:18 +02:00
Manuel Schmid 1981ace9e1
feat: add method to_steps to Performance 2024-05-30 00:20:53 +02:00
Manuel Schmid f8f2455b65
feat: use speed steps as default instead of hardcoded 30 2024-05-30 00:20:23 +02:00
Manuel Schmid db8228d8f5
refactor: rename parse_json to to_json, rename parse_string to to_string 2024-05-30 00:19:35 +02:00
Manuel Schmid e3060e00d4
feat: only filter lora of selected performance instead of all performance LoRAs 2024-05-30 00:16:34 +02:00
Manuel Schmid 55b01a81a6
refactor: cleanup flags, use __member__ to check if enums contains key 2024-05-30 00:14:27 +02:00
Manuel Schmid 9564341fbd
feat: use class PerformanceLoRA instead of strings in config 2024-05-30 00:13:14 +02:00
Manuel Schmid 4127fa410b
feat: add remove_performance_lora method 2024-05-30 00:11:07 +02:00
Manuel Schmid 4361e7e629
Merge remote-tracking branch 'upstream/main' 2024-05-27 00:30:53 +02:00
Manuel Schmid dfff9b7dcf
fix: adjust clip skip default value from 1 to 2 (#3011)
* Revert "Revert "feat: add clip skip handling (#2999)" (#3008)"

This reverts commit 989a1ad52b.

* feat: use clip skip 2 as default
2024-05-27 00:28:22 +02:00
Manuel Schmid 08877666ba
Merge branch 'main_upstream' 2024-05-26 22:14:20 +02:00
Manuel Schmid 989a1ad52b
Revert "feat: add clip skip handling (#2999)" (#3008)
This reverts commit cc58fe5270.
2024-05-26 22:07:44 +02:00
Manuel Schmid 6dd718919c
feat: cleanup performance selection, make it completely dynamic 2024-05-26 18:09:22 +02:00
Manuel Schmid f82aa8a909
Merge branch 'develop_upstream'
# Conflicts:
#	fooocus_version.py
#	modules/util.py
#	tests/test_utils.py
#	webui.py
2024-05-26 15:28:08 +02:00
Manuel Schmid cc58fe5270
feat: add clip skip handling (#2999) 2024-05-26 14:18:19 +02:00
Alexdnk d850bca09f
feat: read value 'CFG Mimicking from TSNR' (adaptive_cfg) from presets (#2990) 2024-05-24 22:05:28 +02:00
Manuel Schmid 04f64ab0bc
feat: add translation for image size describe (#2992) 2024-05-24 21:58:17 +02:00
xhoxye 302bfdf855
feat: read size and ratio of an image and provide the recommended size (#2971)
* Add the information about the size and ratio of the read image

* feat: use available aspect ratios from config, move function to util, change default visibility of label

* refactor: extract sdxl aspect ratios to flags, use in describe

as discussed in
https://github.com/lllyasviel/Fooocus/pull/2971#discussion_r1608493765
https://github.com/lllyasviel/Fooocus/pull/2971#issuecomment-2123620595

---------

Co-authored-by: Manuel Schmid <dev@mash1t.de>
Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com>
2024-05-22 20:47:44 +02:00
Manuel Schmid ebae829f43
Merge branch 'read-image-size'
# Conflicts:
#	modules/util.py
#	webui.py
2024-05-22 20:44:22 +02:00
Manuel Schmid 751e867b37
refactor: extract sdxl aspect ratios to flags, use in describe
as discussed in
https://github.com/lllyasviel/Fooocus/pull/2971#discussion_r1608493765
https://github.com/lllyasviel/Fooocus/pull/2971#issuecomment-2123620595
2024-05-22 20:38:03 +02:00
Manuel Schmid 311c445090
feat: use available aspect ratios from config, move function to util, change default visibility of label 2024-05-21 22:31:27 +02:00
Manuel Schmid 7537612bcc
feat: only use valid inline loras, add subfolder support (#2968) 2024-05-20 19:21:41 +02:00
Manuel Schmid de1c77a923
Merge branch 'feature/inline-lora-optimisations-2'
# Conflicts:
#	modules/util.py
#	tests/test_utils.py
2024-05-20 19:19:33 +02:00
Manuel Schmid 045d03ddad
feat: only use valid inline loras, add subfolder support 2024-05-20 19:08:35 +02:00