huggan/few-shot-aurora
Viewer • Updated • 272 • 93 • 2
How to use li-yan/diffusion-aurora-256 with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("li-yan/diffusion-aurora-256", dtype=torch.bfloat16, device_map="cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]Have you ever seen aurora with your own eyes? Check the above picture I got in Alaska in Winter. Beautiful right?
However, aurora is so rare that we can hardly see it even in the very north places like Alaska.
Don't worry. Now we have generative models!!! Here are the pictures generated by this model:
This model generate 256 * 256 pixel pictures of aurora.
It is trained from dataset huggan/few-shot-aurora.
The training method is modified from this example.
You can check my training source code here:
from diffusers import DDPMPipeline
pipeline = DDPMPipeline.from_pretrained('li-yan/diffusion-aurora-256')
image = pipeline().images[0]
image
from diffusers import DiffusionPipeline, DDIMScheduler
scheduler = DDIMScheduler.from_pretrained('li-yan/diffusion-aurora-256')
scheduler.set_timesteps(num_inference_steps=40)
pipeline = DiffusionPipeline.from_pretrained(
'li-yan/diffusion-aurora-256', scheduler=scheduler)
images = pipeline(num_inference_steps=40).images
images[0]