You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Pipeline.from_pretrained() got an unexpected keyword argument token #24
Disclaimer: I got out of my depth pretty quickly with this one, and I'm not a coder at all. I used AI assistance to help me isolate the issue, so please take my analysis with a grain of salt. Happy to be corrected!
I ran into an issue with speaker diarization. Transcription works fine, but as soon as diarization kicks in, the job fails with this error:
TypeError: Pipeline.from_pretrained() got an unexpected keyword argument 'token'
Full traceback from the logs:
ERROR Job failed | ts=2026-05-14T11:07:56.642051+00:00 logger=amicoscript.worker job_id=79dbceb0-ee46-44e8-b5d5-131921ad781e traceback=Traceback (most recent call last):
File "/app/backend/core/transcription.py", line 406, in _process_job
speakers = _run_diarization_phase(job_id, segments_list, job)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/core/diarization.py", line 60, in _run_diarization_phase
pipeline = _Pipeline.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Pipeline.from_pretrained() got an unexpected keyword argument 'token'
ERROR error: Pipeline.from_pretrained() got an unexpected keyword argument 'token' | ts=2026-05-14T11:07:56.642472+00:00 logger=amicoscript.worker job_id=79dbceb0-ee46-44e8-b5d5-131921ad781e
My setup
Self-hosted via Docker (cloned from main, built locally)
After digging deeper, the real problem is a dependency conflict: pyannote.audio 3.4.0 calls hf_hub_download() internally with use_auth_token=, but huggingface_hub 1.14.0 (which your requirements.txt pulls in) has dropped that argument entirely. The two deps are incompatible with each other.
No workaround seems to stick. Swapping argument names just moves the error around. Needs a fix on the dependency side.
Thanks a lot for the precise reporting @Tiritibambix . Will take soon a look. In general how felt so far the experience with the software? Not considering of course the diarization issue?
For what it's worth, I managed to get diarization working by manually forcing these versions and changing one line:
pyannote.audio == 3.4.0
huggingface_hub == 0.24.7
torch == 2.5.1
torchaudio == 2.5.1
diarization.py line 62: use_auth_token= instead of token=
As for the overall experience, honestly, I love it. I take remote classes, I record the videos, and being able to search directly through the transcripts saves me an incredible amount of time. It's exactly the kind of tool I was looking for. Thanks so much for building it, and I hope sorting out the dependency mess won't be too painful!
Hey, diarization is still broken out of the box. After a clean clone + docker-compose build --no-cache, I get a chain of errors that only go away by manually forcing specific versions inside the running container.
The errors come in sequence:
hf_hub_download() got an unexpected keyword argument 'use_auth_token' — huggingface_hub latest drops that argument, so pyannote fails internally
Weights only load failed / TorchVersion was not an allowed global — PyTorch 2.6 changed the default of torch.load(weights_only=...) and the pyannote checkpoints aren't compatible with it
The combination that actually works for me:
huggingface_hub==0.24.7
torch==2.5.1
torchaudio==2.5.1
These need to be pinned in requirements.txt (or capped with < constraints) so the build pulls compatible versions. Right now the unpinned build pulls versions that break pyannote internally regardless of what the app code does.
One small thing though: I notice you're now using speaker-diarization-community-1 but the "Accept license" link in the UI still points to pyannote/speaker-diarization-3.1. It should be updated to https://huggingface.co/pyannote/speaker-diarization-community-1
Activity
Tiritibambix commentedon May 14, 2026
Hey, just a quick follow-up on my previous issue.
After digging deeper, the real problem is a dependency conflict:
pyannote.audio3.4.0 callshf_hub_download()internally withuse_auth_token=, buthuggingface_hub1.14.0 (which yourrequirements.txtpulls in) has dropped that argument entirely. The two deps are incompatible with each other.No workaround seems to stick. Swapping argument names just moves the error around. Needs a fix on the dependency side.
sim186 commentedon May 15, 2026
Thanks a lot for the precise reporting @Tiritibambix . Will take soon a look. In general how felt so far the experience with the software? Not considering of course the diarization issue?
Tiritibambix commentedon May 15, 2026
Hey, glad you're looking into it!
For what it's worth, I managed to get diarization working by manually forcing these versions and changing one line:
pyannote.audio== 3.4.0huggingface_hub== 0.24.7torch== 2.5.1torchaudio== 2.5.1diarization.pyline 62:use_auth_token=instead oftoken=As for the overall experience, honestly, I love it. I take remote classes, I record the videos, and being able to search directly through the transcripts saves me an incredible amount of time. It's exactly the kind of tool I was looking for. Thanks so much for building it, and I hope sorting out the dependency mess won't be too painful!
sim186 commentedon May 16, 2026
nice to hear 😄 . If you pull the latest main hopefully should get the fix.
feat: #24 add support for dynamic token kwarg in diarization pipeline…
Tiritibambix commentedon May 17, 2026
Hey, diarization is still broken out of the box. After a clean clone +
docker-compose build --no-cache, I get a chain of errors that only go away by manually forcing specific versions inside the running container.The errors come in sequence:
hf_hub_download() got an unexpected keyword argument 'use_auth_token'—huggingface_hublatest drops that argument, so pyannote fails internallyWeights only load failed/TorchVersion was not an allowed global— PyTorch 2.6 changed the default oftorch.load(weights_only=...)and the pyannote checkpoints aren't compatible with itThe combination that actually works for me:
huggingface_hub==0.24.7torch==2.5.1torchaudio==2.5.1These need to be pinned in
requirements.txt(or capped with<constraints) so the build pulls compatible versions. Right now the unpinned build pulls versions that break pyannote internally regardless of what the app code does.Hope that helps!
feat: enhance UI with floating queue widget and inline job status
sim186 commentedon May 17, 2026
@Tiritibambix I think the issue should be fixed by now. Tested both in docker and venv.
I also took the chance to clean-up a bit the interface I hope is a little clearer now.
Tiritibambix commentedon May 18, 2026
Hey, thanks for the fix, tested and working!
One small thing though: I notice you're now using
speaker-diarization-community-1but the "Accept license" link in the UI still points topyannote/speaker-diarization-3.1. It should be updated to https://huggingface.co/pyannote/speaker-diarization-community-1Thanks for the great work!