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, and the model has an incorrect CLIP, the precision of the CLIP position_id may decrease during the compression process, which might coincidentally correct the offset.
If you do not wish to correct this CLIP offset coincidentally (because fixing it would alter the model, even though the correction is accurate, not everyone prefers the most correct, right? :P), you can use this option. It will force the CLIP position_id to be int64 and retain the incorrect CLIP