Bryce
52044c1073
fix: use model appropriate composition size
2023-02-28 23:14:22 -08:00
Bryce
3b777b98d8
fix: improved large images using composition
2023-02-28 21:04:00 -08:00
Bryce
a449fbd5e2
feature: remove tiling message for upscaler
2023-02-28 21:04:00 -08:00
Bryce
40da2b0357
tests: fix tests
2023-02-28 21:04:00 -08:00
Bryce
dbc6a249a6
fix: k-diff samplers made more stable by skipping second to last step
...
https://github.com/crowsonkb/k-diffusion/issues/43#issuecomment-1305195666
See discussion here as well: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3483
2023-02-28 21:04:00 -08:00
Bryce
70c58467c0
fix: img2img was broken for all samplers except ddim,plms
...
img2img was broken for all samplers except plms and ddim when init image strength was >~0.25. Been this way for a while. whoops
2023-02-28 21:04:00 -08:00
Bryce
28c294554b
fix: specify name of imagine command
2023-02-26 17:13:47 -08:00
Bryce
8273ab2c26
feature: add --fix-faces
options to aimg upscale
command
2023-02-25 14:29:55 -08:00
Bryce
d14c8f98f4
feature: aimg model-list
command lists included models
2023-02-25 14:29:55 -08:00
Bryce
e3b23584ed
refactor: split up command line tool
2023-02-25 14:29:55 -08:00
Bryce
c0fad5b2a3
fix: add missing alias
2023-02-25 14:29:55 -08:00
Bryce
d5cff45bff
feature: allow input of raw control images
2023-02-25 14:29:55 -08:00
Bryce
8f56e14dc7
feature: add system memory to debug output
2023-02-25 14:29:55 -08:00
Bryce
d7e494241c
fix: composition images were too blurry
2023-02-25 14:29:55 -08:00
cocktailpeanut
be7f8f3c2a
feature: support additional metadata attributes ( #271 )
...
added `init-image-strength` and `model` so they can be fully displayed on png info inspectors or stable diffusion browsers such as https://breadboard.me
2023-02-24 20:44:26 -08:00
Bryce
9831d8a24a
feature: aimg colorize
attempts to use controlnet to colorize images
2023-02-23 01:46:37 -08:00
Bryce
b261c62d4e
docs: update docs
2023-02-22 23:38:47 -08:00
Bryce
54c3ad51d6
feature: controlnet
2023-02-22 23:38:47 -08:00
Bryce
bcd761b8a6
tests: better coverage of cli commands
...
add "empty" model that just uses empty state for models
2023-02-20 11:06:54 -08:00
Bryce
1563e0b871
test: add some autoencoder tests
...
the fold-unfold encoding/decoding looks like it's slower and has worse seams than the sliced feathering approach
2023-02-18 15:36:34 -08:00
Bryce
929eff353e
fix: edit was broken by recent changes
2023-02-17 13:43:56 -08:00
Bryce
5b1cded94f
fix: compose phase for edits probably doesn't make sense
2023-02-17 13:43:56 -08:00
Bryce
6f749ac4b6
fix: create compilations dir as needed
2023-02-17 10:08:12 -08:00
Bryce
882cc7e0f1
feature: generate large images with coherent composition
2023-02-16 13:09:14 -08:00
Bryce
c3a88c44cd
perf: tiled encoding of images
...
The fold/unfold/split_input_params images didn't look good
2023-02-16 13:09:14 -08:00
Bryce
2aef6089e0
feature: generate large images
...
Added a composition stage so large images are more coherent
2023-02-16 13:09:14 -08:00
Bryce
b93b6a4d7c
perf: use silu instead of nonlinearity for speedup
2023-02-15 14:22:00 -08:00
Bryce
68e7fd73c5
perf: add xformers dependency
2023-02-15 14:22:00 -08:00
Bryce
003a512dc8
perf: mps perf improvement
...
attention slicing wasn't working
2023-02-15 14:22:00 -08:00
Bryce
66b28c80fc
fix: images came out wrong if processed on mps
2023-02-15 14:22:00 -08:00
Bryce
8db73707ff
perf: load model to gpu after making it "half"
2023-02-15 14:22:00 -08:00
Bryce
1c8893cecc
fix: fix image gen retry
2023-02-15 14:22:00 -08:00
Bryce
ea1d4baafe
refactor: cleanup image generation code
2023-02-15 14:22:00 -08:00
Bryce
8a97213622
feature: sliced latent decoding
...
allows generation of bigger images. tile seams can be noticeable occasionally despite the feathering
2023-02-12 01:41:57 -08:00
Bryce
da70b310d5
fix: edit interface was broken
2023-02-05 21:16:09 -08:00
Bryce
eeb80f81aa
docs: update changelog
2023-02-05 12:41:54 -05:00
Bryce
76d40560ef
style: lintfix
2023-02-05 12:41:54 -05:00
Bryce
6c1e3b2ae7
feature: allow specifying output format
...
closes #228
2023-02-05 12:41:54 -05:00
Bryce
d220819377
feature: accept multiple input images to allow batch editing
...
- move "surprise me" to "edit-demo"
2023-02-05 12:41:54 -05:00
Bryce
63f32846bb
docs: no mps training; how change cache dir
2023-02-05 12:41:54 -05:00
Bryce
d9a70a55c6
feature/docs: cleanup cli
...
- add colors to help text
- add suggestion to use `aimg` shell
- lazy imports for faster response time
2023-02-05 12:41:54 -05:00
Bryce Drennan
9eacf5e7ed
perf: improve startup time by doing some imports lazily ( #233 )
...
just running `aimg --help` or `aimg --version` was very slow due to all the imports being brought in eagerly
Before changes `aimg --help`
`2.24s user 4.05s system 184% cpu 3.416 total`
After changes:
`0.04s user 0.02s system 8% cpu 0.625 total`
Used `PYTHONPROFILEIMPORTTIME=1 aimg --help` to find time consuming imports.
Also switched to using `scripts` instead of `entrypoints` since the scripts are much faster.
Made duplicate SAMPLER_TYPE_OPTIONS that can be loaded without loading all the samplers themselves.
Likely a breaking change - not sure.
2023-02-02 21:43:04 -08:00
Bryce
19444d8e22
fix: first frame should be the interesting one
2023-01-28 21:32:56 -08:00
Bryce Drennan
e619dc2867
fix: init image strength ( #225 )
2023-01-28 19:34:25 -08:00
Bryce Drennan
9ee09ac842
feature: add compilation animations ( #224 )
...
- add generation/compare gifs
2023-01-28 17:16:47 -08:00
Bryce Drennan
a67683d318
feature: add upscale command line function ( #222 )
2023-01-27 23:57:31 -08:00
Bryce Drennan
542e4fbd55
fix: tile mode was broken since latest perf improvements ( #220 )
2023-01-27 22:56:46 -08:00
Pavel Yakovlev
e1c9f14489
feature: add openjourney models
2023-01-27 22:52:19 -08:00
Bryce Drennan
9e06013ade
feature: save gifs that show image generation process ( #218 )
2023-01-27 17:18:42 -08:00
Bryce Drennan
6d733ed3ff
feature: added aimg system-info
command to help debug issues ( #216 )
2023-01-26 21:41:52 -08:00
Bryce Drennan
7bdde559cc
performance: memory management improvements ( #210 )
...
- tile mode made more efficient. especially when not being used
- add script to iteratively make bigger images
2023-01-26 03:14:02 -08:00
Jiaming Sun
a338902ab5
fix: add png handling for LazyLoadingImage ( #203 )
...
Loading png images for captioning will cause the following error since PIL loads png images in RGBA mode.
```python
File "./miniconda3/lib/python3.8/site-packages/torchvision/transforms/functional_tensor.py", line 940, in normalize
return tensor.sub_(mean).div_(std)
RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 0
```
2023-01-25 22:20:31 -08:00
Mahmoud Al-Qudsi
0b7692df07
fix: make model cached paths compatible with windows ( #205 )
...
If a model has a remote filename with characters that might not be supported on
the local cache filesystem, replace them during translation of URL to cached
file path.
Closes #202 .
2023-01-25 22:05:07 -08:00
Bryce
92baff890e
feature: surprise me improvements
2023-01-25 21:24:32 -08:00
Bryce
c7ed86a36f
feature: auto-retry generation unsafe image is created
2023-01-25 21:24:32 -08:00
Bryce
f60fa880a7
feature: less visually confusing shell output
2023-01-25 21:24:32 -08:00
Bryce
16cef16c3e
feature: facilitate references to previous image generation
2023-01-25 21:24:32 -08:00
Bryce
248679d8de
feature: image sizes can now be multiples of 8 instead of 64
...
from https://github.com/CompVis/stable-diffusion/issues/60#issuecomment-1240294667
2023-01-23 22:31:25 -08:00
Bryce
9212f0227c
fix: bypass hf cache retrieval bug
...
If one uses `hf_hub_download` only referencing specific commits the `refs` folder will not be created even though data will be cached via `snapshots` and `blobs`. Subsequent calls to `try_to_load_from_cache` will return None even though the desired data was in the cache.
Example:
```python
# download something
hf_hub_download(repo_id=repo, revision=commit_hash, filename=filepath, token=token)
# returns None
try_to_load_from_cache(repo_id=repo, revision=commit_hash, filename=filepath)
```
https://github.com/huggingface/huggingface_hub/pull/1306
2023-01-23 20:22:33 -08:00
Bryce
290b0a318e
fix: MacOS MPS background can't handle large slices
...
per
- https://github.com/brycedrennan/imaginAIry/issues/175
- https://github.com/invoke-ai/InvokeAI/issues/1244
2023-01-23 06:54:11 -08:00
Bryce
1c986d8644
fix: use py3.7 compat lru_cache
...
- disable lint fixer that updates to newer syntax
2023-01-22 18:24:57 -08:00
Bryce
097e763887
fix: hf_hub_download signature compat
...
instead of (incorrectly) trying to detect the function signature of the old version, just catch the error and try the old signature
2023-01-22 11:28:34 -08:00
mebelz
2571097087
fix: spelling typo
...
leave references to misspelled files- don't want to break any existing links
2023-01-22 08:49:14 -08:00
Bryce
00408d176f
performance: use tiling for upscaling for better use of memory
2023-01-22 08:46:37 -08:00
Bryce
2fca01b911
fix: not so old
2023-01-21 17:55:17 -08:00
Bryce
7c05c3aae2
feature: image edit gifs and demo-reels
2023-01-21 17:50:31 -08:00
Bryce
2a3e19f5a1
feature: 🎉 Edit Images with Instructions alone!
2023-01-21 13:34:26 -08:00
Bryce
7285644909
feature: prune-ckpt command can prune to just the ema
2023-01-21 13:34:26 -08:00
Bryce
5b56f05da7
feature: print version
...
- fix: default config wasn't being selected for custom models
2023-01-18 12:04:07 -08:00
Bryce
9b1d130f93
feature: ability to load safetensors
2023-01-17 22:56:16 -08:00
Bryce
81f294216b
feature: 🎉 outpainting
2023-01-17 00:31:01 -08:00
Bryce
02af4c37b9
fix: gracefully fail if older pytorch-lightning installed
2023-01-16 15:14:11 -08:00
Bryce
24e10f9e5f
fix: don't report a safety issue when a black image is generated
2023-01-16 14:51:31 -08:00
Bryce
fad7f17790
feature: run face enhancement on the GPU
...
Should run 10x faster
2023-01-16 12:49:14 -08:00
Bryce
85c084099c
fix: incorrect config files being used for non-1.0 models
2023-01-16 03:09:28 -08:00
Bryce
5cc73f6087
feature: finetuning
...
- feature: finetuning your own image models
- feature: image prep command. crops to face or other interesting parts of photo
- fix: back-compat for hf_hub_download
- feature: add prune-ckpt command
- feature: allow specification of model config file
2023-01-16 01:35:59 -08:00
Bryce
4bc78b9be5
build: vendorize realesrgan
...
Removes lots of dependencies including problematic `grpcio` and `tb-nightly`
2023-01-08 22:20:22 -08:00
Bryce
35ac8d64d7
build: vendorize parts of basicsr
...
Trying to get rid of tb-nightly dependency and any other unnecessary dependencies.
2023-01-08 22:20:22 -08:00
Bryce
e9a3e1a99b
build: unpin dependencies
2023-01-08 22:20:22 -08:00
Bryce
4bc940ddf4
feature: remove more randomness
2023-01-02 14:11:36 -08:00
Bryce
1381c7fed4
lint: new ruff linter
2023-01-02 14:11:36 -08:00
Bryce
da0f1e1ee6
fix: make sure randomness is generated on cpu for consistency
2022-12-21 09:33:46 -08:00
Bryce
239b235140
feature: depth-based image-to-image generations (and inpainting)
2022-12-20 09:03:55 -08:00
Bryce
ad0b9e8ab8
feature: tile in a single dimension ("x" or "y")
2022-12-19 21:37:59 -08:00
Bryce
1f7403155e
fix: more thorough cleaning of memory when switching models
...
also cleanup up some test failures
2022-12-18 22:00:29 -08:00
Bryce Drennan
ccf9749df5
fix: performance improvement. disable ema ( #139 )
...
A configuration `use_ema: False` was became necessary in the newer Stable Diffusion code but was missing from the 1.5 config.
2022-12-18 00:00:38 -08:00
Paul Mestemaker
ad5e467042
feat: include negative prompts in logs and exif metadata ( #135 )
2022-12-13 10:05:24 -08:00
Paul Mestemaker
68791cf236
feat: better handling for default model names ( #134 )
...
* feat: better handling for default model names
Addresses #124
2022-12-09 01:14:47 -08:00
Bryce
f30823e0b5
feature: Stable Diffusion 2.1
2022-12-07 10:41:36 -08:00
Bryce
2f8edc1530
feature: negative prompting
...
- feature: negative prompting. `--negative-prompt` or `ImaginePrompt(..., negative_prompt="ugly, deformed, extra arms, etc")`
- feature: a default negative prompt is added to all generations. Images in SD-2.0 don't look bad anymore. Images in 1.5 look improved as well.
2022-12-02 02:03:13 -08:00
Bryce
257752887d
perf: add back memory efficiency improvements
...
Removed these in a rush to get SD-2.0 out.
2022-11-28 00:32:53 -08:00
Bryce
e0af5d0089
fix: version metadata was broken
...
Fixes #114
2022-11-27 14:46:01 -08:00
Bryce
4610d7f01d
feature: xformers support
...
add more upscaling code (that doesn't yet work)
2022-11-26 22:55:51 -08:00
Bryce
9c153a8d2d
feature: support k-sampler methods for SD-2.0-v (768)
2022-11-26 16:18:08 -08:00
Bryce
015088507f
feature/refactor/fix: better defaults. correct version in metadata
...
- feature: use different default steps and image sizes depending on sampler and model selceted
- fix : #110 use proper version in image metadata
- refactor: samplers all have their own class that inherits from ImageSampler
2022-11-26 16:18:08 -08:00
Kian-Meng Ang
3d04df4dee
Fix typos
...
Found via `codespell -S ./imaginairy/vendored`
2022-11-25 19:23:06 -08:00
Bryce
58c2897dd1
refactor: fix lint issues
2022-11-25 14:39:20 -08:00
Maxime Mouchet
40ab571fc1
cli: show defaults and cleanup help text
2022-11-25 07:46:40 -08:00
Bryce
e67341223b
feature: Stable Diffusion 2.0
...
working: CUDA and MacOS
working: 512p model with all samplers
working: inpainting with all samplers
working: 768p model with ddim sampler
2022-11-24 00:50:57 -08:00
Bryce
893b041a8f
feature: progress image callback
2022-11-15 18:06:03 -08:00
Bryce
095a905d72
fix: cpu generation doesn't use autocast
...
autocast not supported on CPU
https://github.com/pytorch/pytorch/issues/55374
https://github.com/invoke-ai/InvokeAI/pull/518
2022-11-13 14:42:19 -08:00
Bryce
b8a88370de
fix: lower memory reqs for attention on M1s
2022-11-13 13:40:37 -08:00
Bryce
d499ca307b
fix: use inpainting source that doesn't require login
2022-11-12 21:13:25 -08:00
Bryce
584e0d9df0
feature: change default sampler to k_dpmpp_2m, which is more than twice as fast
2022-11-12 20:56:38 -08:00
Bryce
0f02fc587c
fix: k_dpm_fast on MPS platform
...
fixes #75
As discussed here: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2446#issuecomment-1279733739
2022-11-12 20:19:23 -08:00
Bryce
7af1ab66ca
fix: add workaround for bug in k_diffusion on mps
...
As documented here: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4558#issuecomment-1310387114
- make image logs more consistent
- note which step the progress images belong to in the filename
2022-11-12 20:19:23 -08:00
Bryce
7fba2972e8
feature: added DPM++ 2S a
and DPM++ 2M
samplers
...
-fix: fix bug with `--show-work`
2022-11-11 10:52:48 -08:00
Bryce
021a0c540d
feature: inpainting model support; improved model manager
2022-10-25 20:07:35 -07:00
Bryce
94c0aeab12
feature: switch between models without restarting python instance
2022-10-23 22:55:28 -07:00
Bryce
4d802a043e
feature: stable diffusion 1.5
2022-10-22 02:22:57 -07:00
Bryce
8332593fed
feature: dilation and erosion of masks
...
Previously the `+` and `-` characters in a mask (example: `face{+0.1}`) added to the grayscale value of any masked areas. This wasn't very useful. The new behavior is that the mask will expand or contract by the number of pixel specified. The technical terms for this are dilation and erosion. This allows much greater control over the masked area.
2022-10-17 23:47:26 -07:00
Bryce
741a433c56
feature: update k_diffusion. add dpm_fast and dpm_addaptive samplers
2022-10-16 22:10:54 -07:00
Bryce
dcf953383e
tests: support distributed test runs
...
- switch to expected images instead of hashes. allow fuzzy matches
feature: more consistent seeds
2022-10-16 20:22:16 -07:00
Bryce
4ba1965db8
feature: k-diff sampler img2img and masking
2022-10-14 03:23:16 -07:00
Bryce
281d23adf2
refactor: prep for supporting img2img in k-samplers
2022-10-13 07:04:37 -07:00
Bryce
e8bb3cf5fd
refactor: consolidate masking logic
2022-10-13 07:04:37 -07:00
Bryce
72026c8c90
refactor: merge img2img and txt2img pipelines
2022-10-13 07:04:37 -07:00
Bryce
a105dadbc4
refactor: combine identical schedules
2022-10-13 07:04:37 -07:00
Bryce
8d4b5cb9e1
refactor: standardize samplers more
2022-10-13 07:04:37 -07:00
Bryce
153c259ee4
fix: k-sampler methods were broken
2022-10-12 20:30:49 -07:00
Bryce
299687645b
refactor: remove unused parameter
2022-10-11 01:06:24 -05:00
Bryce
db5ebe9095
tests: tests can run without any network calls
2022-10-11 01:06:24 -05:00
Bryce
b0123a8f43
refactor: remove unused parameters
2022-10-11 01:06:24 -05:00
Bryce
7ae77faf07
refactor: log indentation via formatter
...
Replace manual indentation with a context-aware logging formatter.
2022-10-10 22:32:39 -05:00
Bryce
df3c752eb8
refactor: consolidate logging utils
2022-10-10 22:32:39 -05:00
Bryce
6a80759016
feature: improved safety filter
...
- provides more informative logs
- provides a detailed safety score object
- adds non-bypassable filter for extreme content
2022-10-10 03:32:19 -05:00
Bryce
0db5c329bb
fix: prompt expansion bug
2022-10-10 03:32:19 -05:00
Bryce Drennan
31c2160e21
feature: prompt expansion ( #51 )
...
You can use `{}` to randomly pull values from lists. A list of values separated by `|` and enclosed in `{ }` will be randomly drawn from in a non-repeating fashion. Values that are surrounded by `_ _` will pull from a phrase list of the same name. Folders containing .txt phraselist files may be specified via
`--prompt_library_path`. The option may be specified multiple times. Built-in categories:
3d-term, adj-architecture, adj-beauty, adj-detailed, adj-emotion, adj-general, adj-horror, animal, art-movement,
art-site, artist, artist-botanical, artist-surreal, aspect-ratio, bird, body-of-water, body-pose, camera-brand,
camera-model, color, cosmic-galaxy, cosmic-nebula, cosmic-star, cosmic-term, dinosaur, eyecolor, f-stop,
fantasy-creature, fantasy-setting, fish, flower, focal-length, food, fruit, games, gen-modifier, hair, hd,
iso-stop, landscape-type, national-park, nationality, neg-weight, noun-beauty, noun-fantasy, noun-general,
noun-horror, occupation, photo-term, pop-culture, pop-location, punk-style, quantity, rpg-item, scenario-desc,
skin-color, spaceship, style, tree-species, trippy, world-heritage-site
Examples:
`imagine "a {red|black} dog" -r 2 --seed 0` will generate both "a red dog" and "a black dog"
`imagine "a {_color_} dog" -r 4 --seed 0` will generate four, different colored dogs. The colors will eb pulled from an included
phraselist of colors.
`imagine "a {_spaceship_|_fruit_|hot air balloon}. low-poly" -r 4 --seed 0` will generate images of spaceships or fruits or a hot air balloon
Credit to [noodle-soup-prompts](https://github.com/WASasquatch/noodle-soup-prompts/ ) where most, but not all, of the wordlists originate.
2022-10-08 18:34:35 -07:00
Bryce
9ba302a5f4
refactor: begin to standardize samplers
2022-10-07 00:02:26 -05:00
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
beba2be6d5
fix: set fidelity default if None is passed in
...
Addresses #48
2022-10-06 19:24:27 -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
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
48117bbcb1
feature: face-fidelity is now configurable
...
remove face-fixing from upscaled version
2022-10-03 16:33:17 -07:00
Bryce
f21c979f08
feature: better masking segmentation from clipseg
2022-09-27 23:35:06 -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
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
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
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
cc014685bd
fix: leave sample in float32 for all final processing
2022-09-22 10:33:35 -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
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
6f77c23c1d
version 1.5.4
...
minor changes to help with google colab compat
2022-09-20 21:15:19 -07:00
Bryce
a46424c673
feature: img2img now supported with PLMS (instead of just DDIM)
...
Kinda hacky copy/pasting from ddim. Need to cleanup
2022-09-20 08:42:00 -07:00
Bryce
4705d182d5
feature: generate captions for images
...
- add wip functionality for negative masks
- ci: add code linter that removes unused imports
- add instructions to install rust on osx
2022-09-19 21:19:22 -07:00
Bryce
f040e3bffe
feature: allow multiple additive targets for text masking targets
2022-09-18 15:24:31 -07:00
Bryce
930295d840
feature: txt2mask - automated text replacement
...
from https://github.com/timojl/clipseg
2022-09-18 06:07:47 -07:00
Bryce
7087c4a680
feature: automatic mask generation
...
mask generation working but not integrated
2022-09-17 17:08:48 -07:00
Bryce
8238e59067
tests: add more tests
2022-09-17 15:49:38 -07:00
Bryce
d7cbf6e416
refactor: cleanup ddim
...
- delete more unused code
- fix some lints
2022-09-17 14:02:27 -07:00
Bryce
6307a0daf5
refactor: cleanup ddim
2022-09-17 12:24:27 -07:00
Bryce
89908603cf
fix: don't repeatedly download the same url
2022-09-16 22:34:42 -07:00
Bryce
59648dbe61
test: add some tests/logging
...
add some experiments
2022-09-16 22:21:38 -07:00
Bryce
19d0b563ac
style: lint fixes. remove unused code
2022-09-16 09:24:24 -07:00
Bryce
c7a822d701
feature: urls as init images
...
- --init-image accepts urls
- cleanup command line code
2022-09-15 23:06:59 -07:00
Bryce
23f0e2be12
fix: select ddim for img2img
2022-09-15 07:55:09 -07:00
wseagar
56fc414724
fix: is_nsfw_img is None rather than false
2022-09-15 20:27:29 +12:00
Bryce
fa3673ef56
fix: use context manager syntax compatible with python 3.8
...
parentheses supported in python 3.10
2022-09-14 21:24:05 -07:00
Bryce
51a8b1b8d8
fix: filter logic was wrong
2022-09-14 20:01:12 -07:00
Bryce
967eb76365
refactor/test: logging suppression + hashed image test
...
- simpler logging suppression for `transformers` library
- suppress logging noise for running tests
- get test running for all samplers on mps and cuda platforms
- refactor safety model env variable to allow classification
2022-09-14 19:40:50 -07:00
Bryce
bb665b9eb6
fix: make k-diffusion samplers deterministic
...
- add test for hashes on mps. images look same on CUDA but are slightly different.
2022-09-14 09:37:45 -07:00
Bryce
b4a3b8c2b3
feature: k-diffusion samplers
...
- improved image logging functionality. can just stick log_latent wherever you want
- improved some variable naming
- moved all the samplers together
- vendored k-diffusion library
2022-09-14 00:40:25 -07:00
Bryce
bb7eaa47f6
docs: small doc updates
2022-09-13 09:12:47 -07:00
Bryce
ff7455034d
docs and lint
2022-09-13 00:46:37 -07:00
Bryce
541ecb9701
feature: face enhancement and upscaling!!
2022-09-13 00:27:53 -07:00
Bryce
14a06e160d
build: vendor clip
...
it's not on pypi
https://github.com/openai/CLIP/issues/141
2022-09-11 22:22:43 -07:00
Bryce
6ac3d40009
docs: update readme. add docs to package
...
Clean up logging some more
2022-09-11 21:36:14 -07:00
Bryce
292d1bcab5
perf: get "half" mode working when running on cuda
2022-09-11 21:32:11 -07:00
Bryce
b9c00dd8de
fix: util functions in wrong place
...
add tile example in readme
2022-09-11 18:20:58 -07:00
Bryce
84a73cb5a2
feature: (wip) better image to image
...
I tried it with the DDIM sampler and it didn't work.
Probably need to use the k-diffusion sampler with it
from a846393251/find_noise.py
needs https://github.com/crowsonkb/k-diffusion
2022-09-11 18:00:40 -07:00
Bryce
438c2868ad
refactor: run import sorter
2022-09-11 13:58:14 -07:00
Bryce
3bdf2dc3ec
feature: tile mode
...
from https://github.com/replicate/cog-stable-diffusion/compare/main...TomMoore515:material_stable_diffusion:main
2022-09-11 13:56:41 -07:00
Bryce
0bb5b6b345
perf: performance optimizations from Doggettx
...
https://github.com/CompVis/stable-diffusion/compare/main...Doggettx:stable-diffusion:autocast-improvements#
https://www.reddit.com/r/StableDiffusion/comments/xalaws/test_update_for_less_memory_usage_and_higher/
2022-09-11 03:08:51 -07:00
Bryce
910b7b4180
refactor: simplify structure
2022-09-11 00:59:03 -07:00
Bryce
f1b1e1c1c8
feature: add nsfw image filter
2022-09-11 00:35:57 -07:00
Bryce
7a33ee2480
feature: cleaned up logging
...
- cleans up all the logging. hide most of it
- create better readme. show example images
- save metadata into image
2022-09-10 23:27:22 -07:00
Bryce
6d1d0622eb
feature: Mac M1 Support out of box
...
- auto-downloads checkpoints
- fixes bug in torch
- autoset environment variable
2022-09-10 00:32:52 -07:00
Bryce
66c640ce7b
feature: add ImageResult. step output option
...
remove verbose args
2022-09-09 22:14:04 -07:00
Bryce
47c6bcee59
refactor: move commands to entrypoints
2022-09-08 22:22:55 -07:00