Instructions to use sesame/csm-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sesame/csm-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="sesame/csm-1b")# Load model directly from transformers import AutoProcessor, AutoModelForTextToWaveform processor = AutoProcessor.from_pretrained("sesame/csm-1b") model = AutoModelForTextToWaveform.from_pretrained("sesame/csm-1b") - Notebooks
- Google Colab
- Kaggle
Python Import Error: Name tf.RaggedTensorSpec has already been registered
#57
by weightsnweights - opened
Getting this error when trying import:
ValueError Traceback (most recent call last)
/tmp/ipython-input-2169402732.py in <cell line: 0>()
----> 1 from transformers import CsmForConditionalGeneration, AutoProcessor
2 import torch
3 import soundfile as sf
28 frames
/usr/local/lib/python3.12/dist-packages/tensorflow/python/framework/type_spec_registry.py in decorator_fn(cls)
57 (cls.__module__, cls.__name__, _TYPE_SPEC_TO_NAME[cls]))
58 if name in _NAME_TO_TYPE_SPEC:
---> 59 raise ValueError("Name %s has already been registered for class %s.%s." %
60 (name, _NAME_TO_TYPE_SPEC[name].__module__,
61 _NAME_TO_TYPE_SPEC[name].__name__))
ValueError: Name tf.RaggedTensorSpec has already been registered for class tensorflow.python.ops.ragged.ragged_tensor.RaggedTensorSpec.```