Instructions to use adams-story/tiny-random-unet2d with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use adams-story/tiny-random-unet2d with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("adams-story/tiny-random-unet2d", 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
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
This is the code used to create this model
import torch
import diffusers
model = diffusers.UNet2DConditionModel(
block_out_channels=(4, 4, 4),
down_block_types=('CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D'),
up_block_types=('CrossAttnUpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D'),
norm_num_groups=2,
cross_attention_dim=2,
layers_per_block=1,
attention_head_dim=2,
addition_embed_type_num_heads=2,
)
# noisy latent
x = torch.randn(7,4,33,33)
# timestep
t = torch.Tensor([1.0])
# conditioning embed
z = torch.randn(7, 4, 2)
# denoised latent
y = model(x, t, z)
- Downloads last month
- 6
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support