File size: 2,136 Bytes
bf035fe | 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 | ---
license: openrail++
pipeline_tag: text-to-image
tags:
- text-to-image
- stable-diffusion
- executorch
- react-native-executorch
---
# Introduction
This repository hosts the [SDXS-512-DreamShaper](https://huggingface.co/IDKiro/sdxs-512-dreamshaper) model for the [React Native ExecuTorch](https://www.npmjs.com/package/react-native-executorch) library. SDXS-512-DreamShaper is a distilled, **single-step** latent diffusion text-to-image model. It is provided as a single multi-method `.pte` program per backend (XNNPACK, Core ML, MLX), ready for use in the **ExecuTorch** runtime.
Use it via the `useTextToImage` hook / `models.textToImage.SDXS_512_DREAMSHAPER` constant. If you'd like to run these models in your own ExecuTorch runtime, refer to the [official documentation](https://pytorch.org/executorch/stable/index.html).
## Compatibility
If you intend to use this model outside of React Native ExecuTorch, make sure your runtime is compatible with the **ExecuTorch** version used to export the `.pte` files. These models were exported for the `v0.10.0` release; **no forward compatibility** is guaranteed. When using React Native ExecuTorch, the library constants guarantee compatibility with the runtime used behind the scenes.
## Pipeline contract
Each backend's `.pte` exports three methods (see the per-backend `config.json` for exact shapes/dtypes):
- `encode` β CLIP text token ids `int64 [1, 77]` β text embeddings `float32 [1, 77, 768]`.
- `denoise` β latents `float32 [1, 4, 64, 64]`, timestep `int64 [1]`, embeddings `float32 [1, 77, 768]` β predicted noise `float32 [1, 4, 64, 64]`.
- `decode` β latents `float32 [1, 4, 64, 64]` β image `float32 [1, 3, 512, 512]` in `[0, 1]`.
The single-step scheduler (linear in the latents and the predicted noise) and CLIP tokenization run on the client.
## Repository structure
- `xnnpack/`, `coreml/`, `mlx/` β one multi-method `.pte` per backend plus a `config.json` declaring its variants and method contract.
- `tokenizer.json`, `tokenizer_config.json` β the CLIP tokenizer, in the repository root.
- `config.json` β top-level model descriptor.
|