Skip to content

Commit

Permalink
upped max_steps in v1-finetune.yaml and fixed TI docs to address invo…
Browse files Browse the repository at this point in the history
  • Loading branch information
lstein committed Sep 11, 2022
1 parent 7708f4f commit 5e43372
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
3 changes: 2 additions & 1 deletion configs/stable-diffusion/v1-finetune.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@ lightning:

trainer:
benchmark: True
max_steps: 4000
max_steps: 4000000
# max_steps: 4000

23 changes: 16 additions & 7 deletions docs/features/TEXTUAL_INVERSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,30 @@ To train, prepare a folder that contains images sized at 512x512 and execute the
--init_word 'cat'
```

During the training process, files will be created in /logs/[project][time][project]/
where you can see the process.
During the training process, files will be created in
/logs/[project][time][project]/ where you can see the process.

Conditioning contains the training prompts
inputs, reconstruction the input images for the training epoch samples, samples scaled for a sample of the prompt and one with the init word provided.
Conditioning contains the training prompts inputs, reconstruction the
input images for the training epoch samples, samples scaled for a
sample of the prompt and one with the init word provided.

On a RTX3090, the process for SD will take ~1h @1.6 iterations/sec.

_Note_: According to the associated paper, the optimal number of images is 3-5. Your model may not converge if you use more images than that.
_Note_: According to the associated paper, the optimal number of
images is 3-5. Your model may not converge if you use more images than
that.

Training will run indefinitely, but you may wish to stop it before the heat death of the universe, when you find a low loss epoch or around ~5000 iterations.
Training will run indefinitely, but you may wish to stop it (with
ctrl-c) before the heat death of the universe, when you find a low
loss epoch or around ~5000 iterations. Note that you can set a fixed
limit on the number of training steps by decreasing the "max_steps"
option in configs/stable_diffusion/v1-finetune.yaml (currently set to
4000000)

**Running**

Once the model is trained, specify the trained .pt or .bin file when starting dream using
Once the model is trained, specify the trained .pt or .bin file when
starting dream using

```
(ldm) ~/stable-diffusion$ python3 ./scripts/dream.py --embedding_path /path/to/embedding.pt --full_precision
Expand Down

0 comments on commit 5e43372

Please sign in to comment.