Instructions to use DiffErase/DiffErase with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use DiffErase/DiffErase with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("DiffErase/DiffErase", 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
DiffErase checkpoints
Pretrained checkpoints for DiffErase (Audio Pirates: Black-box Audio Watermark Removal via Diffusion Priors).
Download into the root of the GitHub repository; the folder layout matches the code:
git clone https://github.com/DiffErase/DiffErase.git
cd DiffErase
hf download DiffErase/DiffErase --local-dir .
| Domain | Training data | DiffErase-mel | DiffErase-latent |
|---|---|---|---|
speech |
LibriSpeech | DiffErase-mel/models/differase-mel-speech/ |
DiffErase-latent/data/checkpoints/differase-latent-speech.ckpt |
music |
FMA | DiffErase-mel/models/differase-mel-music/ |
DiffErase-latent/data/checkpoints/differase-latent-music.ckpt |
env |
Clotho | DiffErase-mel/models/differase-mel-env/ |
DiffErase-latent/data/checkpoints/differase-latent-env.ckpt |
- DiffErase-mel: unconditional diffusers
UNet2DModel+DDPMScheduleron 80-band mel-spectrograms (22.05 kHz); audio is reconstructed with BigVGAN. - DiffErase-latent: unconditional AudioLDM-style latent diffusion (16 kHz, 64-band mel). Each
.ckptcontains the UNet, its EMA weights and the frozen VAE.vae_mel_16k_64bins.ckptandhifigan_16k_64bins.ckpt/.jsonare the pretrained VAE and HiFi-GAN vocoder from AudioLDM.
Usage:
python remove_differase-mel.py --domain speech \
--watermarked_dir path/to/watermarked_audio --output_dir path/to/erased_audio --noise_level 0.1
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support