File size: 1,775 Bytes
5c305b0 | 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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | ---
library_name: lucid
license: creativeml-openrail-m
tags:
- base
- Stable Diffusion
- lucid
datasets:
- LAION-5B
pipeline_tag: feature-extraction
---
# High-Resolution Image Synthesis with Latent Diffusion Models
> https://arxiv.org/abs/2112.10752
[Lucid](https://github.com/ChanLumerico/lucid) port of `https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5`,
converted to Lucid-native safetensors.
## Available weights
| Tag | Params | GFLOPs | Size | Source |
|---|---|---|---|---|
| `CompVis_LAION` *(default)* | — | — | 3598.02 MB | https: |
## Usage
```python
import lucid
import lucid.models as models
from lucid.models.weights import Stable diffusionWeights
# default tag
model = models.stable_diffusion_v1(pretrained=True)
# explicit tag (enum or string)
model = models.stable_diffusion_v1(weights=Stable diffusionWeights.CompVis_LAION)
model = models.stable_diffusion_v1(pretrained="CompVis_LAION")
# feed token ids (tokenize with the matching lucid.utils.tokenizer)
input_ids = lucid.tensor([[101, 7592, 2088, 102]], dtype=lucid.int64)
out = model(input_ids)
hidden = out.last_hidden_state # (B, T, hidden_size)
```
## Conversion
Converted from `https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5` via
`python -m tools.convert_weights Stable Diffusion --tag CompVis_LAION`.
Key mapping + numerical parity verified against the source.
## License
`creativeml-openrail-m` — inherited from the original weights.
## Citation
```
@inproceedings{rombach2022high,
title={High-Resolution Image Synthesis with Latent Diffusion Models},
author={Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj{\"o}rn},
booktitle={CVPR},
pages={10684--10695},
year={2022}
}
```
|