mirror of
https://github.com/brycedrennan/imaginAIry
synced 2024-11-05 12:00:15 +00:00
fix: spelling typo
leave references to misspelled files- don't want to break any existing links
This commit is contained in:
parent
00408d176f
commit
2571097087
12
README.md
12
README.md
@ -61,12 +61,12 @@ with prompt-based masking.
|
|||||||
<img src="assets/bowl_of_fruit_strawberries.jpg" height="256"><img src="assets/freckled_woman_cyborg.jpg" height="256"><br>
|
<img src="assets/bowl_of_fruit_strawberries.jpg" height="256"><img src="assets/freckled_woman_cyborg.jpg" height="256"><br>
|
||||||
<img src="assets/girl_with_a_pearl_earring_clown_makeup.jpg" height="256"><img src="assets/mona-lisa-headshot-photo.jpg" height="256"><br>
|
<img src="assets/girl_with_a_pearl_earring_clown_makeup.jpg" height="256"><img src="assets/mona-lisa-headshot-photo.jpg" height="256"><br>
|
||||||
|
|
||||||
Want just quickly have some fun? Try `--suprise-me` to apply some pre-defined edits.
|
Want just quickly have some fun? Try `--surprise-me` to apply some pre-defined edits.
|
||||||
```bash
|
```bash
|
||||||
>> aimg edit --gif --suprise-me pearl_girl.jpg
|
>> aimg edit --gif --surprise-me pearl_girl.jpg
|
||||||
>> aimg edit --gif --suprise-me mona-lisa.jpg
|
>> aimg edit --gif --surprise-me mona-lisa.jpg
|
||||||
>> aimg edit --gif --suprise-me luke.jpg
|
>> aimg edit --gif --surprise-me luke.jpg
|
||||||
>> aimg edit --gif --suprise-me spock.jpg
|
>> aimg edit --gif --surprise-me spock.jpg
|
||||||
```
|
```
|
||||||
<img src="assets/girl_with_a_pearl_earring_suprise.gif" height="256"><img src="assets/mona-lisa-suprise.gif" height="256"><br>
|
<img src="assets/girl_with_a_pearl_earring_suprise.gif" height="256"><img src="assets/mona-lisa-suprise.gif" height="256"><br>
|
||||||
<img src="assets/luke-suprise.gif" height="256"><img src="assets/spock-suprise.gif" height="256"><br>
|
<img src="assets/luke-suprise.gif" height="256"><img src="assets/spock-suprise.gif" height="256"><br>
|
||||||
@ -286,7 +286,7 @@ docker run -it --gpus all -v $HOME/.cache/huggingface:/root/.cache/huggingface -
|
|||||||
**8.0.0**
|
**8.0.0**
|
||||||
- feature: 🎉 edit images with instructions alone!
|
- feature: 🎉 edit images with instructions alone!
|
||||||
- feature: when editing an image add `--gif` to create a comparision gif
|
- feature: when editing an image add `--gif` to create a comparision gif
|
||||||
- feature: `aimg edit --suprise-me --gif my-image.jpg` for some fun pre-programmed edits
|
- feature: `aimg edit --surprise-me --gif my-image.jpg` for some fun pre-programmed edits
|
||||||
- feature: prune-ckpt command also removes the non-ema weights
|
- feature: prune-ckpt command also removes the non-ema weights
|
||||||
|
|
||||||
**7.6.0**
|
**7.6.0**
|
||||||
|
@ -11,7 +11,7 @@ from imaginairy.enhancers.prompt_expansion import expand_prompts
|
|||||||
from imaginairy.log_utils import configure_logging
|
from imaginairy.log_utils import configure_logging
|
||||||
from imaginairy.samplers import SAMPLER_TYPE_OPTIONS
|
from imaginairy.samplers import SAMPLER_TYPE_OPTIONS
|
||||||
from imaginairy.schema import ImaginePrompt
|
from imaginairy.schema import ImaginePrompt
|
||||||
from imaginairy.suprise_me import create_suprise_me_images
|
from imaginairy.surprise_me import create_surprise_me_images
|
||||||
from imaginairy.train import train_diffusion_model
|
from imaginairy.train import train_diffusion_model
|
||||||
from imaginairy.training_tools.image_prep import (
|
from imaginairy.training_tools.image_prep import (
|
||||||
create_class_images,
|
create_class_images,
|
||||||
@ -501,8 +501,8 @@ def imagine_cmd(
|
|||||||
help="Generate a gif comparing the original image to the modified one.",
|
help="Generate a gif comparing the original image to the modified one.",
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--suprise-me",
|
"--surprise-me",
|
||||||
"suprise_me",
|
"surprise_me",
|
||||||
default=False,
|
default=False,
|
||||||
is_flag=True,
|
is_flag=True,
|
||||||
help="make some fun edits to the provided image",
|
help="make some fun edits to the provided image",
|
||||||
@ -542,17 +542,17 @@ def edit_image( # noqa
|
|||||||
prompt_library_path,
|
prompt_library_path,
|
||||||
version, # noqa
|
version, # noqa
|
||||||
make_gif,
|
make_gif,
|
||||||
suprise_me,
|
surprise_me,
|
||||||
):
|
):
|
||||||
init_image_strength = 1
|
init_image_strength = 1
|
||||||
if suprise_me and prompt_texts:
|
if surprise_me and prompt_texts:
|
||||||
raise ValueError("Cannot use suprise_me and prompt_texts together")
|
raise ValueError("Cannot use surprise_me and prompt_texts together")
|
||||||
|
|
||||||
if suprise_me:
|
if surprise_me:
|
||||||
if quiet:
|
if quiet:
|
||||||
log_level = "ERROR"
|
log_level = "ERROR"
|
||||||
configure_logging(log_level)
|
configure_logging(log_level)
|
||||||
create_suprise_me_images(init_image, outdir=outdir, make_gif=make_gif)
|
create_surprise_me_images(init_image, outdir=outdir, make_gif=make_gif)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ person_prompts = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def suprise_me_prompts(img, person=None):
|
def surprise_me_prompts(img, person=None):
|
||||||
prompts = []
|
prompts = []
|
||||||
if isinstance(img, str):
|
if isinstance(img, str):
|
||||||
if img.startswith("http"):
|
if img.startswith("http"):
|
||||||
@ -90,13 +90,13 @@ def suprise_me_prompts(img, person=None):
|
|||||||
return prompts
|
return prompts
|
||||||
|
|
||||||
|
|
||||||
def create_suprise_me_images(img, outdir, person=None, make_gif=True):
|
def create_surprise_me_images(img, outdir, person=None, make_gif=True):
|
||||||
if isinstance(img, str):
|
if isinstance(img, str):
|
||||||
if img.startswith("http"):
|
if img.startswith("http"):
|
||||||
img = LazyLoadingImage(url=img)
|
img = LazyLoadingImage(url=img)
|
||||||
else:
|
else:
|
||||||
img = LazyLoadingImage(filepath=img)
|
img = LazyLoadingImage(filepath=img)
|
||||||
prompts = suprise_me_prompts(img, person=person)
|
prompts = surprise_me_prompts(img, person=person)
|
||||||
generated_filenames = imagine_image_files(
|
generated_filenames = imagine_image_files(
|
||||||
prompts,
|
prompts,
|
||||||
outdir=outdir,
|
outdir=outdir,
|
||||||
@ -109,7 +109,7 @@ def create_suprise_me_images(img, outdir, person=None, make_gif=True):
|
|||||||
imgs_path = os.path.join(outdir, "compilations")
|
imgs_path = os.path.join(outdir, "compilations")
|
||||||
os.makedirs(imgs_path, exist_ok=True)
|
os.makedirs(imgs_path, exist_ok=True)
|
||||||
base_count = len(os.listdir(imgs_path))
|
base_count = len(os.listdir(imgs_path))
|
||||||
new_filename = os.path.join(imgs_path, f"suprise_me_{base_count:03d}.gif")
|
new_filename = os.path.join(imgs_path, f"surprise_me_{base_count:03d}.gif")
|
||||||
simg = pillow_fit_image_within(img, prompts[0].width, prompts[0].height)
|
simg = pillow_fit_image_within(img, prompts[0].width, prompts[0].height)
|
||||||
gif_imgs = [simg]
|
gif_imgs = [simg]
|
||||||
for prompt, filename in zip(prompts, generated_filenames):
|
for prompt, filename in zip(prompts, generated_filenames):
|
Loading…
Reference in New Issue
Block a user