wx44wx commited on
Commit
c844e7c
1 Parent(s): 590eb27

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -25
README.md CHANGED
@@ -33,31 +33,13 @@ trained using this [script](https://github.com/LambdaLabsML/examples/tree/main/s
33
  ```
34
 
35
  ```python
36
- import torch
37
- from diffusers import StableDiffusionPipeline
38
- from torch import autocast
39
-
40
- pipe = StableDiffusionPipeline.from_pretrained("wx44wx/sd-three-kingdoms-diffusers", torch_dtype=torch.float16)
41
- pipe = pipe.to("cuda")
42
-
43
- prompt = "a man in armor"
44
- scale = 3
45
- n_samples = 4
46
-
47
- # Sometimes the nsfw checker is confused by the Pokémon images, you can disable
48
- # it at your own risk here
49
- disable_safety = False
50
-
51
- if disable_safety:
52
- def null_safety(images, **kwargs):
53
- return images, False
54
- pipe.safety_checker = null_safety
55
-
56
- with autocast("cuda"):
57
- images = pipe(n_samples*[prompt], guidance_scale=scale).images
58
-
59
- for idx, im in enumerate(images):
60
- im.save(f"{idx:06}.png")
61
  ```
62
 
63
  ## Model description
 
33
  ```
34
 
35
  ```python
36
+ python scripts/txt2img.py \
37
+ --prompt 'a man in armor' \
38
+ --outdir 'outputs/generated_three_kingdoms_officers' \
39
+ --H 512 --W 512 \
40
+ --n_samples 4 \
41
+ --config 'configs/stable-diffusion/three_kingdoms.yaml' \
42
+ --ckpt ema-only-epoch=000144.ckpt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  ```
44
 
45
  ## Model description