--- 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.