()
| 113 | |
| 114 | |
| 115 | def test_sd_1_5(): |
| 116 | from diffusers import StableDiffusionPipeline |
| 117 | import torch |
| 118 | |
| 119 | model_id = "runwayml/stable-diffusion-v1-5" |
| 120 | pipe = StableDiffusionPipeline.from_pretrained(model_id) |
| 121 | vae = pipe.vae.to("cuda") |
| 122 | img = torch.randn(4, 3, 256, 256).to("cuda") |
| 123 | with torch.no_grad(): |
| 124 | latents = vae.encode(img).latent_dist.sample() |
| 125 | print(latents.shape) |
| 126 | |
| 127 | |
| 128 | def test_webdataset_faceshq_sd1_5(): |
nothing calls this directly
no test coverage detected