diff --git a/examples/stable-diffusion/training/README.md b/examples/stable-diffusion/training/README.md index 28e2d4e8c0..0a74b3c558 100644 --- a/examples/stable-diffusion/training/README.md +++ b/examples/stable-diffusion/training/README.md @@ -273,6 +273,7 @@ Now let's get our dataset. For this example we will use some dog images: https:/ Let's first download it locally: ```python +import os from huggingface_hub import snapshot_download local_dir = "./dog" @@ -281,6 +282,12 @@ snapshot_download( local_dir=local_dir, repo_type="dataset", ignore_patterns=".gitattributes", ) + +# check if .cache folder exists and remove it. +cache_folder = os.path.join(local_dir, ".cache") +if os.path.exists(cache_folder): + import shutil + shutil.rmtree(cache_folder) ``` ### Full model finetune