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
Manuel Schmid
65a8b25129
feat: inline lora optimisations ( #2967 )
...
* feat: add performance loras to the end of the loras array
* fix: resolve circular dependency for unit tests
* feat: allow multiple matches for each token, optimize and extract method cleanup_prompt
* fix: update unit tests
* feat: ignore custom wildcards
2024-05-20 17:31:51 +02:00
Manuel Schmid
44b46bffba
Merge branch 'feature/inline-lora-optimisations'
2024-05-20 17:31:30 +02:00
Manuel Schmid
0d1310d9e9
feat: allow multiple matches for each token, optimize and extract method cleanup_prompt
2024-05-20 17:28:55 +02:00
Manuel Schmid
faa985c71c
fix: resolve circular dependency for unit tests
2024-05-20 17:27:16 +02:00
Manuel Schmid
f030490144
feat: add performance loras to the end of the loras array
2024-05-20 17:26:17 +02:00
Manuel Schmid
dd5a14ac7f
Merge branch 'feature/progress-bar'
...
# Conflicts:
# fooocus_version.py
# modules/async_worker.py
# webui.py
2024-05-19 20:54:53 +02:00
Manuel Schmid
c995511705
feat: progress bar improvements ( #2962 )
...
* feat: align progress bar vertically
* feat: use fixed width for status text, remove ordinals
* refactor: align progress to actions
2024-05-19 20:43:11 +02:00
Manuel Schmid
5d8eb5235a
refactor: align progress to actions
2024-05-19 20:33:21 +02:00
Manuel Schmid
888de56290
feat: use fixed width for status text, remove ordinals
2024-05-19 20:13:29 +02:00
Manuel Schmid
35b74dfa64
feat: optimize model management of image censoring ( #2960 )
...
now follows general Fooocus model management principles + includes code optimisations for reusability
2024-05-19 18:36:47 +02:00
Manuel Schmid
dad228907e
fix: remove leftover code from hyper-sd8 testing ( #2959 )
2024-05-19 17:42:46 +02:00
Manuel Schmid
13599edb9b
feat: add performance hyper-sd based on 4step LoRA ( #2812 )
...
* feat: add performance hyper-sd based on 4step LoRA
* feat: use LoRA weight 0.8, sampler dpmpp_sde_gpu and scheduler_name karras
suggested in https://github.com/lllyasviel/Fooocus/discussions/2813#discussioncomment-9245251
results see https://github.com/lllyasviel/Fooocus/discussions/2813#discussioncomment-9275251
* feat: change ByteDance huggingface profile with mashb1t
* wip: add hyper-sd 8 step cfg lora with negative prompt support
* feat: remove hyper-sd8 performance
still waiting for the release of hyper-sd 4step CFG LoRA, not yet satisfied with any of the CFG LoRAs compared to non-cfg ones.
see https://huggingface.co/ByteDance/Hyper-SD
2024-05-19 13:23:08 +02:00
Manuel Schmid
2e2e8f851a
feat: add tcd sampler and discrete distilled tcd scheduler based on sgm_uniform (same as lcm) ( #2907 )
2024-05-19 13:08:33 +02:00
cantor-set
3bae73e23e
feat: add support for lora inline prompt references ( #2323 )
...
* Adding support to inline prompt references
* Added unittests
* Added an initial documentation for development guidelines
* Added a negative number
* renamed parameter
* removed wrongly committed file
* Code fixes
* Fixed circular reference
* Fixed typo. Added TODO
* Fixed merge
* Code cleanup
* Added missing refernce function
* Removed function from util.py... again...
* Update modules/async_worker.py
Implemented suggested change
Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com>
* Removed another circular reference
* Renamed module
* Addressed PR comments
* Added return type to function
* refactor: move apply_wildcards to module util
* refactor: code cleanup, unify usage of tuples in lora list
* docs: add instructions for running unittests on embedded python, code cleanup
* refactor: code cleanup, move makedirs_with_log back to util
---------
Co-authored-by: cantor-set <cantor-set@no-email.net>
Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com>
Co-authored-by: Manuel Schmid <dev@mash1t.de>
2024-05-18 17:19:46 +02:00
Manuel Schmid
3a55e7e391
feat: add AlignYourStepsScheduler ( #2905 )
2024-05-18 15:53:34 +02:00
Manuel Schmid
00d3d1b4b3
feat: add nsfw image censoring via config and checkbox ( #958 )
...
* add nsfw image censoring
activatable via config, uses CompVis/stable-diffusion-safety-checker
* fix progressbar call for nsfw output
* use config to set cache dir for safety checker
* add checkbox black_out_nsfw
makes both enabling via config and checkbox possible, where config overrides the checkbox value
* fix: add missing diffusers package
* feat: extract safety checker, remove dependency to diffusers
* feat: make code compatible again after merge with main
* feat: move censor to extras, optimize safety checker file handling
* refactor: rename folder safety_checker_models to safety_checker
2024-05-18 15:50:28 +02:00
Manuel Schmid
44ac5db94f
Merge branch 'develop_upstream'
2024-05-17 18:27:42 +02:00
e52fa787
5e594685e1
fix: do not close meta tag in HTML header ( #2740 )
...
* fixed typo in HTML (extra </meta> tag)
* refactor: remove closing slash for meta tag
as of specification in https://html.com/tags/meta/ , meta tagas are null elements:
This element must not contain any content, and does not need a closing tag.
---------
Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com>
2024-05-17 17:25:56 +02:00
Manuel Schmid
4d46fb6bcb
Merge branch 'feature/add-tcd-sampler'
...
# Conflicts:
# modules/flags.py
2024-05-15 17:17:02 +02:00
Manuel Schmid
badbe6e53b
Merge branch 'feature/add-align-your-steps-scheduler'
...
# Conflicts:
# presets/anime.json
2024-05-15 17:15:47 +02:00
Manuel Schmid
77acf8126a
wip: add tcd sampler
...
adapted code from https://github.com/comfyanonymous/ComfyUI/pull/3370
TODO: check if virtual scheduler tcd is needed for using sampling_base ModelSamplingDiscreteDistilled or if it's better to use sgm_uniform directly without patching
2024-05-12 19:42:28 +02:00
Manuel Schmid
c507556bfd
feat: add AlignYourStepsScheduler
...
794a357f7a/comfy_extras/nodes_align_your_steps.py
https://research.nvidia.com/labs/toronto-ai/AlignYourSteps/howto.html
2024-05-12 17:06:13 +02:00
Manuel Schmid
0c9fe7f99e
Merge remote-tracking branch 'upstream/develop'
2024-05-09 22:27:36 +02:00
docppp
bdd6b1a9b0
feat: add full raw prompt to history log ( #1920 )
...
* Update async_worker.py
* Update private_logger.py
* refactor: only show full prompt details in logs, exclude from image metadata
---------
Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com>
Co-authored-by: Manuel Schmid <dev@mash1t.de>
2024-05-09 20:25:43 +02:00
Manuel Schmid
1ecc07ff47
Merge commit '1a9faf4d1bed0af009b5b56810ce85b40ca72097'
2024-05-09 19:21:08 +02:00
Manuel Schmid
8b75efd318
Merge remote-tracking branch 'upstream/develop'
...
# Conflicts:
# modules/async_worker.py
2024-05-09 19:17:46 +02:00
Manuel Schmid
f54364fe4e
feat: add random style checkbox to styles selection ( #2855 )
...
* feat: add random style
* feat: rename random to random style, add translation
* feat: add preview image for random style
2024-05-09 19:02:04 +02:00
Manuel Schmid
c32bc5e199
feat: add optional model VAE select ( #2867 )
...
* Revert "fix: use LF as line breaks for Docker entrypoint.sh (#2843 )" (#2865 )
False alarm, worked as intended before. Sorry for the fuzz.
This reverts commit d16a54edd6 .
* feat: add VAE select
* feat: use different default label, add translation
* fix: do not reload model when VAE stays the same
* refactor: code cleanup
* feat: add metadata handling
2024-05-09 18:59:35 +02:00
Manuel Schmid
a6207a949a
Merge branch 'feature/add-vae-select'
2024-05-05 01:07:39 +02:00
Manuel Schmid
b0d3a3abb0
Merge branch 'feature/add-random-style'
...
# Conflicts:
# modules/async_worker.py
2024-05-05 01:07:34 +02:00
Manuel Schmid
ab76a26806
feat: add metadata handling
2024-05-05 00:33:24 +02:00
Manuel Schmid
af33e930d3
refactor: code cleanup
2024-05-04 21:13:03 +02:00
Manuel Schmid
4a3aac09a3
fix: do not reload model when VAE stays the same
2024-05-04 21:12:25 +02:00
Manuel Schmid
15696da9b8
feat: use different default label, add translation
2024-05-04 20:37:30 +02:00
Manuel Schmid
8e6299b898
feat: add VAE select
2024-05-04 20:36:47 +02:00
Manuel Schmid
3027fafee3
feat: rename random to random style, add translation
2024-05-02 22:32:18 +02:00
Manuel Schmid
0db3c10c60
feat: add random style
2024-05-02 22:20:18 +02:00
Manuel Schmid
1a9faf4d1b
feat: change ByteDance huggingface profile with mashb1t
2024-05-02 21:19:22 +02:00
Manuel Schmid
d687ea73c4
Merge branch 'upstream/develop'
...
# Conflicts:
# webui.py
2024-04-30 15:34:16 +02:00
Manuel Schmid
2bd9936d5b
Merge branch 'feature/hyper-sd-performance'
...
# Conflicts:
# modules/async_worker.py
2024-04-30 15:24:28 +02:00
Manuel Schmid
27df5df20b
feat: use LoRA weight 0.8, sampler dpmpp_sde_gpu and scheduler_name karras
...
suggested in https://github.com/lllyasviel/Fooocus/discussions/2813#discussioncomment-9245251
results see https://github.com/lllyasviel/Fooocus/discussions/2813#discussioncomment-9275251
2024-04-30 15:06:33 +02:00
Manuel Schmid
fa74a0c7fe
feat: add performance hyper-sd based on 4step LoRA
2024-04-26 22:22:09 +02:00
delta_lt_0
5ada070d88
feat: support download of huggingface files from a mirror website ( #2637 )
...
* fix: load image number from preset (#2611 )
* fix: add default_image_number to preset handling
* fix: use minimum image number of preset and config to prevent UI overflow
* fix: use correct base dimensions for outpaint mask padding (#2612 )
* fix: add Civitai compatibility for LoRAs in a1111 metadata scheme by switching schema (#2615 )
* feat: update sha256 generation functions
29be1da7cf/modules/hashes.py
* feat: add compatibility for LoRAs in a1111 metadata scheme
* feat: add backwards compatibility
* refactor: extract remove_special_loras
* fix: correctly apply LoRA weight for legacy schema
* docs: bump version number to 2.3.1, add changelog (#2616 )
* feat:support download huggingface files from a mirror site
---------
Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com>
2024-04-06 15:25:19 +02:00
Manuel Schmid
8fff0476ce
Merge commit 'e2f9bcb11d06216d6800676c48d8d74d6fd77a4b'
...
# Conflicts:
# fooocus_version.py
# modules/meta_parser.py
2024-03-23 17:04:47 +01:00
Manuel Schmid
523ef5c70e
fix: add Civitai compatibility for LoRAs in a1111 metadata scheme by switching schema ( #2615 )
...
* feat: update sha256 generation functions
29be1da7cf/modules/hashes.py
* feat: add compatibility for LoRAs in a1111 metadata scheme
* feat: add backwards compatibility
* refactor: extract remove_special_loras
* fix: correctly apply LoRA weight for legacy schema
2024-03-23 16:37:18 +01:00
Manuel Schmid
9aaa400553
fix: use correct base dimensions for outpaint mask padding ( #2612 )
2024-03-23 13:10:21 +01:00
Manuel Schmid
7564dd5131
fix: load image number from preset ( #2611 )
...
* fix: add default_image_number to preset handling
* fix: use minimum image number of preset and config to prevent UI overflow
2024-03-23 12:49:20 +01:00
Manuel Schmid
b4a257bd03
fix: correctly set preset config and loras in meta parser
2024-03-20 22:09:32 +01:00
Manuel Schmid
978267f461
fix: correctly set preset config and loras in meta parser
2024-03-20 21:16:03 +01:00
Manuel Schmid
16c7d343e9
Merge branch 'main_upstream'
...
# Conflicts:
# modules/config.py
2024-03-19 23:30:14 +01:00
Manuel Schmid
856eb750ab
fix: add enabled value to LoRA when setting default_max_lora_number
2024-03-19 23:08:38 +01:00
Manuel Schmid
679c02a09f
Merge branch 'main_upstream'
...
# Conflicts:
# css/style.css
# fooocus_colab.ipynb
# fooocus_version.py
# launch.py
# modules/async_worker.py
# modules/config.py
# modules/flags.py
# modules/meta_parser.py
# webui.py
2024-03-18 21:27:56 +01:00
Manuel Schmid
c08518abae
feat: add backwards compatibility for presets without disable/enable LoRA boolean
...
https://github.com/lllyasviel/Fooocus/pull/2507
2024-03-18 17:40:37 +01:00
Manuel Schmid
5bf96018fe
Merge branch 'main_upstream' into develop
2024-03-17 14:13:37 +01:00
Manuel Schmid
d057f2fae9
fix: correctly handle empty lora array in a1111 metadata log scheme ( #2551 )
2024-03-17 14:01:10 +01:00
Spencer Hayes-Laverdiere
55e23a9374
fix: add error output for unsupported images ( #2537 )
...
* Raise Error on bad decode
* Move task arg pop to try block
* fix: prevent empty task from getting queued
---------
Co-authored-by: Manuel Schmid <dev@mash1t.de>
2024-03-15 22:30:29 +01:00
Manuel Schmid
4a44be36fd
feat: add preset selection to Gradio UI (session based) ( #1570 )
...
* add preset selection
uses meta parsing to set presets in user session (UI elements only)
* add LoRA handling
* use default config as fallback value
* add preset refresh on "Refresh All Files" click
* add special handling for default_styles and default_aspect_ratio
* sort styles after preset change
* code cleanup
* download missing models from preset
* set default refiner to "None" in preset realistic
* use state_is_generating for preset selection change
* DRY output parameter handling
* feat: add argument --disable-preset-selection
useful for cloud provisioning to prevent model switches and keep models loaded
* feat: keep prompt when not set in preset, use more robust syntax
* fix: add default return values when preset download is disabled
https://github.com/mashb1t/Fooocus/issues/20
* feat: add translation for preset label
* refactor: unify preset loading methods in config
* refactor: code cleanup
2024-03-15 22:04:27 +01:00
Manuel Schmid
8baafcd79c
Merge branch 'main_upstream' into develop
2024-03-15 20:52:06 +01:00
Manuel Schmid
9cd0366d30
fix: parse seed as string to display correctly in metadata preview ( #2536 )
2024-03-15 20:38:21 +01:00