Jpg config image extension by eddyizm · Pull Request #1863 · lllyasviel/Fooocus

added 2 commits

January 10, 2024 09:36

@mashb1t mashb1t linked an issue

Jan 11, 2024

that may be closed by this pull request

mashb1t

… to log and get_current_html_path functions per feedback

@eddyizm

@eddyizm

@eddyizm eddyizm marked this pull request as ready for review

January 13, 2024 07:31
returns and uses filepaths instead of numpy image by saving to temp dir
uses double the temp dir file storage on disk as it saves to temp dir and gradio temp dir when displaying the image, but reuses logged output image

@mashb1t

@mashb1t

@mashb1t

…nfig_image_extension

# Conflicts:
#	modules/async_worker.py
#	modules/private_logger.py

@mashb1t mashb1t linked an issue

Jan 14, 2024

that may be closed by this pull request

this is now possible due to image extension support in gradio via lllyasviel#1932

@mashb1t

@mashb1t

quality=95
optimize=True
progressive=True

@mashb1t

@mashb1t

@mashb1t mashb1t added Size M

medium change, isolated, testing with care

Size L

large change, may depend on other changes, thoroughly test

and removed Size M

medium change, isolated, testing with care

labels

Feb 9, 2024

@mashb1t mashb1t changed the base branch from main to develop

February 26, 2024 13:29
# Conflicts:
#	modules/async_worker.py
#	modules/flags.py
#	modules/private_logger.py
#	webui.py

@mashb1t

@mashb1t

mashb1t added a commit that referenced this pull request

Feb 26, 2024
…1863)

* feature: added flag, config and ui update for image extension change #1789

* moved function to config module

* moved image extension to webui via async worker. Passing as parameter to log and get_current_html_path functions per feedback

* check flag before displaying image extension radio button

* disabled if image log flag is passed in

* fix: add missing image_extension parameter to log call

* refactor: change label

* feat: add webp to image_extensions

supported image extemsions: see https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html

* feat: use consistent file name in gradio

returns and uses filepaths instead of numpy image by saving to temp dir
uses double the temp dir file storage on disk as it saves to temp dir and gradio temp dir when displaying the image, but reuses logged output image

* feat: delete temp images after yielding to gradio

* feat: use args temp path if given

* chore: code cleanup, remove redundant if statement

* feat: always show image_extension element

this is now possible due to image extension support in gradio via #1932

* refactor: rename image_extension to image_file_extension

* feat: use optimized jpg parameters when saving the image

quality=95
optimize=True
progressive=True

* refactor: rename image_file_extension to output_format

* feat: add exif handling

* refactor: code cleanup, remove items from metadata output

---------

Co-authored-by: Manuel Schmid <dev@mash1t.de>
Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com>
Co-authored-by: Manuel Schmid <manuel.schmid@odt.net>
Co-authored by: eddyizm <wtfisup@hotmail.com>