Skip to content

model convert extension for stable-diffusion-webui. supports convert fp16/bf16 no-ema/ema-only safetensors

Notifications You must be signed in to change notification settings

dongyang-mt/sd-webui-model-converter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

sd-webui-model-converter

Model convert extension , Used for AUTOMATIC1111's stable diffusion webui image

Features

  • 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

Fix CLIP

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)

Force CLIP position_id to int64 before convert

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.

image

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.

About

model convert extension for stable-diffusion-webui. supports convert fp16/bf16 no-ema/ema-only safetensors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%