shunk031 commited on
Commit
28b5edb
·
verified ·
1 Parent(s): 406d73c

Publish Structure Diffusion pipeline at f15077d69de8

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -94,7 +94,7 @@ Inspect generated images before downstream use, and record the checkpoint revisi
94
  Install the package from this repository archive and download the English parser models before the first inference:
95
 
96
  ```bash
97
- pip install "structure-diffusion @ https://github.com/creative-graphic-design/design-generators/archive/c2b5a63ce2c2e0247925f621a0787f71f36f78d0.zip#subdirectory=models/structure-diffusion"
98
  python -c "import stanza; stanza.download('en', processors='tokenize,pos,constituency')"
99
  ```
100
 
@@ -116,7 +116,7 @@ pipe = DiffusionPipeline.from_pretrained(
116
  token=token,
117
  trust_remote_code=True,
118
  )
119
- pipe.to("cpu")
120
  result = pipe(
121
  "A red car and a white sheep",
122
  parser_type="constituency",
@@ -210,7 +210,7 @@ baseline = StableDiffusionPipeline.from_pretrained(
210
  torch_dtype=torch.float32,
211
  token=token,
212
  )
213
- baseline.to("cpu")
214
  for slug, prompt in EXAMPLES:
215
  for seed in SEEDS:
216
  image = baseline(
@@ -231,7 +231,7 @@ structured = StructureDiffusionPipeline.from_pretrained(
231
  torch_dtype=torch.float32,
232
  token=token,
233
  )
234
- structured.to("cpu")
235
  for slug, prompt in EXAMPLES:
236
  for seed in SEEDS:
237
  image = structured(
 
94
  Install the package from this repository archive and download the English parser models before the first inference:
95
 
96
  ```bash
97
+ pip install "structure-diffusion @ https://github.com/creative-graphic-design/design-generators/archive/f15077d69de8442d7e7021979895bdee751159f3.zip#subdirectory=models/structure-diffusion"
98
  python -c "import stanza; stanza.download('en', processors='tokenize,pos,constituency')"
99
  ```
100
 
 
116
  token=token,
117
  trust_remote_code=True,
118
  )
119
+ pipe.to("cuda")
120
  result = pipe(
121
  "A red car and a white sheep",
122
  parser_type="constituency",
 
210
  torch_dtype=torch.float32,
211
  token=token,
212
  )
213
+ baseline.to("cuda")
214
  for slug, prompt in EXAMPLES:
215
  for seed in SEEDS:
216
  image = baseline(
 
231
  torch_dtype=torch.float32,
232
  token=token,
233
  )
234
+ structured.to("cuda")
235
  for slug, prompt in EXAMPLES:
236
  for seed in SEEDS:
237
  image = structured(