Instructions to use QingyuShi/SparseEdit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use QingyuShi/SparseEdit with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("QingyuShi/SparseEdit", 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 checkpoint-8000/timestep_sampling_config.json from QingyuShi/SparseEdit: direct link, hf CLI and curl.
- Browser
- Download file 310 Bytes
-
https://huggingface.co/QingyuShi/SparseEdit/resolve/main/checkpoint-8000/timestep_sampling_config.json
- Command line
-
hf download hf://QingyuShi/SparseEdit/checkpoint-8000/timestep_sampling_config.json
-
curl -L -o timestep_sampling_config.json https://huggingface.co/QingyuShi/SparseEdit/resolve/main/checkpoint-8000/timestep_sampling_config.json
310 Bytes
| { | |
| "version": 1, | |
| "time_conditioning": "mask_ratio", | |
| "mask_loss_reduction": "sample", | |
| "sampler": { | |
| "distribution": "cosine", | |
| "logit_mean": 0.0, | |
| "logit_std": 1.0, | |
| "shift": 1.0, | |
| "cosine_mix": 0.0, | |
| "low_noise_mix": 0.0, | |
| "low_noise_threshold": 0.3, | |
| "min_mask_ratio": 0.0 | |
| } | |
| } |