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!
2024-09-01T17:02:33Z
It takes 3 minutes at the earliest to start up, 30 minutes or more at the worst to abort just to generatebeautiful sunset, right?I suffered a lot too.I only use Gradio, not Docker, for now, but maybe it will help.Relatively legitimate waygradio.appGradio  DocsGradio docs for usingcache_examples=False,Tweaking that looks like something on the edgegithub.comgradio-app/gradio/blob/main/gradio/external.py"""This module should not be used directly as its API is subject to change. Instead,
use the `gr.Blocks.load()` or `gr.load()` functions."""

from __future__ import annotations

import json
import os
import re
import tempfile
import warnings
from pathlib import Path
from typing import TYPE_CHECKING, Callable, Literal

import httpx
import huggingface_hub
from gradio_client import Client
from gradio_client.client import Endpoint
from gradio_client.documentation import document
from packaging import versionThis file has been truncated.show original↓huggingface.comultit2i.py · John6666/t2i-multi-demo at mainWe’re on a journey to advance and democratize artificial intelligence through open source and open science.huggingface.coexternalmod.py · John6666/Diffusion80XX4sg at mainWe’re on a journey to advance and democratize artificial intelligence through open source and open science.Even in Docker, there should be a line of logic somewhere that specifies the generation of Examples. Just kill that one line.
2024-09-02T06:48:06Z
Hey@skumar1998,You can setforce_download=TrueIMG_56591099×701 90.6 KBTo re-Download the model.Best,M
2024-09-02T17:28:22Z
Hi@mikehembergerThanks for your quick reply. But it still stores model weights on cache memory.