Model convert extension , Used for AUTOMATIC1111's stable diffusion webui
- convert to precisions: fp32, fp16, bf16
- pruning model: no-ema, ema-only
- checkpoint ext convert: ckpt, safetensors
- convert/copy/delete any parts of model: unet, text encoder(clip), vae
- Fix CLIP
- Force CLIP position_id to int64 before convert
Sometimes, the CLIP position_id becomes incorrect due to model merging. For example, Anything-v3.
This option will reset CLIP position to torch.Tensor([list(range(77))]).to(torch.int64)
If you use this extension to convert a model to fp16, which has an incorrect CLIP, the precision of the CLIP position_id may decrease during the compression process, which may coincidentally fix the offset.
If you do not want to fix this CLIP offset coincidentally (because fixing it would change the model, even though the fix is correct, not everyone likes the most correct, right :P ), use this option. It will force the CLIP position_id to int64, and keep the incorrect CLIP.