Instructions to use randomani/DDIM-tattoo-32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use randomani/DDIM-tattoo-32 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("randomani/DDIM-tattoo-32", 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
|
Download README.md from randomani/DDIM-tattoo-32: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/randomani/DDIM-tattoo-32/resolve/60158a318e504f01b7fc0007786f6ea79eea9026/README.md
- Command line
-
hf download hf://randomani/DDIM-tattoo-32@60158a318e504f01b7fc0007786f6ea79eea9026/README.md
-
curl -L -o README.md https://huggingface.co/randomani/DDIM-tattoo-32/resolve/60158a318e504f01b7fc0007786f6ea79eea9026/README.md
1.35 kB
| library_name: diffusers | |
| license: apache-2.0 | |
| datasets: | |
| - Drozdik/tattoo_v0 | |
| language: | |
| - en | |
| tags: | |
| - art | |
| ## Model Details | |
| **Abstract**: | |
| *Trained a Unconditional Diffusion Model on tattoo dataset with DDIM noise scheduler * | |
| ## Inference | |
| **DDPM** models can use *discrete noise schedulers* such as: | |
| - [scheduling_ddpm](https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_ddpm.py) | |
| - [scheduling_ddim](https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_ddim.py) | |
| - [scheduling_pndm](https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_pndm.py) | |
| for inference. Note that while the *ddpm* scheduler yields the highest quality, it also takes the longest. | |
| For a good trade-off between quality and inference speed you might want to consider the *ddim* or *pndm* schedulers instead. | |
| See the following code: | |
| ```python | |
| # !pip install diffusers | |
| from diffusers import DDPMPipeline, DDIMPipeline, PNDMPipeline | |
| model_id = "google/DDIM-tattoo-32" | |
| # load model and scheduler | |
| ddpm = DDPMPipeline.from_pretrained(model_id) # you can replace DDPMPipeline with DDIMPipeline or PNDMPipeline for faster inference | |
| # run pipeline in inference (sample random noise and denoise) | |
| image = ddpm().images[0] | |
| # save image | |
| image.save("ddpm_generated_image.png") | |
| ``` |