Comments (12)
Try https://github.com/JonathanFly/bark with --use_smaller_models
should fit even in 6GB.
from bark.
added another simple option using the env var SUNO_USE_SMALL_MODELS=True
to get smaller models that will prob fit on an 8gb card. Qw haven't implemented quantization yet. As for requirements would love it if people confirm who have the relevant cards (since it also depends on eg bf16 support etc) but i believe the small models work on an 8gb card and the large models work on a 12gb card.
from bark.
added another simple option using the env var
SUNO_USE_SMALL_MODELS=True
to get smaller models that will prob fit on an 8gb card. Qw haven't implemented quantization yet. As for requirements would love it if people confirm who have the relevant cards (since it also depends on eg bf16 support etc) but i believe the small models work on an 8gb card and the large models work on a 12gb card.
Thanks setting this environment variable worked for me!
Steps I took:
On Windows:
set SUNO_USE_SMALL_MODELS=True
jupyter lab
from bark.
What are the memory / VRAM requirements? And is quantization possible?
It would be great if a table with memory requirements could be added to the Readme and/or Docs.
from bark.
added another simple option using the env var
SUNO_USE_SMALL_MODELS=True
to get smaller models that will prob fit on an 8gb card. Qw haven't implemented quantization yet. As for requirements would love it if people confirm who have the relevant cards (since it also depends on eg bf16 support etc) but i believe the small models work on an 8gb card and the large models work on a 12gb card.
where and how do I add? SUNO_USE_SMALL_MODELS=True
from bark.
still getting the error
from bark import SAMPLE_RATE, generate_audio, preload_models
from IPython.display import Audio
import os
preload_models(use_gpu=False)
os.environ['SUNO_USE_SMALL_MODELS'] = 'True'
text_prompt = """
Hello.
"""
audio_array = generate_audio(text_prompt)
Audio(audio_array, rate=SAMPLE_RATE)
CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 4.00 GiB total capacity; 3.46 GiB already allocated; 0 bytes free; 3.47 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
File "C:\Users\smast\OneDrive\Desktop\Code Projects\Johnny Five\audio test.py", line 12, in <module>
audio_array = generate_audio(text_prompt)
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 4.00 GiB total capacity; 3.46 GiB already allocated; 0 bytes free; 3.47 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
from bark.
you have to set the environment variable before the model load. but also you can now more easily specify the model size in the preload function, see also here: #51
from bark.
but also you can now more easily specify the model size in the preload function, see also here: #51
No, you can't. It's bugged. The model size you specify in the preload function isn't respected. generate_audio
will reload the large models when you call it. I couldn't get out why I was getting CUDA out of memory errors when I specified small and CPU for all the models and CUDA usage should have been zero. lol.
from bark.
oh yikes sorry, lemme check. feel free to also PR if you find the bug
from bark.
works fine for me on a quick test, can anyone else confirm its borked?
from bark.
works fine for me on a quick test, can anyone else confirm it's borked?
The bug was in this line:
model_key = str(device) + f"__{model_type}"
It has since been fixed.
from bark.
Ah ok great ya just made some fixes there
from bark.
Related Issues (20)
- Languages pt_speaker should be changed to br_speaker as it is not correct.
- BUG slow
- BUG no GPU RAM clean after restart api oobadooga
- How to save long form audio .wav file.
- AttributeError: module 'torch' has no attribute 'compiler' HOT 4
- Inference speed HOT 1
- Does it support streaming process?
- max num tokens supported on inference is ~ 40 max. not 256 as it would appear by reading code. HOT 2
- Bulgarian as supported language
- Timestamp audio generated
- Trying to run with half precision gives error "RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'" HOT 1
- Add support and instructions for direct IPA texts.
- Fine tuned prompting.
- Chirp link
- attention mask and the pad token id were not set warning HOT 1
- Get deterministic output (same seed)
- GPU AMD
- Batch processing for long form generation
- ModuleNotFoundError while trying to load entry-point bdist_wheel: No module named '_ctypes'
- ImportError: cannot import name 'AutoProcessor' from partially initialized module 'transformers' (most likely due to a circular import) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bark.