diff --git a/README.md b/README.md index a1a1c78..6eee920 100644 --- a/README.md +++ b/README.md @@ -61,12 +61,12 @@ with prompt-based masking.

-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 ->> aimg edit --gif --suprise-me pearl_girl.jpg ->> aimg edit --gif --suprise-me mona-lisa.jpg ->> aimg edit --gif --suprise-me luke.jpg ->> aimg edit --gif --suprise-me spock.jpg +>> aimg edit --gif --surprise-me pearl_girl.jpg +>> aimg edit --gif --surprise-me mona-lisa.jpg +>> aimg edit --gif --surprise-me luke.jpg +>> aimg edit --gif --surprise-me spock.jpg ```

@@ -286,7 +286,7 @@ docker run -it --gpus all -v $HOME/.cache/huggingface:/root/.cache/huggingface - **8.0.0** - feature: 🎉 edit images with instructions alone! - 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 **7.6.0** diff --git a/imaginairy/cmds.py b/imaginairy/cmds.py index 1c6ebf1..c39ea83 100644 --- a/imaginairy/cmds.py +++ b/imaginairy/cmds.py @@ -11,7 +11,7 @@ from imaginairy.enhancers.prompt_expansion import expand_prompts from imaginairy.log_utils import configure_logging from imaginairy.samplers import SAMPLER_TYPE_OPTIONS 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.training_tools.image_prep import ( create_class_images, @@ -501,8 +501,8 @@ def imagine_cmd( help="Generate a gif comparing the original image to the modified one.", ) @click.option( - "--suprise-me", - "suprise_me", + "--surprise-me", + "surprise_me", default=False, is_flag=True, help="make some fun edits to the provided image", @@ -542,17 +542,17 @@ def edit_image( # noqa prompt_library_path, version, # noqa make_gif, - suprise_me, + surprise_me, ): init_image_strength = 1 - if suprise_me and prompt_texts: - raise ValueError("Cannot use suprise_me and prompt_texts together") + if surprise_me and prompt_texts: + raise ValueError("Cannot use surprise_me and prompt_texts together") - if suprise_me: + if surprise_me: if quiet: log_level = "ERROR" 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 diff --git a/imaginairy/suprise_me.py b/imaginairy/surprise_me.py similarity index 93% rename from imaginairy/suprise_me.py rename to imaginairy/surprise_me.py index 4ccf476..c6bc7cb 100644 --- a/imaginairy/suprise_me.py +++ b/imaginairy/surprise_me.py @@ -51,7 +51,7 @@ person_prompts = [ ] -def suprise_me_prompts(img, person=None): +def surprise_me_prompts(img, person=None): prompts = [] if isinstance(img, str): if img.startswith("http"): @@ -90,13 +90,13 @@ def suprise_me_prompts(img, person=None): 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 img.startswith("http"): img = LazyLoadingImage(url=img) else: img = LazyLoadingImage(filepath=img) - prompts = suprise_me_prompts(img, person=person) + prompts = surprise_me_prompts(img, person=person) generated_filenames = imagine_image_files( prompts, 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") os.makedirs(imgs_path, exist_ok=True) 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) gif_imgs = [simg] for prompt, filename in zip(prompts, generated_filenames):