File size: 622 Bytes
a53c3fa
 
 
 
 
 
 
 
9c31218
a53c3fa
9c31218
 
 
a53c3fa
9c31218
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
library_name: diffusers
tags:
- text-to-image
---

```python
from diffusers import DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained("hf-internal-testing/tiny-sdxl-custom-components", trust_remote_code=True)

assert pipeline.config.unet == ('diffusers_modules.local.my_unet_model', 'MyUNetModel')
assert pipeline.config.scheduler == ('diffusers_modules.local.my_scheduler', 'MyScheduler')
assert pipeline.__class__.__name__ == "StableDiffusionXLPipeline"

pipeline = pipeline.to(torch_device)
images = pipeline("test", num_inference_steps=2, output_type="np")[0]

assert images.shape == (1, 64, 64, 3)
```