Diffusers
ConsistencyModelPipeline
generative model
unconditional image generation
consistency-model
Run this model with HF Jobs
Run openai/diffusers-cd_cat256_l2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/openai/diffusers-cd_cat256_l2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/openai/diffusers-cd_cat256_l2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use openai/diffusers-cd_cat256_l2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use openai/diffusers-cd_cat256_l2 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("openai/diffusers-cd_cat256_l2", 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
Commit ·
c5b7f62
1
Parent(s): 62abbec
Update README.md
Browse files2 unmodified lines34567891031 unmodified lines424344454647489 unmodified lines585960616263642 unmodified linestags:- generative model- unconditional image generationduplicated_from: dg845/diffusers-cd_cat256_l2---Consistency models are a new class of generative models introduced in ["Consistency Models"](https://arxiv.org/abs/2303.01469) ([paper](https://arxiv.org/pdf/2303.01469.pdf), [code](https://github.com/openai/consistency_models)) by Yang Song, Prafulla Dhariwal, Mark Chen, and Ilya Sutskever.From the paper abstract:31 unmodified lines```pythonfrom diffusers import ConsistencyModelPipelinepipe = ConsistencyModelPipeline.from_pretrained("dg845/diffusers-cd_cat256_l2")```## Usage9 unmodified linesdevice = "cuda"# Load the cd_cat256_l2 checkpoint.model_id_or_path = "dg845/diffusers-cd_cat256_l2"pipe = ConsistencyModelPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)pipe.to(device)2 unmodified lines34567891011121331 unmodified lines454647484950519 unmodified lines616263646566672 unmodified linestags:- generative model- unconditional image generation- consistency-model---**Disclaimer**: This model was added by the amazing community contributor [dg845](https://huggingface.co/dg845) ❤️Consistency models are a new class of generative models introduced in ["Consistency Models"](https://arxiv.org/abs/2303.01469) ([paper](https://arxiv.org/pdf/2303.01469.pdf), [code](https://github.com/openai/consistency_models)) by Yang Song, Prafulla Dhariwal, Mark Chen, and Ilya Sutskever.From the paper abstract:31 unmodified lines```pythonfrom diffusers import ConsistencyModelPipelinepipe = ConsistencyModelPipeline.from_pretrained("openai/diffusers-cd_cat256_l2")```## Usage9 unmodified linesdevice = "cuda"# Load the cd_cat256_l2 checkpoint.model_id_or_path = "openai/diffusers-cd_cat256_l2"pipe = ConsistencyModelPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)pipe.to(device)
README.md+6-3