Instructions to use google/ncsnpp-ffhq-256 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use google/ncsnpp-ffhq-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("google/ncsnpp-ffhq-256", 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
Image generation very slow
#4
by j35t3r - opened
Befor the model starts to generate, I am getting this warning:
hon3.9/site-packages/diffusers/models/resnet.py:368: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
torch.tensor(kernel, device=hidden_states.device),
/home/user/.conda/envs/lib/python3.9/site-packages/diffusers/models/resnet.py:294: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
My installed packages:
denoising-diffusion-pytorch 1.5.8
ema-pytorch 0.1.4
pytorch-fid 0.3.0
pytorch-lightning 1.8.0
torch 2.0.1
torch-tb-profiler 0.4.1
torchmetrics 0.11.4
torchvision 0.15.2
diffusers 0.16.1