Commit Graph

15 Commits (master)

Author SHA1 Message Date
Bryce 9c48b749d8 feature: script for running imaginairy in the modal.com cloud 2 months ago
Bryce Drennan 601a112dc3
refactor: move download related functions to separate module (#453)
+ renames and typehints
4 months ago
Bryce 9e3403df89 feature: clean up terminal output
- recording timing and memory usage of various steps
- re-use logging context for composition images
- load sdxl weights in a more VRAM efficient way
- switch to diffusers weights for default weights for sd15
5 months ago
Bryce bf14ee6ee6 feature: add christmas-scene phrase list
Also add script that uses chatgpt to generate phrase-lists
5 months ago
Bryce ad561e8833 refactor: move model_manager to utils 5 months ago
Bryce d478771cc0 refactor: move a bunch of stuff to utils 5 months ago
Bryce 9b95e8b0b6 perf: improve cli startup time
- do not provide automatically imported api functions and objects in `imaginairy` root module
- horrible hack to overcome horrible design choices by easy_install/setuptools

The hack modifies the installed script to remove the __import__ pkg_resources line

If we don't do this then the scripts will be slow to start up because of
pkg_resources.require() which is called by setuptools to ensure the
"correct" version of the package is installed.

before modification example:
```
__requires__ = 'imaginAIry==14.0.0b5'
__import__('pkg_resources').require('imaginAIry==14.0.0b5')
__file__ = '/home/user/projects/imaginairy/imaginairy/bin/aimg'
with open(__file__) as f:
    exec(compile(f.read(), __file__, 'exec'))
```
5 months ago
Bryce 558d3388e5 style: speed up linting and autoformatting. fix lints 8 months ago
Bryce 7e62297f73 feature: add simple script to print structure of weight files
useful for debugging
1 year ago
Bryce 37d6642c83 fix: fix model downloads that were broken
by [library change in transformers 4.27.0](8f3b4a1d5b)
1 year ago
Bryce 54c3ad51d6 feature: controlnet 1 year ago
Bryce 003a512dc8 perf: mps perf improvement
attention slicing wasn't working
1 year ago
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
1 year ago
Bryce 1381c7fed4 lint: new ruff linter 1 year ago
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.
2 years ago