[hotfix] fix stable diffusion inference bug. (#5289)

* Update train_ddp.yaml

delete  "strategy" to fix DDP config loading bug in "main.py"

* Update train_ddp.yaml

fix inference with scripts/txt2img.py config file load bug.

* Update README.md

add pretrain model test code.
pull/5429/head
Youngon 2024-03-05 22:03:40 +08:00 committed by GitHub
parent c8003d463b
commit 68f55a709c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -202,6 +202,8 @@ python main.py --logdir /tmp/ -t -b configs/Teyvat/train_colossalai_teyvat.yaml
```
## Inference
if you want to test with pretrain model,as bellow:
python scripts/txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms --outdir ./output --ckpt 512-base-ema.ckpt --config configs/train_ddp.yaml
You can get your training last.ckpt and train config.yaml in your `--logdir`, and run by
```

View File

@ -1,5 +1,6 @@
model:
base_learning_rate: 1.0e-4
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
parameterization: "v"
linear_start: 0.00085
@ -86,8 +87,6 @@ lightning:
max_epochs: 2
precision: 16
auto_select_gpus: False
strategy:
find_unused_parameters: False
log_every_n_steps: 2
# max_steps: 6o
logger: True