Commit Graph

165 Commits

Author SHA1 Message Date
AUTOMATIC1111
9bc037d045
Merge pull request #10655 from fumitakayano/fumitakayano
Added format to specify VAE filename for generated image filenames
2023-05-27 20:11:21 +03:00
AUTOMATIC1111
d0e8fa627d
Merge pull request #10569 from strelokhalfer/pr
Change 'images.zip' to pattern settings
2023-05-27 20:10:17 +03:00
catboxanon
60062b51d8
Remove try/except in img metadata read 2023-05-25 08:33:40 -04:00
catboxanon
7a1bbf99da
Cleaner image metadata read 2023-05-24 16:41:22 -04:00
strelokhalfer
fb5d0ef209 Changed 'images.zip' to generation by pattern 2023-05-24 18:17:02 +03:00
fumitaka.yano
1db7d21283 Subject:.
Improvements to handle VAE filenames in generated image filenames

Body:.
1) Added new line 24 to import sd_vae module.
2) Added new method get_vae_filename at lines 340-349 to obtain the VAE filename to be used for image generation and further process it to extract only the filename by splitting it with a dot symbol.
3) Added a new lambda function 'vae_filename' at line 373 to handle VAE filenames.

Reason:.
A function was needed to get the VAE filename and handle it in the program.

Test:.
We tested whether we could use this new functionality to get the expected file names.
The correct behaviour was confirmed for the following commonly distributed VAE files.
vae-ft-mse-840000-ema-pruned.safetensors -> vae-ft-mse-840000-ema-pruned
anything-v4.0.vae.pt -> anything-v4.0

ruff response:.
There were no problems with the code I added.

There was a minor configuration error in a line I did not modify, but I did not modify it as it was not relevant to this modification.
Logged.
images.py:426:56: F841 [*] Local variable `_` is assigned to but never used
images.py:432:43: F841 [*] Local variable `_` is assigned to but never used

