Skip to content

imagine

Generate images via AI.

Can be invoked via either aimg imagine or just imagine.

Usage:

imagine [OPTIONS] [PROMPT_TEXTS]...

Options:

  --negative-prompt TEXT          Negative prompt. Things to try and exclude
                                  from images. Same negative prompt will be
                                  used for all images.
  --prompt-strength FLOAT         How closely to follow the prompt. Image
                                  looks unnatural at higher values  [default:
                                  7.5]
  --init-image PATH|URL           Starting image.
  --init-image-strength FLOAT     Starting image strength. Between 0 and 1.
  --image-prompt PATH|URL         Starting image.
  --image-prompt-strength FLOAT   Starting image strength. Between 0 and 1.
  --outdir PATH                   Where to write results to.  [default:
                                  ./outputs]
  --output-file-extension [jpg|png]
                                  Where to write results to.  [default: jpg]
  -r, --repeats INTEGER           How many times to repeat the renders. If you
                                  provide two prompts and --repeat=3 then six
                                  images will be generated.  [default: 1]
  --size TEXT                     Image size as a string. Can be a named size,
                                  WIDTHxHEIGHT, or single integer. Should be
                                  multiple of 8. Examples: 512x512, 4k, UHD,
                                  8k, 512, 1080p
  --steps INTEGER                 How many diffusion steps to run. More steps,
                                  more detail, but with diminishing returns.
  --seed INTEGER                  What seed to use for randomness. Allows
                                  reproducible image renders.
  --upscale
  --fix-faces
  --fix-faces-fidelity FLOAT      How faithful to the original should face
                                  enhancement be. 1 = best fidelity, 0 = best
                                  looking face.
  --solver, --sampler [ddim|dpmpp]
                                  Solver algorithm to generate the image with.
                                  (AKA 'Sampler' or 'Scheduler' in other
                                  libraries.  [default: ddim]
  --log-level [DEBUG|INFO|WARNING|ERROR]
                                  What level of logs to show.  [default: INFO]
  -q, --quiet                     Suppress logs. Alias of `--log-level ERROR`.
  --show-work                     Output a debug images to `steps` folder.
  --tile                          Any images rendered will be tileable in both
                                  X and Y directions.
  --tile-x                        Any images rendered will be tileable in the
                                  X direction.
  --tile-y                        Any images rendered will be tileable in the
                                  Y direction.
  --allow-compose-phase / --no-compose-phase
                                  Allow the image to be composed at a lower
                                  resolution.
  --mask-image PATH|URL           A mask to use for inpainting. White gets
                                  painted, Black is left alone.
  --mask-prompt TEXT              Describe what you want masked and the AI
                                  will mask it for you. You can describe
                                  complex masks with AND, OR, NOT keywords and
                                  parentheses. The strength of each mask can
                                  be modified with {*1.5} notation.

                                  Examples:   car AND (wheels{*1.1} OR trunk
                                  OR engine OR windows OR headlights) AND NOT
                                  (truck OR headlights){*10} fruit|fruit stem
  --mask-mode [keep|replace]      Should we replace the masked area or keep
                                  it?  [default: replace]
  --mask-modify-original          After the inpainting is done, apply the
                                  changes to a copy of the original image.
  --outpaint TEXT                 Specify in what directions to expand the
                                  image. Values will be snapped such that
                                  output image size is multiples of 8.
                                  Examples `--outpaint
                                  up10,down300,left50,right50` `--outpaint
                                  u10,d300,l50,r50` `--outpaint all200`
                                  `--outpaint a200`
  --caption                       Generate a text description of the generated
                                  image.
  --precision [full|autocast]     Evaluate at this precision.  [default:
                                  autocast]
  --model-weights-path, --model TEXT
                                  Model to use. Should be one of flux,
                                  miniaturuspotentia, miniaturuspotentia12,
                                  modern-disney, modern-disney-15, modi,
                                  modi15, mp, mp12, od, odv11, oj, oj1, oj2,
                                  oj4, ojv1, ojv2, ojv4, opendalle,
                                  opendalle11, openjourney, openjourney-v1,
                                  openjourney-v2, openjourney-v4,
                                  openjourney1, openjourney2, openjourney4,
                                  potentia, potentia12, sd-1.5,
                                  sd-1.5-inpaint, sd-15, sd-15-inpaint, sd-xl,
                                  sd-xlinpaint, sd1.5, sd1.5-inpaint,
                                  sd1.5inpaint, sd15, sd15-inpaint,
                                  sd15inpaint, sdxl, sdxl-inpaint,
                                  sdxlinpaint, or a path to custom weights.
                                  [default: sd15]
  --model-architecture TEXT       Model architecture. When specifying custom
                                  weights the model architecture must be
                                  specified. (sd15, sdxl, etc).
  --prompt-library-path PATH      Path to folder containing phrase lists in
                                  txt files. Use txt filename in prompt:
                                  {_filename_}.
  --version                       Print the version and exit.
  --gif                           Create a gif of the generation.
  --compare-gif                   Create a gif comparing the original image to
                                  the modified one.
  --arg-schedule TEXT             Schedule how an argument should change over
                                  several generations. Format: `--arg-schedule
                                  arg_name[start:end:increment]` or `--arg-
                                  schedule arg_name[val,val2,val3]`
  --compilation-anim [gif|mp4]    Generate an animation composed of all the
                                  images generated in this run.  Defaults to
                                  gif but `--compilation-anim mp4` will
                                  generate an mp4 instead.
  --caption-text TEXT             Specify the text to write onto the image.
  --composition-strength FLOAT    Strength of the composition phase.
  --control-image PATH|URL        Image used for control signal in image
                                  generation. For example if control-mode is
                                  depth, then the generated image will match
                                  the depth map extracted from the control
                                  image. Defaults to the `--init-image`
  --control-image-raw PATH|URL    Preprocessed image used for control signal
                                  in image generation. Like `--control-image`
                                  but  expects the already extracted signal.
                                  For example the raw control image would be a
                                  depth map orpose information.
  --control-strength TEXT         Strength of the control signal.
  --control-mode [|canny|depth|details|normal|hed|openpose|shuffle|edit|inpaint|colorize|qrcode|densepose]
                                  how the control image is used as signal
  --videogen                      Turns the generated photo into video
  --help                          Show this message and exit.