File size: 845 Bytes
6a2a97f 11b35f8 64858ca e3c0259 64858ca d440428 64858ca 9c49033 64858ca 11b35f8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
---
datasets:
- eurecom-ds/multi_dsprites
library_name: diffusers
pipeline_tag: unconditional-image-generation
---
```python
# !pip install diffusers
from diffusers import DiffusionPipeline
import torch
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model_id = "eurecom-ds/scoresdeve-ema-multi-dsprites-64"
# load model and scheduler
pipe = DiffusionPipeline.from_pretrained(model_id, trust_remote_code=True)
pipe.to(device)
# run pipeline in inference (sample random noise and denoise)
generator = torch.Generator(device=device).manual_seed(46)
image = pipe(
generator=generator,
batch_size=1,
num_inference_steps=1000
).images
# save image
image[0].save("sde_ve_generated_image.png")
```

|