Impact:.
This change makes it easier to retrieve the VAE filename used for image generation and use it in the programme.
2023-05-23 15:56:08 +09:00
AUTOMATIC
a6b618d072 use a single function for saving images with metadata both in extra networks and main mode for #10395 2023-05-17 21:03:41 +03:00
Aarni Koskela
49a55b410b Autofix Ruff W (not W605) (mostly whitespace) 2023-05-11 20:29:11 +03:00
Aarni Koskela
1332c46b71 Drop fonts + font-roboto deps since we only use the single regular cut of Roboto 2023-05-11 10:07:28 +03:00
Aarni Koskela
df7070eca2 Deduplicate get_font code 2023-05-11 10:06:19 +03:00
AUTOMATIC
a5121e7a06 fixes for B007 2023-05-10 11:37:18 +03:00
AUTOMATIC
f741a98bac imports cleanup for ruff 2023-05-10 08:43:42 +03:00
AUTOMATIC
96d6ca4199 manual fixes for ruff 2023-05-10 08:25:25 +03:00
AUTOMATIC
762265eab5 autofixes from ruff 2023-05-10 07:52:45 +03:00
Aarni Koskela
3ba6c3c83c Fix up string formatting/concatenation to f-strings where feasible 2023-05-09 22:25:39 +03:00
w-e-w
cde0d642f3 add denoising strength filename pattern 2023-05-06 02:20:33 +09:00
AUTOMATIC
faff08f396 rework [batch_number]/[generation_number] filename patterns 2023-04-29 16:48:43 +03:00
AUTOMATIC1111
e7d624574d
Merge branch 'dev' into master 2023-04-29 16:41:01 +03:00
AUTOMATIC1111
87535fcf29
Merge branch 'dev' into Branch_AddNewFilenameGen 2023-04-29 13:10:46 +03:00
File_xor
acbec22554 Add self argument that is mandatory to [clip_skip] filename pattern. 2023-04-16 17:14:11 +09:00
File_xor
596556162e Add filename pattern for CLIP_stop_at_last_layers. 2023-04-16 16:49:21 +09:00
tqwuliao
02e3518807 Add new FilenameGenerator [hasprompt<prompt1|default><prompt2>..] 2023-04-15 23:20:08 +08:00
gk
d609f6030e Add [batch_number] and [generation_number] filename patterns 2023-04-07 21:04:46 +09:00
AUTOMATIC
4c1ad743e3 for img2img, use None as upscaler instead of erroring out if the desired upscaler is not found 2023-03-26 11:01:32 +03:00
AUTOMATIC
4697def235 bump gradio to 3.23
fix broken image dragging
2023-03-25 09:00:37 +03:00
Alex "mcmonkey" Goodwin
af9158a8c7 update fullfn properly 2023-03-12 12:36:04 -07:00
Alex "mcmonkey" Goodwin
48df6d66ea add safety check in case of short extensions
so eg if a two-letter or empty extension is used, `.txt` would break, this `max` call protects that.
2023-03-12 12:33:29 -07:00
Alex "mcmonkey" Goodwin
a71b7b5ec0 relocate filename length limit to better spot 2023-03-12 12:30:31 -07:00
Alex "mcmonkey" Goodwin
7fd19fa4e7 initial fix for filename length limits on *nix systems 2023-03-11 07:22:22 -08:00
missionfloyd
aa108bd02a Add lossless webp option 2023-02-24 20:57:18 -07:00
w-e-w
f71a3c9c3a convert resolution to int using round() 2023-02-20 17:47:20 +09:00
AUTOMATIC1111
9c4eaac61f
Merge pull request #7691 from missionfloyd/16bit-convert
Convert 16-bit greyscale to 8-bit when saving as JPEG
2023-02-19 10:15:49 +03:00
AUTOMATIC
fb2354cb2a reword settings for 4chan export, remove unneded try/excepts, add try/except for actually saving JPG 2023-02-19 10:12:45 +03:00
missionfloyd
73a97cac11
Use RGB for webp
Doesn't support greyscale (L)
2023-02-09 17:04:55 -07:00
missionfloyd
463ab84180 Convert 16-bit greyscale to 8-bit when saving as JPEG 2023-02-09 02:13:49 -07:00
w-e-w
fe33be6cac use Default if ValueError 2023-02-05 23:33:05 +09:00
w-e-w
6d11cda418 configurable image downscale
allowing the user to configure the image downscale parameters in setting
2023-02-05 23:12:42 +09:00
EllangoK
0ca1a64cfc adds grid margins to xyz plot and prompt matrix 2023-02-05 03:44:56 -05:00
techneconn
5a1b62e9f8 Add prompt_hash option for file/dir name pattern 2023-02-05 15:48:51 +09:00
AUTOMATIC
40e51fd6ef add margin parameter to draw_grid_annotations 2023-02-04 13:29:04 +03:00
glop102
09a142a05a Reduce grid rows if larger than number of images available
When a set number of grid rows is specified in settings, then it leads
to situations where an entire row in the grid is empty.
The most noticable example is the processing preview when the row count
is set to 2, where it shows the preview just fine but with a black
rectangle under it.
2023-01-28 19:25:52 -05:00
EllangoK
e46bfa5a9e handling sub grids and merging into one 2023-01-24 02:24:32 -05:00
AUTOMATIC
3a0d6b7729 make it so that PNG images with EXIF do not lose parameters in PNG info tab 2023-01-17 23:54:23 +03:00
AUTOMATIC
a8eb9e3bf8 Revert "Merge pull request #3791 from shirayu/fix/filename"
This reverts commit eed58279e7, reversing
changes made to 4ae960b01c.
2023-01-04 18:20:38 +03:00
AUTOMATIC1111
eed58279e7
Merge pull request #3791 from shirayu/fix/filename
Truncate too long filename (Fix #705)
2023-01-04 18:17:50 +03:00
AUTOMATIC
ef27a18b6b Hires fix rework 2023-01-02 19:42:10 +03:00
AUTOMATIC
e672cfb074 rework of callback for #6094 2023-01-01 18:37:55 +03:00
AUTOMATIC1111
6062c85d4d
Merge pull request #6094 from AlUlkesh/master
Adding image numbers on grids
2023-01-01 18:31:01 +03:00
AlUlkesh
5f12b23b8b Adding image numbers on grids
New grid option in settings enables adding of image numbers on grids. This makes identifying the images, especially in larger batches, much easier.

Revert "Adding image numbers on grids"

This reverts commit 3530c283b4b1d3a3cab40efbffe4cf2697938b6f.

Implements Callback for image grid loop

Necessary to make "Add image's number to its picture in the grid" extension possible.
2023-01-01 11:21:50 +01:00
Vladimir Mandic
ae955b0146 fix rgba to rgb when using jpeg output 2022-12-26 09:56:19 -05:00