diffusion / usage.md
adamelliotfields's picture
Add CLI
5c4e8c1 verified
|
raw
history blame
4.22 kB

Usage

Enter a prompt and click Generate.

Prompting

Positive and negative prompts are embedded by Compel for weighting. You can use a float or +/-. For example:

  • man, portrait, blue+ eyes, close-up
  • man, portrait, (blue)1.1 eyes, close-up
  • man, portrait, (blue eyes)-, close-up
  • man, portrait, (blue eyes)0.9, close-up

Note that ++ is 1.1^2 (and so on). See syntax features to learn more and read Civitai's guide on prompting for best practices.

Negative Prompt

Start with a textual inversion embedding:

And iterate from there. You can use weighting in the negative prompt as well.

Arrays

Arrays allow you to generate different images from a single prompt. For example, man, [[blue,blue+,blue++]] eyes will expand into 3 separate prompts. Make sure Images is set accordingly (e.g., 3). Only works for the positive prompt. Inspired by Fooocus.

When using arrays, you should disable Autoincrement so the same seed is used for each generation.

Models

Schedulers

Optionally, the Karras noise schedule can be used:

Advanced

DeepCache

DeepCache (Ma et al. 2023) caches lower UNet layers and reuses them every Interval steps:

  • 1: no caching
  • 2: more quality (default)
  • 3: balanced
  • 4: more speed

T-GATE

Temporal gating (Zhang et al. 2024) caches self and cross attention computations up to Step. Afterwards, attention is no longer computed and the cache is used, resulting in a noticeable speedup.

ToMe

Token merging (Bolya & Hoffman 2023) reduces the number of tokens processed by the model. Set Ratio to the desired reduction factor. ToMe's impact is more noticeable on larger images.

Tiny VAE

Enable madebyollin/taesd for almost instant latent decoding with a minor loss in detail. Useful for development.

Clip Skip

When enabled, the last CLIP layer is skipped. This can improve image quality with anime models.

Prompt Truncation

When enabled, prompts will be truncated to CLIP's limit of 77 tokens. By default this is disabled, so Compel will chunk prompts into segments rather than cutting them off.