ai-dock/stable-diffusion-webui

Provision Script wget should have --content-disposition flag

gymdreams8 opened this issue · 2 comments

For checkpoints, wget need to add --content-disposition flag, otherwise the files won’t be saved correctly.

Many Civitai download links don’t have the the filename in the URL, so this flag is required.

Example:

CHECKPOINT_MODELS=(\
    "https://civitai.com/api/download/models/181248?type=Model&format=SafeTensor&size=pruned&fp=fp16" 
)

currently will be saved in the folder as this:

$ ls
'181248?type=Model&format=SafeTensor&size=pruned&fp=fp16'

but if instead you wget with the flag:

cd /workspace/stable-diffusion-webui/models/Stable-diffusion
wget 'https://civitai.com/api/download/models/181248?type=Model&format=SafeTensor&size=pruned&fp=fp16' --content-disposition

then it will be saved correctly as: virileReality_v30BETA3.safetensors

Fixed. Thank you @gymdreams8

Awesome. closing 🥰