Instructions to use OzzyGT/drama_3_diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OzzyGT/drama_3_diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OzzyGT/drama_3_diffusers", 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
Drama 3 Diffusers
Generated with the code below, seed 2.
Diffusers version of fishaudio/drama-3. Run it with the blocks in OzzyGT/drama_3_custom_blocks. Built with Fish Audio.
Note: You need diffusers>=0.41.0, transformers>=5.3.0 and soundfile.
Licensing
The weights are under the Fish Audio Community License, the same as the original; see also the NOTICE. Among other terms, it does not allow cloning the voice of a real person without their consent or offering speech generation to others as a hosted service, and commercial use is limited to licensees under USD 500,000 annual revenue.
Sample dialogue
It needs about 29 GiB of VRAM and 33 GiB of system RAM; with slots=64, about 21 GiB of VRAM.
import soundfile as sf
import torch
from diffusers import ModularPipelineBlocks
from diffusers.utils import get_class_from_dynamic_module
blocks = ModularPipelineBlocks.from_pretrained("OzzyGT/drama_3_custom_blocks", trust_remote_code=True)
pipe = blocks.init_pipeline()
pipe.load_components(dtype={"default": torch.bfloat16, "audio_decoder": torch.float32, "codec": torch.float32})
enable_moe_cache = get_class_from_dynamic_module(
"OzzyGT/drama_3_custom_blocks", "moe_cache.py", class_name="enable_moe_cache", trust_remote_code=True
)
enable_moe_cache(pipe.backbone, slots=128, device="cuda")
pipe.audio_decoder.to("cuda")
pipe.codec.to("cuda")
prompt = (
"<|speaker:0|> [excited] Guess what? I finally got the tickets! Front row!"
"<|speaker:1|> [deep male voice] [skeptical] Front row. For the concert that sold out in four minutes."
"<|speaker:0|> [laughing] I refreshed the page for an hour, okay? Don't judge me."
"<|speaker:1|> [sighs] Fine, I'm impressed. [pause] But if you make me stand in the rain again..."
"<|speaker:0|> [whisper] It's indoors this time. I checked."
"<|speaker:1|> [laughs] Okay. Okay, I'm in."
)
state = pipe(prompt=prompt, generator=torch.Generator().manual_seed(2))
sf.write("speech.wav", state.get("audio"), state.get("sample_rate"))
To clone a voice, pass a clip as reference_audio and its transcript as reference_text.
- Downloads last month
- -
Model tree for OzzyGT/drama_3_diffusers
Base model
fishaudio/drama-3