Instructions to use Chat-Error/Tiny_random_pixel_art with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Chat-Error/Tiny_random_pixel_art with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Chat-Error/Tiny_random_pixel_art", torch_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 Settings
- Draw Things
- DiffusionBee
| from diffusers import Transformer2DModel | |
| model = Transformer2DModel( | |
| activation_fn="gelu-approximate", | |
| attention_bias=True, | |
| attention_head_dim=64, | |
| attention_type="default", | |
| caption_channels=1024, | |
| cross_attention_dim=768, | |
| double_self_attention=False, | |
| dropout=0.0, | |
| in_channels=4, | |
| norm_elementwise_affine=False, | |
| norm_eps=1e-06, | |
| norm_num_groups=32, | |
| norm_type="ada_norm_single", | |
| num_attention_heads=16, | |
| num_embeds_ada_norm=1000, | |
| num_layers=12, | |
| only_cross_attention=False, | |
| out_channels=8, | |
| patch_size=2, | |
| sample_size=128, | |
| upcast_attention=False, | |
| use_linear_projection=False | |
| ) | |
| save_folder =r'G:\tiny-pixel-art\transformer' | |
| print(model.num_parameters()) | |
| model.save_pretrained(save_folder) | |
| model.save_config(save_folder) | |