Commit Graph

118 Commits

Author SHA1 Message Date
Bryce
62e4e9cc9d refactor: delete unused code 2022-10-07 00:02:26 -05:00
Bryce
e5c5df6b3d tests: add some utils tests 2022-10-07 00:02:26 -05:00
Bryce
0244d4151f version: 2.3.1 2022-10-06 17:26:00 -07:00
Bryce
beba2be6d5 fix: set fidelity default if None is passed in
Addresses #48
2022-10-06 19:24:27 -05:00
Bryce
5cc19c460c version: 2.3.0 2022-10-05 23:35:05 -07:00
Bryce
00fff23fdf docs: update macos installation instructions 2022-10-06 01:24:21 -05:00
Bryce
2221d3d1c2 fix: handle small input images
If input images didn't need resizing because they were already smaller than max width/height then they didn't get normalized to a multiple of 64.  This caused an exception like the following:

```Sizes of tensors must match except in dimension 1. Expected size 4 but got size 3 for tensor number 1 in the list.
```
2022-10-06 01:24:21 -05:00
Bryce
d3623882db fix: set default back to previous value
addresses #43
2022-10-06 01:24:21 -05:00
Bryce
340a90bacd feature: allow loading custom model weights at command line
Addresses #40
2022-10-06 00:30:50 -05:00
Bryce
282fbc19b5 version: 2.2.1 2022-10-04 06:21:37 -07:00
Bryce
d689b06256 fix: ensure init-image-strength 0 is respected
addresses https://github.com/brycedrennan/imaginAIry/issues/38
2022-10-04 06:18:46 -07:00
Bryce
302845f35a docs: update feature plans 2022-10-04 06:18:46 -07:00
Bryce
da0b983622 version: 2.2.0 2022-10-03 16:35:57 -07:00
Bryce
48117bbcb1 feature: face-fidelity is now configurable
remove face-fixing from upscaled version
2022-10-03 16:33:17 -07:00
Bryce
9fe3cf79c2 feature: better masking segmentation from clipseg 2022-09-27 23:42:42 -07:00
Bryce
f21c979f08 feature: better masking segmentation from clipseg 2022-09-27 23:35:06 -07:00
Bryce
c92e5c443f version: 2.0.3 2022-09-27 21:52:45 -07:00
Bryce
bc135724a3 fix: fix memory leak in face enhancer
thanks to @h4rk8s for discovering and finding a remedy

root cause was a model being instantiated inside
FaceRestoreHelper
2022-09-27 21:45:32 -07:00
Bryce
2791917fc8 version: 2.0.1 2022-09-27 17:19:54 -07:00
Bryce
95a8fa31a9 fix: inpainting producing blurry images
while the previous version did produce much better blending it also makes images that lack detail for some reason.

tests: Added more tests to help catch this sort of thing earlies

fix: found that median blur is really slow, so I made sure we only do it on downsampled masks.  Was taking like 3 minutes to run on the large pearl girl picture on M1

- docs: update examples
2022-09-27 17:19:25 -07:00
Bryce
0fb03f2a1f fix/version: 2.0.1
quick fix for compatibility with Pillow < 9.1.0
https://stackoverflow.com/questions/71738218/module-pil-has-not-attribute-resampling
2022-09-25 23:27:03 -07:00
Bryce
7fb652d38a version: 2.0.0 2022-09-25 23:13:07 -07:00
Bryce
6cae290038 fix: inpainting now matches photo at high generation strength
- 🎉 fix: inpainted areas correlate with surrounding image, even at 100% generation strength.  Previously if the generation strength was high enough the generated image
would be uncorrelated to the rest of the surrounding image.  It created terrible looking images.
 - fix: mask boundaries are more accurate
