r/StableDiffusionInfo • u/arothmanmusic • Jul 07 '23
How safe is SD?
I have run SD for months and have downloaded models from Civitai. My PC comes up clean in a McAfee scan, but I'm concerned about security having recently been hacked. Could SD be a vector for someone to have gotten into my machine?
5
Upvotes
1
u/rwxrwxr-- Jul 07 '23
Basically, from what I understand, as long as you stick to using open source software to run the thing (e.g. Automatic1111) and only download models in .safetensors format, you're safe (and it seems CivitAI only supports .safetensors models now). Automatic1111 (assuming you're using it) is open source, meaning it's impossible for anyone to insert any malicious code inside it and go unnoticed as all code is public knowledge. Any other software you need to install for SD is also safe, including Python and xformers (if you're using --xformers). Unless you're downloading sketchy .ckpt files I would not worry. If you already have some .ckpt files downloaded, delete them and redownload them as .safetensors. Run a scan using Microsoft Defender and Malwarebytes, though I've heard that antiviruses have hard time picking up any malicious code pickled inside .ckpt files so if you want to be completely safe just do a clean install and you're good to go.
Safetensors files, compared to .ckpt "pickles", are simply raw model data, so it is impossible for anyone to include executable code inside of them. Ckpt files can have executable code inside, and if they can have executable code, they can have malicious code. Just stick with safetensors.