# How to load Wav2Vec2Processor from local model directory?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-wav2vec2processor-from-local-model-directory%2F15285%3E%5C
**Category:** Models\
**Created:** [March 2, 2022, 11:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-wav2vec2processor-from-local-model-directory%2F15285 "2022-03-02T23:16:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramil](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@Ramil](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRamil)%5C
**Post date:** [March 2, 2022, 11:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-wav2vec2processor-from-local-model-directory%2F15285%2F1 "2022-03-02T23:16:51Z")

</div>

Hello,

I have a fine-tuned model saved in the local directory. I can load the model using the code below:

```auto
from transformers import Wav2Vec2ForCTC

model = Wav2Vec2ForCTC.from_pretrained("/home/ramil/wav2vec2-large-xlsr-turkish-demo/checkpoint-11400")

```

But when I try to load the processor:

```auto
from transformers import Wav2Vec2Processor

model = Wav2Vec2Processor.from_pretrained("/home/ramil/wav2vec2-large-xlsr-turkish-demo/checkpoint-11400")

```

I am getting `"OSError: Can't load tokenizer for '/home/ramil/wav2vec2-large-xlsr-turkish-demo/checkpoint-11400'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure '/home/ramil/wav2vec2-large-xlsr-turkish-demo/checkpoint-11400' is the correct path to a directory containing all relevant files for a Wav2Vec2CTCTokenizer tokenizer"`

I would appreciate your help with this matter.

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [March 3, 2022, 1:09pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-wav2vec2processor-from-local-model-directory%2F15285%2F2 "2022-03-03T13:09:08Z")

</div>

You need to save the processor along your model in the same folder:

```auto
Wav2Vec2Processor.save_pretrained(xxx)

```

---

<div class="post-metadata">

**Author:** ![Ramil](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@Ramil](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRamil)%5C
**Post date:** [March 3, 2022, 1:23pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-wav2vec2processor-from-local-model-directory%2F15285%2F3 "2022-03-03T13:23:13Z")

</div>

Is the processor affected during the training process? Or It is not affected so that I can save it either before or after training?

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [March 3, 2022, 1:29pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-wav2vec2processor-from-local-model-directory%2F15285%2F4 "2022-03-03T13:29:09Z")

</div>

It’s not affected.

---

<div class="post-metadata">

**Author:** ![Ramil](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@Ramil](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRamil)%5C
**Post date:** [March 3, 2022, 2:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-wav2vec2processor-from-local-model-directory%2F15285%2F5 "2022-03-03T14:25:15Z")

</div>

Thank you very much!
