Text-to-Image
Diffusers
English
structured-diffusion-guidance
image-generation
Eval Results (legacy)
Instructions to use creative-graphic-design/structure-diffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use creative-graphic-design/structure-diffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("creative-graphic-design/structure-diffusion", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Publish Structure Diffusion pipeline at f15077d69de8
Browse files
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/
|
| 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("
|
| 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("
|
| 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("
|
| 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(
|