How to disable caching in .from_pretrained()

I’m using multiple models inside my docker image and I don’t wanna cache it as it always be downloaded while starting the containers.
Is there a way to ignore this or I have to write manual deletion logic?
Thanks for any help and suggestions!

It takes 3 minutes at the earliest to start up, 30 minutes or more at the worst to abort just to generate beautiful sunset, right?
I suffered a lot too.
I only use Gradio, not Docker, for now, but maybe it will help.

Relatively legitimate way

cache_examples=False,

Tweaking that looks like something on the edge

↓

Even in Docker, there should be a line of logic somewhere that specifies the generation of Examples. Just kill that one line.

Hey @skumar1998 ,
You can set
force_download=True


To re-Download the model.
Best,
M

Hi @mikehemberger
Thanks for your quick reply. But it still stores model weights on cache memory.