Text-to-Image
Diffusers
TensorBoard
StableDiffusionPipeline
stable-diffusion
stable-diffusion-diffusers
Instructions to use Aminrabi/diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Aminrabi/diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Aminrabi/diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
| # Transformer2D | |
| A Transformer model for image-like data from [CompVis](https://huggingface.co/CompVis) that is based on the [Vision Transformer](https://huggingface.co/papers/2010.11929) introduced by Dosovitskiy et al. The [`Transformer2DModel`] accepts discrete (classes of vector embeddings) or continuous (actual embeddings) inputs. | |
| When the input is **continuous**: | |
| 1. Project the input and reshape it to `(batch_size, sequence_length, feature_dimension)`. | |
| 2. Apply the Transformer blocks in the standard way. | |
| 3. Reshape to image. | |
| When the input is **discrete**: | |
| <Tip> | |
| It is assumed one of the input classes is the masked latent pixel. The predicted classes of the unnoised image don't contain a prediction for the masked pixel because the unnoised image cannot be masked. | |
| </Tip> | |
| 1. Convert input (classes of latent pixels) to embeddings and apply positional embeddings. | |
| 2. Apply the Transformer blocks in the standard way. | |
| 3. Predict classes of unnoised image. | |
| ## Transformer2DModel | |
| [[autodoc]] Transformer2DModel | |
| ## Transformer2DModelOutput | |
| [[autodoc]] models.transformer_2d.Transformer2DModelOutput | |