Commit Graph

518 Commits

Author SHA1 Message Date
Kohaku-Blueleaf
70e66e81e5 Merge branch 'dev' into efficient-vae-methods 2023-08-04 14:38:16 +08:00
AUTOMATIC1111
f0c1063a70 resolve some of circular import issues for kohaku 2023-08-04 09:13:46 +03:00
Kohaku-Blueleaf
75336dfc84 add TAESD for i2i and t2i 2023-08-04 13:38:52 +08:00
Splendide Imaginarius
a1825ee741 Make StableDiffusionProcessingImg2Img.mask_blur a property
Fixes breakage when mask_blur is set after construction.

See https://github.com/Coyote-A/ultimate-upscale-for-automatic1111/issues/111#issuecomment-1652091424

Thanks to Алексей Трофимов and eunnone for reporting the issue.
2023-08-03 02:07:00 +00:00
AUTOMATIC1111
84b6fcd02c add NV option for Random number generator source setting, which allows to generate same pictures on CPU/AMD/Mac as on NVidia videocards. 2023-08-03 00:00:23 +03:00
AUTOMATIC1111
ccb9233934 add yet another torch_gc to reclaim some of VRAM after the initial stage of img2img 2023-08-02 18:53:09 +03:00
AUTOMATIC1111
c09bc2c608 fix "clamp_scalar_cpu" not implemented for 'Half' 2023-07-31 13:20:26 +03:00
AUTOMATIC1111
29d7e31d89 repair AttributeError: 'NoneType' object has no attribute 'conditioning_key' 2023-07-31 10:43:26 +03:00
AUTOMATIC1111
dca121e903 set the field to None instead 2023-07-31 09:13:07 +03:00
AUTOMATIC1111
0af4127fd1 delete the field that is preventing the model from being unloaded and is causing increased RAM usage 2023-07-30 19:36:24 +03:00
AUTOMATIC1111
02038036ff make it so that VAE NaNs autodetection also works during first pass of hires fix 2023-07-30 16:16:31 +03:00
AUTOMATIC1111
cc53db6652 this time for sure 2023-07-30 15:30:33 +03:00
AUTOMATIC1111
a64fbe8928 make it possible to use checkpoints of different types (SD1, SDXL) in first and second pass of hires fix 2023-07-30 15:12:09 +03:00
AUTOMATIC1111
eec540b227 repair non-latent upscaling broken for SDXL 2023-07-30 15:04:12 +03:00
AUTOMATIC1111
77761e7bad linter 2023-07-30 14:10:33 +03:00
AUTOMATIC1111
40cd59207b make it work with SDXL 2023-07-30 14:10:26 +03:00
AUTOMATIC1111
3bca90b249 hires fix checkpoint selection 2023-07-30 13:48:27 +03:00
AUTOMATIC1111
835a7dbf0e simplify PostprocessBatchListArgs 2023-07-26 07:49:57 +03:00
AUTOMATIC1111
7c22bbd3ad attempt 2 2023-07-26 07:04:07 +03:00
AUTOMATIC1111
ae36e0899f alternative solution for infotext issue 2023-07-26 06:36:06 +03:00
ljleb
5b06607476 simplify 2023-07-24 15:43:06 -04:00
ljleb
6b68b59032 use local vars 2023-07-24 15:38:52 -04:00
ljleb
ca45ff1ae6 add postprocess_batch_list callback 2023-07-24 13:52:24 -04:00
AUTOMATIC1111
23c947ab03 automatically switch to 32-bit float VAE if the generated picture has NaNs. 2023-07-19 20:23:30 +03:00
AUTOMATIC1111
4334d25978 bugfix: model name was added together with directory name to infotext and to [model_name] filename pattern 2023-07-19 15:49:54 +03:00
w-e-w
c8b55f29e2 missing p save_image before-highres-fix 2023-07-19 08:27:19 +09:00
AUTOMATIC1111
570f42afd1 possible fix for FP16 VAE failing in img2img SDXL 2023-07-16 12:28:50 +03:00
AUTOMATIC1111
0198eaec45
Merge pull request #11757 from AUTOMATIC1111/sdxl
SD XL support
2023-07-16 12:04:53 +03:00
AUTOMATIC1111
2b1bae0d75 add textual inversion hashes to infotext 2023-07-15 08:41:22 +03:00
AUTOMATIC1111
14cf434bc3 fix an issue in live previews that happens when you use SDXL with fp16 VAE 2023-07-15 07:33:16 +03:00
AUTOMATIC1111
471a5a66b7 add more relevant fields to caching conds 2023-07-14 17:54:09 +03:00
AUTOMATIC1111
594c8e7b26 fix CLIP doing the unneeded normalization
revert SD2.1 back to use the original repo
add SDXL's force_zero_embeddings to negative prompt
2023-07-13 11:35:52 +03:00
AUTOMATIC1111
da464a3fb3 SDXL support 2023-07-12 23:52:43 +03:00
Aarni Koskela
da468a585b Fix typo: checkpoint_alisases 2023-07-08 17:28:42 +03:00
AUTOMATIC1111
53924aeaf0
Merge pull request #11477 from hako-mikan/master
add `before_hr` script callback
2023-07-08 14:43:06 +03:00
AUTOMATIC1111
9be8903ca9
Merge pull request #11567 from AUTOMATIC1111/seed_resize_to_0
Don't add "Seed Resize: -1x-1" to API image metadata
2023-07-08 13:58:31 +03:00
missionfloyd
f731a728c6
Check seed_resize_from <= 0 2023-07-03 11:41:10 -06:00
missionfloyd
7f46f81dd7
Change default seed_resize to 0 2023-07-01 17:20:56 -06:00
hako-mikan
b0ec69b360
add 'before_hr callback' script callback 2023-06-28 18:37:08 +09:00
AUTOMATIC1111
fab73f2e7d
Merge pull request #11325 from stablegeniusdiffuser/dev-batch-grid-metadata
Add parameter to differentiate between batch run grids or ordinary images to write proper metadata
2023-06-27 14:23:39 +03:00
AUTOMATIC1111
4147fd6b2f
Merge branch 'dev' into 10141-gradio-user-exif 2023-06-27 09:05:53 +03:00
stablegeniusdiffuser
27e9e3f6fa Add use_main_prompt parameter to use proper metadata for batch run grids or individual images 2023-06-19 20:36:44 +02:00
Jared Deckard
f603275d84 Add an opt-in infotext user name setting 2023-06-15 11:00:20 -05:00
Jared Deckard
d3c86e5178 Note the Gradio user in the Exif data 2023-06-14 17:15:52 -05:00
AUTOMATIC
cfdd1b9418 linter 2023-06-09 22:47:27 +03:00
AUTOMATIC1111
d00139eea8
Merge pull request #11087 from AUTOMATIC1111/persistent_conds_cache
persistent conds cache
2023-06-09 22:32:49 +03:00
Splendide Imaginarius
1503af60b0 Split mask blur into X and Y components
Prequisite to fixing Outpainting MK2 mask blur bug.
2023-06-09 08:36:33 +00:00
w-e-w
7f2214aa2b persistent conds cache
Update shared.py
2023-06-08 14:27:22 +09:00
AUTOMATIC1111
7a7a201d81
Merge pull request #10956 from akx/len
Simplify a bunch of `len(x) > 0`/`len(x) == 0` style expressions
2023-06-05 11:06:37 +03:00
AUTOMATIC
fbf88343de prevent calculating cons for second pass of hires fix when they are the same as for the first pass 2023-06-04 16:29:02 +03:00
AUTOMATIC
1ca5e76f7b fix for conds of second hires fox pass being calculated using first pass's networks, and add an option to revert to old behavior 2023-06-04 13:07:31 +03:00
w-e-w
1c9d1b0ee0 simplify self.extra_network_data 2023-06-04 05:19:34 +09:00
w-e-w
f098e726d3 fix conds caching with extra network 2023-06-04 04:24:44 +09:00
Aarni Koskela
51864790fd Simplify a bunch of len(x) > 0/len(x) == 0 style expressions 2023-06-02 15:07:10 +03:00
AUTOMATIC
a9674359ca revert the erroneous change for model setting added in df02498d 2023-06-01 19:52:04 +03:00
AUTOMATIC1111
c63d46ceb8 Merge pull request #10804 from AUTOMATIC1111/fix-xyz-clip
Fix get_conds_with_caching()
2023-05-31 22:54:51 +03:00
AUTOMATIC
df02498d03 add an option to show selected setting in main txt2img/img2img UI
split some code from ui.py into ui_settings.py ui_gradio_edxtensions.py
add before_process callback for scripts
add ability for alwayson scripts to specify section and let user reorder those sections
2023-05-31 22:40:09 +03:00
AUTOMATIC1111
52b8752e62
Merge branch 'dev' into report-error 2023-05-31 19:15:21 +03:00
w-e-w
4a449375a2 fix get_conds_with_caching() 2023-05-30 01:07:35 +09:00
Aarni Koskela
00dfe27f59 Add & use modules.errors.print_error where currently printing exception info by hand 2023-05-29 09:17:30 +03:00
AUTOMATIC
339b531570 custom unet support 2023-05-27 15:47:33 +03:00
AUTOMATIC
ff0e17174f rework hires prompts/sampler code to among other things support different extra networks in first/second pass
rework quoting for infotext items that have commas in them to use json (should be backwards compatible except for cases where it didn't work previously)
add some locals from processing function into the Processing class as fields
2023-05-18 20:16:09 +03:00
AUTOMATIC
5ec2c294ee Merge remote-tracking branch 'InvincibleDude/improved-hr-conflict-test' into hires-fix-ext 2023-05-18 17:57:16 +03:00
AUTOMATIC
44c37f94e1 add messages about Loras that failed to load to UI 2023-05-18 16:36:30 +03:00
AUTOMATIC
9fd6c1e343 move some settings to the new Optimization page
add slider for token merging for img2img
rework StableDiffusionProcessing to have the token_merging_ratio field
fix a bug with applying png optimizations for live previews when they shouldn't be applied
2023-05-17 20:22:54 +03:00
Aarni Koskela
315f109427 Copy s_min_uncond to Processed
Should fix #10416
2023-05-17 10:26:32 +03:00
AUTOMATIC
a61cbef02c add second_order field to sampler config 2023-05-16 12:36:15 +03:00
AUTOMATIC
cdac5ace14 suppress ENSD infotext for samplers that don't use it 2023-05-16 11:54:02 +03:00
papuSpartan
c2fdb44880 fix for img2img 2023-05-13 11:11:02 -05:00
papuSpartan
ac83627a31 heavily simplify 2023-05-13 10:23:42 -05:00
papuSpartan
55e52c878a remove command line option 2023-05-13 09:24:56 -05:00
papuSpartan
75b3692920 Merge branch 'dev' of https://github.com/AUTOMATIC1111/stable-diffusion-webui into tomesd 2023-05-11 22:40:17 -05:00
Aarni Koskela
49a55b410b Autofix Ruff W (not W605) (mostly whitespace) 2023-05-11 20:29:11 +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
Aarni Koskela
3ba6c3c83c Fix up string formatting/concatenation to f-strings where feasible 2023-05-09 22:25:39 +03:00
AUTOMATIC
ab4ab4e595 add version to infotext, footer and console output when starting 2023-05-08 15:23:49 +03:00
papuSpartan
e960781511 fix maximum downsampling option 2023-05-03 13:12:43 -05:00
papuSpartan
f08ae96115 resolve merge conflicts and swap to dev branch for now 2023-05-03 02:21:50 -05:00
w-e-w
0d1ef296b9 checkpoint override enhancement 2023-05-01 05:22:53 +09:00
AUTOMATIC1111
e7d624574d
Merge branch 'dev' into master 2023-04-29 16:41:01 +03:00
AUTOMATIC
7428fb5176 add is_hr_pass field for processing 2023-04-29 16:28:51 +03:00
AUTOMATIC
1d11e89698 rework Negative Guidance minimum sigma to work with AND, add infotext and copypaste parameters support 2023-04-29 15:57:09 +03:00
AUTOMATIC1111
3591eefedf
Merge pull request #9177 from devNegative-asm/master
(Optimization) Option to remove negative conditioning at low sigma values
2023-04-29 14:38:25 +03:00
AUTOMATIC1111
32c3b97669
Merge pull request #9628 from catboxanon/patch/9092
Fix image mask/composite for weird resolutions
2023-04-29 13:21:32 +03:00
AUTOMATIC1111
d6a3988b86
Merge pull request #9669 from catboxanon/patch/sampler-schedule-fix
Fix prompt schedule for second order samplers
2023-04-29 12:56:57 +03:00
AUTOMATIC
5fe0dd79be rename CPU RNG to RNG source in settings, add infotext and parameters copypaste support to RNG source 2023-04-29 11:29:37 +03:00
catboxanon
9de7298898
Update processing.py 2023-04-16 21:06:37 -04:00
catboxanon
4d0c816303
Modify step multiplier flow 2023-04-16 20:39:45 -04:00
catboxanon
56f8a6b081
Fix sampler schedules with step multiplier 2023-04-16 20:34:52 -04:00
catboxanon
fbab3fc6d1
Only handle image mask if any option enabled 2023-04-14 17:24:55 -04:00
catboxanon
3af152d488
Fix image mask composite for weird resolutions 2023-04-14 17:17:14 -04:00
papuSpartan
1c11062603 add token merging options to infotext when necessary. Bump tomesd
version
2023-04-10 03:41:05 -05:00
gk
d609f6030e Add [batch_number] and [generation_number] filename patterns 2023-04-07 21:04:46 +09:00
For Sure
b3593d0997 Add support for saving init images in img2img 2023-04-06 19:42:26 +03:00
papuSpartan
5c8e53d5e9 Allow different merge ratios to be used for each pass. Make toggle cmd flag work again. Remove ratio flag. Remove warning about controlnet being incompatible 2023-04-04 02:26:44 -05:00
papuSpartan
c707b7df95 remove excess condition 2023-04-01 23:47:10 -05:00
papuSpartan
a609bd56b4 Transition to using settings through UI instead of cmd line args. Added feature to only apply to hr-fix. Install package using requirements_versions.txt 2023-04-01 22:18:35 -05:00
devdn
42082e8a32 performance increase 2023-03-28 20:56:01 -04:00
AUTOMATIC
433b3ab701 Revert "Merge pull request #7931 from space-nuko/img2img-enhance"
This reverts commit 4268759370, reversing
changes made to 1b63afbedc.
2023-03-28 20:36:57 +03:00
AUTOMATIC1111
4268759370
Merge pull request #7931 from space-nuko/img2img-enhance
Add `Upscale by` and `Upscaler` options to img2img
2023-03-28 20:21:25 +03:00
AUTOMATIC1111
f1db987e6a
Merge pull request #8958 from MrCheeze/variations-model
Add support for the unclip (Variations) models, unclip-h and unclip-l
2023-03-28 19:39:20 +03:00
MrCheeze
8a34671fe9 Add support for the Variations models (unclip-h and unclip-l) 2023-03-25 21:03:07 -04:00
space-nuko
7ea5d395c4 Add upscaler to img2img 2023-03-25 12:52:43 -04:00
space-nuko
68999d0b15 Add upscale slider to img2img 2023-03-25 12:52:35 -04:00
catboxanon
caf84e8233 Expose inpainting mask and composite
For inpainting, this exposes the mask and masked composite and gives
the user the ability to display these in the web UI,
save to disk, or both.
2023-03-22 17:51:40 +00:00
InvincibleDude
f5e4436453
Merge branch 'master' into improved-hr-conflict-test 2023-03-14 16:55:59 +03:00
high_byte
4d26c7da57 initialize extra_network_data before use 2023-03-13 17:37:29 +02:00
AUTOMATIC1111
da3f942ab2
Merge pull request #8017 from space-nuko/before-process-batch
Add `before_process_batch` script callback
2023-03-11 14:33:38 +03:00
space-nuko
ac38ad7e60 Merge remote-tracking branch 'origin/master' into unipc 2023-03-10 19:42:46 -05:00
InvincibleDude
f6e2737840
Negative prompt fix 2023-03-10 12:13:55 +00:00
InvincibleDude
b9fdb9f701
Fix crash when hr is disabled 2023-03-04 18:09:05 +00:00
InvincibleDude
e97b83bdbb
Merge branch 'master' into improved-hr-conflict-test 2023-03-03 19:49:24 +03:00
InvincibleDude
51f81efb02 Image processing changes
Image processing changes
2023-03-03 19:45:33 +03:00
space-nuko
a2d635ad13 Add before_process_batch script callback 2023-02-22 01:52:53 -08:00
AUTOMATIC
15f4b217b1 fix the a merge conflict resolve i did that entirely breaks image generation 2023-02-19 09:50:14 +03:00
AUTOMATIC1111
6911deb242
Merge branch 'master' into fix-save-params-2 2023-02-19 09:15:45 +03:00
space-nuko
b20737815a Fix params.txt saving for infotexts modified by process_batch 2023-02-16 21:44:46 -08:00
space-nuko
0a4917ac40 Apply extra networks per-batch instead of per-session (fixes wildcards) 2023-02-13 03:33:28 -08:00
space-nuko
fb274229b2 bug fix 2023-02-10 14:30:35 -08:00
space-nuko
c88dcc20d4 UniPC does not support img2img (for now) 2023-02-10 05:00:54 -08:00
space-nuko
1253199889 Working UniPC (for batch size 1) 2023-02-10 03:30:20 -08:00
InvincibleDude
c3bd113a0b
Image info fix 2023-02-05 15:24:41 +00:00
InvincibleDude
f4b78e73a4
Merge branch 'AUTOMATIC1111:master' into improved-hr-conflict-test 2023-02-05 18:02:44 +03:00
Kyle
c27c0de0f7 txt2img Hires Fix 2023-02-03 19:15:32 -05:00
Kyle
6c6c6636bb Image CFG Added (Full Implementation)
Uses separate denoiser for edit (instruct-pix2pix) models

No impact to txt2img or regular img2img

"Image CFG Scale" will only apply to instruct-pix2pix models and metadata will only be added if using such model
2023-02-03 18:19:56 -05:00
Kyle
3b2ad20ac1 Processing only, no CFGDenoiser change
Allows instruct-pix2pix
2023-02-02 19:19:45 -05:00
Kyle
cf0cfefe91 Revert "instruct-pix2pix support"
This reverts commit 269833067d.
2023-02-02 19:15:38 -05:00
Kyle
269833067d instruct-pix2pix support 2023-02-02 09:37:01 -05:00
InvincibleDude
3ec2eb8bf1
Merge branch 'master' into improved-hr-conflict-test 2023-01-30 15:35:13 +03:00
AUTOMATIC
040ec7a80e make the program read Eta and Eta DDIM from generation parameters 2023-01-30 10:47:09 +03:00
invincibledude
425eab3464 Extra network in hr abomination fix 2023-01-29 19:26:31 +03:00
invincibledude
9beeef6267 Extra networks loading fix 2023-01-29 19:16:17 +03:00
invincibledude
6127d2ff1b Extra networks loading fix 2023-01-29 19:13:27 +03:00
invincibledude
c92ec3a925 Extra networks loading fix 2023-01-29 19:07:00 +03:00
InvincibleDude
ee3d63b6be
Merge branch 'master' into master 2023-01-29 14:36:10 +03:00
AUTOMATIC
00dab8f10d remove Batch size and Batch pos from textinfo (goodbye) 2023-01-29 11:53:24 +03:00
AUTOMATIC1111
fecb990deb
Merge pull request #7309 from brkirch/fix-embeddings
Fix embeddings, upscalers, and refactor `--upcast-sampling`
2023-01-28 18:44:36 +03:00
brkirch
ada17dbd7c Refactor conditional casting, fix upscalers 2023-01-28 04:16:25 -05:00
Max Audron
5eee2ac398 add data-dir flag and set all user data directories based on it 2023-01-27 14:44:30 +01:00
AUTOMATIC
7a14c8ab45 add an option to enable sections from extras tab in txt2img/img2img
fix some style inconsistenices
2023-01-26 23:31:32 +03:00
brkirch
10421f93c3 Fix full previews, --no-half-vae 2023-01-26 01:43:35 -05:00
AUTOMATIC
d1d6ce2983 add edit_image_conditioning from my earlier edits in case there's an attempt to inegrate pix2pix properly
this allows to use pix2pix model in img2img though it won't work well this way
2023-01-25 23:25:25 +03:00
AUTOMATIC1111
1574e96729
Merge pull request #6510 from brkirch/unet16-upcast-precision
Add upcast options, full precision sampling from float16 UNet and upcasting attention for inference using SD 2.1 models without --no-half
2023-01-25 19:12:29 +03:00
AUTOMATIC
57c1baa774 change to code for live preview fix on OSX to be bit more obvious 2023-01-25 18:56:23 +03:00
brkirch
e3b53fd295 Add UI setting for upcasting attention to float32
Adds "Upcast cross attention layer to float32" option in Stable Diffusion settings. This allows for generating images using SD 2.1 models without --no-half or xFormers.

In order to make upcasting cross attention layer optimizations possible it is necessary to indent several sections of code in sd_hijack_optimizations.py so that a context manager can be used to disable autocast. Also, even though Stable Diffusion (and Diffusers) only upcast q and k, unfortunately my findings were that most of the cross attention layer optimizations could not function unless v is upcast also.
2023-01-25 01:13:04 -05:00
brkirch
84d9ce30cb Add option for float32 sampling with float16 UNet
This also handles type casting so that ROCm and MPS torch devices work correctly without --no-half. One cast is required for deepbooru in deepbooru_model.py, some explicit casting is required for img2img and inpainting. depth_model can't be converted to float16 or it won't work correctly on some systems (it's known to have issues on MPS) so in sd_models.py model.depth_model is removed for model.half().
2023-01-25 01:13:02 -05:00
InvincibleDude
44c0e6b993
Merge branch 'AUTOMATIC1111:master' into master 2023-01-24 15:44:09 +03:00
brkirch
f64af77adc Fix different first gen with Approx NN previews
The loading of the model for approx nn live previews can change the internal state of PyTorch, resulting in a different image. This can be avoided by preloading the approx nn model in advance.
2023-01-23 22:49:20 -05:00
invincibledude
3bc8ee998d Gen params paste improvement 2023-01-22 16:35:42 +03:00