Professional Documents
Culture Documents
Another example can be with the prompt chicken:0.75 snake:0.25 mixed animal which
would increase the emphasis on the prompt looking more like a chicken and lesser a
snake.
5. Prompt Modifiers
txt2img:
--prompt - The main and first one that you use to generate images with
--outdir - Specify the folder you wish to have your images saved to
--skip_grid - Saves the output as individual images instead of a grid
--ddim_steps - Specifies the amount of processing steps used. The higher the number
the more times it'll work on rendering it. Higher steps DOES NOT mean a beter
image. Every 50 steps multiplies processing time by 1 (Default: 50)
--plms - Use PLMS sampling
--laion400m - Use the LAION400M model during creation
--n_samples - How many images should be created in one go (Default: 3, 5 for
optimizedSD)
--n_iters - How many times the amount of images under --n_samples should run
--H - Specify the image height, multiples of 64. Warning: Higher values drastically
increase compute and VRAM usage (Default: 512)
--W - Specify the image width, multiples of 64. Warning: Higher values drastically
increase compute and VRAM usage (Default: 512)
--C - Latent channels used (Default: 4)
--scale - How close an image should match the prompt given. Lower numbers stray
further away from the prompt and higher numbers try to be more accurate.
Recommended to stay at default or up to 15-20 (Default: 7.5)
--seed - Seed used during image generation
--precision - [full, autocast]
img2img:
prompt - Description on what you want the new image to be based on
strength - How close the prompt should affect the image (0.0 is basically the input
image, 10.0 is basically ignoring the input image, 5.0 is a middle-ground)
6. Common Errors
If you are running out of memory and you have a sufficient GPU, use --n_samples 1
to render only one image per batch as well as keep the standard 512 width/height.
If you receive any "No module named 'cv2', 'omegaconf', etc. errors, try pip
install opencv-python and if that doesn't work, your installation may have been
messed up you should start over.
If you're running into a lot of errors trying to get Stable Diffusion to work on
your computer, chances are that the environment needs to be cleared out and
recreated in order to start fresh again. First you'll want to type conda activate
into your console to move into the base environment again.
Next, you'll want to type conda info --envs to verify the name of the environment
you have installed.
After verifying the name of the environment, you'll want to type conda remove --
name myenv --all where you replace myenv with the name of the environment you're
uninstalling. Enter yes when prompted to allow it to finish the removal process.
Enter the cd path command, replacing the word path with the path to your Stable
Diffusion folder where environment.yaml is located.
Follow installation instructions again, starting with conda env create -f
environment.yaml.
Author: Kevi