Pipeline

pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1")

# Loaded in safetensors 0:00:02.033658
# Loaded in Pytorch 0:00:02.663379
This is for the entire loading time, the actual weights loading time to load 500MB:


	Copied
Safetensors: 3.4873ms
PyTorch: 172.7537ms
Performance in general is a tricky business, and there are a few things to understand:
If you’re using the model for the first time from the hub