Commit Graph

301 Commits

Author SHA1 Message Date
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 b64d6d393c
fix: use != for literal comparison 2024-06-16 18:49:52 +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 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 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 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 30b2a9536e
Merge branch 'feature/playground-2.5'
# Conflicts:
#	modules/flags.py
2024-06-01 23:31:19 +02:00
Manuel Schmid fe58df35c9
feat: add support for playground 2.5 2024-06-01 22:43:27 +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 e3060e00d4
feat: only filter lora of selected performance instead of all performance LoRAs 2024-05-30 00:16:34 +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 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
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 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 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 4d46fb6bcb
Merge branch 'feature/add-tcd-sampler'
# Conflicts:
#	modules/flags.py
2024-05-15 17:17:02 +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 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 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