2022-09-25 22:50:16 -07:00
Bryce
d563e0c7fb refactor: image version management
- mask_modify_original is now a prompt attribute
2022-09-25 22:50:16 -07:00
Bryce
eaad0a15e4 ci: add automated testing/linting
- fix bugs
- disable some tests from running in CPU only mode since github actions can't handle it
2022-09-24 23:31:03 -07:00
Bryce
2f959c7394 docs: complete sentence 2022-09-24 23:31:03 -07:00
Bryce
d832f15297 fix: masking now works properly at strengths 0 and 1 2022-09-24 23:31:03 -07:00
Bryce
b69072d382 fix: various bugfixes 2022-09-24 23:31:03 -07:00
Bryce
2eec756fab feature: have initial generated images in their own folder 2022-09-24 23:31:03 -07:00
Bryce
30a80faf47 fix: use better rescale 2022-09-24 23:31:03 -07:00
Bryce
b69b4c770e feature: interactive prompt
- add quiet flag
- add mask-modify-original flag
2022-09-24 23:31:03 -07:00
Bryce
69af07ab67 style: fix lint issues 2022-09-24 00:31:08 -07:00
Bryce
38c7f88950 feature: boolean logic masks
Specify advanced text based masks using boolean logic and strength modifiers. Mask descriptions must be lowercase. Keywords uppercase.
Valid symbols: `AND`, `OR`, `NOT`, `()`, and mask strength modifier `{*1.5}` where `+` can be any of `+ - * /`. Single-character boolean
operators also work.  When writing strength modifies know that pixel values are between 0 and 1.

 - feature: apply mask edits to original files
 - feature: auto-rotate images if exif data specifies to do so
 - fix: accept mask images in command line
2022-09-24 00:02:31 -07:00
Bryce Drennan
d090f9d072
fix: unneeded argument 2022-09-23 15:15:41 -07:00
Bryce Drennan
eb54b9ca7f
Merge pull request #22 from brycedrennan/pylama_lint_updates
refactor: implements changes to comply with pylama
2022-09-23 14:41:52 -07:00
Bryce
a3a0de08e9 autoformat 2022-09-23 14:41:15 -07:00
Bryce Drennan
5f1dd5c3b8
Merge pull request #24 from dfyx/fix-mask-image
Fix loading mask image from command line
2022-09-23 11:37:28 -07:00
Christian Käser
9fdd38fc11
Fix loading mask image from command line 2022-09-23 20:33:11 +02:00
Jay Drennan
df28bf8805 refactor: implements changes to comply with pylama 2022-09-22 12:52:37 -06:00
Bryce
8e844f2eae version: 1.6.2 2022-09-22 10:34:34 -07:00
Bryce
cc014685bd fix: leave sample in float32 for all final processing 2022-09-22 10:33:35 -07:00
Bryce
09f00f9652 version: 1.6.1 2022-09-22 08:26:55 -07:00
Bryce
9614a82f12 fix: use float32 at image render time for wider cpu compatibility
If the x_sample was a bfloat on the gpu but the cpu doesn't support bfloat, that can cause a TypeError
```
  File "/home/stdiff/.local/lib/python3.10/site-packages/imaginairy/api.py", line 292, in imagine
    x_sample.cpu().numpy(), "c h w -> h w c"

TypeError: Got unsupported ScalarType BFloat16`
```
2022-09-22 08:25:06 -07:00
Bryce Drennan
08fca72033
Merge pull request #18 from brycedrennan/bugfixes
Bugfixes + per-prompt tile mode
2022-09-21 22:45:05 -07:00
Bryce
a275d9c9cd version: 1.6.0 + docs 2022-09-21 22:44:49 -07:00
Bryce
cdfeaa4c6f tests: add docker image for testing environment. minor test improvements 2022-09-21 22:38:44 -07:00
Bryce
09bc1c70e6 fix: try to address #13 BFloat16 issue
Seems to be caused by incompatible types in group_norm when we use autocast.

Patch group_norm to cast the weights to the same type as the inputs

From what I can understand all the other repos just switch to full precision instead
of addressing this.  I think this would make things slower but I'm not sure. So maybe
the patching solution I'm doing is better?

https://github.com/pytorch/pytorch/pull/81852
2022-09-21 22:03:12 -07:00
Bryce
e23e363bf5 lint 2022-09-21 09:14:39 -07:00
Bryce
ff7fc0dab7 feature: tile mode can now be specified per-prompt 2022-09-20 22:57:03 -07:00
Bryce
41b0ae99b3 version 1.5.4
minor changes to help with google colab compat
2022-09-20 21:16:09 -07:00