adamelliotfields commited on
Commit
ba33983
1 Parent(s): b7c0c19

Rename to usage

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +2 -2
  3. info.md → usage.md +47 -37
README.md CHANGED
@@ -46,7 +46,7 @@ Gradio-based Stable Diffusion 1.5 app on ZeroGPU.
46
 
47
  ## Usage
48
 
49
- See [`info.md`](https://huggingface.co/spaces/adamelliotfields/diffusion/blob/main/info.md).
50
 
51
  ## Installation
52
 
 
46
 
47
  ## Usage
48
 
49
+ See [`usage.md`](https://huggingface.co/spaces/adamelliotfields/diffusion/blob/main/usage.md).
50
 
51
  ## Installation
52
 
app.py CHANGED
@@ -218,8 +218,8 @@ with gr.Blocks(
218
  scale=3,
219
  )
220
 
221
- with gr.TabItem("ℹ️ Info"):
222
- gr.Markdown(read_file("info.md"), elem_classes=["markdown"])
223
 
224
  with gr.Group():
225
  output_images = gr.Gallery(
 
218
  scale=3,
219
  )
220
 
221
+ with gr.TabItem("ℹ️ Usage"):
222
+ gr.Markdown(read_file("usage.md"), elem_classes=["markdown"])
223
 
224
  with gr.Group():
225
  output_images = gr.Gallery(
info.md → usage.md RENAMED
@@ -1,47 +1,49 @@
1
  ## Usage
2
 
3
- Enter a prompt and click `Generate`. Read [Civitai](https://civitai.com)'s guide on [prompting](https://education.civitai.com/civitais-prompt-crafting-guide-part-1-basics/) to learn more.
4
 
5
- ### Compel
6
 
7
- Positive and negative prompts are embedded by [Compel](https://github.com/damian0815/compel), enabling weighting and blending. See [syntax features](https://github.com/damian0815/compel/blob/main/doc/syntax.md).
 
 
 
 
8
 
9
- ### Embeddings
10
 
11
- Textual inversion embeddings are installed for use in the `Negative` prompt.
12
 
13
- * [Bad Prompt](https://civitai.com/models/55700/badprompt-negative-embedding): `<bad_prompt>`
14
- * [Negative Hand](https://civitai.com/models/56519/negativehand-negative-embedding): `<negative_hand>`
15
- * [Fast Negative](https://civitai.com/models/71961/fast-negative-embedding-fastnegativev2): `<fast_negative>`
16
- - includes Negative Hand
17
- * [Bad Dream](https://civitai.com/models/72437?modelVersionId=77169): `<bad_dream>`
18
- * [Unrealistic Dream](https://civitai.com/models/72437?modelVersionId=77173): `<unrealistic_dream>`
19
- - pair with Fast Negative and the Realistic Vision model
20
 
21
- ### Arrays
 
 
 
 
22
 
23
- Arrays allow you to generate different images from a single prompt. For example, `a cute [[cat,corgi,koala]]` will expand into 3 prompts. For this to work, you first have to increase `Images`. Note that it only works for the positive prompt. Inspired by [Fooocus](https://github.com/lllyasviel/Fooocus/pull/1503).
24
 
25
- ### Autoincrement
26
 
27
- If `Autoincrement` checked, the seed will be incremented for each image in range `Images`. When using arrays, you might want this disabled so the same seed is used.
28
 
29
- ## Models
30
 
31
- All use `float16` (or `bfloat16` if supported).
32
 
33
- * [fluently/fluently-v4](https://huggingface.co/fluently/Fluently-v4)
34
- * [linaqruf/anything-v3-1](https://huggingface.co/linaqruf/anything-v3-1)
35
- * [lykon/dreamshaper-8](https://huggingface.co/Lykon/dreamshaper-8)
36
- * [prompthero/openjourney-v4](https://huggingface.co/prompthero/openjourney-v4)
37
- * [runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5)
38
- * [sg161222/realistic_vision_v5.1](https://huggingface.co/SG161222/Realistic_Vision_V5.1_noVAE)
39
 
40
- ### Schedulers
41
 
42
- All are based on [k_diffusion](https://github.com/crowsonkb/k-diffusion) except [DEIS](https://github.com/qsh-zh/deis) and [DPM++](https://github.com/LuChengTHU/dpm-solver). Optionally, the [Karras](https://arxiv.org/abs/2206.00364) noise schedule can be used.
43
 
44
- * [DEIS 2M](https://huggingface.co/docs/diffusers/en/api/schedulers/deis)
45
  * [DPM++ 2M](https://huggingface.co/docs/diffusers/en/api/schedulers/multistep_dpm_solver)
46
  * [DPM2 a](https://huggingface.co/docs/diffusers/api/schedulers/dpm_discrete_ancestral)
47
  * [Euler a](https://huggingface.co/docs/diffusers/en/api/schedulers/euler_ancestral)
@@ -49,24 +51,32 @@ All are based on [k_diffusion](https://github.com/crowsonkb/k-diffusion) except
49
  * [LMS](https://huggingface.co/docs/diffusers/api/schedulers/lms_discrete)
50
  * [PNDM](https://huggingface.co/docs/diffusers/api/schedulers/pndm)
51
 
52
- ## Advanced
53
 
54
- ### DeepCache
55
 
56
- [DeepCache](https://github.com/horseee/DeepCache) (Ma et al. 2023) caches UNet layers determined by `Branch` and reuses them every `Interval` steps. Leaving `Branch` on **0** caches lower layers, which provides a greater speedup. An `Interval` of **3** is the best balance between speed and quality; **1** means no cache.
 
 
 
 
57
 
58
- ### T-GATE
59
 
60
- [T-GATE](https://github.com/HaozheLiu-ST/T-GATE) (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. Works well with DeepCache.
61
 
62
- ### Tiny VAE
63
 
64
- Enable [madebyollin/taesd](https://github.com/madebyollin/taesd) for almost instant latent decoding with a minor loss in detail. Useful for development and ideation.
65
 
66
- ### Clip Skip
67
 
68
- When enabled, the last CLIP layer is skipped. This can improve image quality and is commonly used with anime models.
69
 
70
- ### Prompt Truncation
 
 
 
 
71
 
72
  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.
 
1
  ## Usage
2
 
3
+ Enter a prompt and click `Generate`.
4
 
5
+ ### Prompting
6
 
7
+ Positive and negative prompts are embedded by [Compel](https://github.com/damian0815/compel) for weighting. You can use a float or +/-. For example:
8
+ * `man, portrait, blue+ eyes, close-up`
9
+ * `man, portrait, (blue)1.1 eyes, close-up`
10
+ * `man, portrait, (blue eyes)-, close-up`
11
+ * `man, portrait, (blue eyes)0.9, close-up`
12
 
13
+ Note that `++` is `1.1^2` (and so on). See [syntax features](https://github.com/damian0815/compel/blob/main/doc/syntax.md) to learn more and read [Civitai](https://civitai.com)'s guide on [prompting](https://education.civitai.com/civitais-prompt-crafting-guide-part-1-basics/) for best practices.
14
 
15
+ #### Negative Prompt
16
 
17
+ Start with a [textual inversion](https://huggingface.co/docs/diffusers/en/using-diffusers/textual_inversion_inference) embedding:
 
 
 
 
 
 
18
 
19
+ * [`<bad_prompt>`](https://civitai.com/models/55700/badprompt-negative-embedding)
20
+ * [`<negative_hand>`](https://civitai.com/models/56519/negativehand-negative-embedding)
21
+ * [`<fast_negative>`](https://civitai.com/models/71961/fast-negative-embedding-fastnegativev2)
22
+ * [`<bad_dream>`](https://civitai.com/models/72437?modelVersionId=77169)
23
+ * [`<unrealistic_dream>`](https://civitai.com/models/72437?modelVersionId=77173)
24
 
25
+ And iterate from there. You can use weighting in the negative prompt as well.
26
 
27
+ #### Arrays
28
 
29
+ 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](https://github.com/lllyasviel/Fooocus/pull/1503).
30
 
31
+ When using arrays, you should disable `Autoincrement` so the same seed is used for each generation.
32
 
33
+ ### Models
34
 
35
+ * [lykon/dreamshaper-8](https://huggingface.co/Lykon/dreamshaper-8): general purpose (default)
36
+ * [fluently/fluently-v4](https://huggingface.co/fluently/Fluently-v4): general purpose merge
37
+ * [linaqruf/anything-v3-1](https://huggingface.co/linaqruf/anything-v3-1): anime
38
+ * [prompthero/openjourney-v4](https://huggingface.co/prompthero/openjourney-v4): Midjourney-like
39
+ * [runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5): base
40
+ * [sg161222/realistic_vision_v5.1](https://huggingface.co/SG161222/Realistic_Vision_V5.1_noVAE): photorealistic
41
 
42
+ #### Schedulers
43
 
44
+ All are based on [k_diffusion](https://github.com/crowsonkb/k-diffusion) except [DEIS](https://github.com/qsh-zh/deis) and [DPM++](https://github.com/LuChengTHU/dpm-solver). Optionally, the [Karras](https://arxiv.org/abs/2206.00364) noise schedule can be used:
45
 
46
+ * [DEIS 2M](https://huggingface.co/docs/diffusers/en/api/schedulers/deis) (default)
47
  * [DPM++ 2M](https://huggingface.co/docs/diffusers/en/api/schedulers/multistep_dpm_solver)
48
  * [DPM2 a](https://huggingface.co/docs/diffusers/api/schedulers/dpm_discrete_ancestral)
49
  * [Euler a](https://huggingface.co/docs/diffusers/en/api/schedulers/euler_ancestral)
 
51
  * [LMS](https://huggingface.co/docs/diffusers/api/schedulers/lms_discrete)
52
  * [PNDM](https://huggingface.co/docs/diffusers/api/schedulers/pndm)
53
 
54
+ ### Advanced
55
 
56
+ #### DeepCache
57
 
58
+ [DeepCache](https://github.com/horseee/DeepCache) (Ma et al. 2023) caches lower UNet layers and reuses them every `Interval` steps:
59
+ * `1`: no caching
60
+ * `2`: more quality (default)
61
+ * `3`: balanced
62
+ * `4`: more speed
63
 
64
+ #### T-GATE
65
 
66
+ [T-GATE](https://github.com/HaozheLiu-ST/T-GATE) (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. Defaults to `20`.
67
 
68
+ #### ToME
69
 
70
+ [ToMe](https://arxiv.org/abs/2303.17604) (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.
71
 
72
+ #### Tiny VAE
73
 
74
+ Enable [madebyollin/taesd](https://github.com/madebyollin/taesd) for almost instant latent decoding with a minor loss in detail. Useful for development.
75
 
76
+ #### Clip Skip
77
+
78
+ When enabled, the last CLIP layer is skipped. This _can_ improve image quality with anime models.
79
+
80
+ #### Prompt Truncation
81
 
82
  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.