Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
pranavajay
/
okok
like
2
Text-to-Image
Diffusers
Safetensors
FluxPipeline
Model card
Files
Files and versions
Community
Deploy
Use this model
e074046
okok
/
ch.py
pranavajay
Create ch.py
e074046
verified
10 months ago
raw
Copy download link
history
blame
Safe
215 Bytes
from
transformers
import
prune_model
model = torch.load(
'merged_model.safetensors'
)
pruned_model = prune_model(model, amount=
0.25
)
# Removes 20% of parameters
torch.save(pruned_model,
'merged_model.safetensors'
)