Can this work with atomic1111 interface?

#13
by williamparker88 - opened

Can this work with atomic1111 interface?

Segmind org

It currently is not supported, but we're working at making it compatible.

Segmind org

ComfyUI support has been added.

works in StableSwarmUI too

Segmind org

Can this work with atomic1111 interface?

It should now be supported by Automatic, though you will likely have to install the dev branch of Automatic, and use the Automatic1111 safetensors.

0.o why is there a separate model file for Auto WebUI? You shouldn't need a separate file for that.

Segmind org

We identified that certain text encoder keys in the old safetensors weren't mapping correctly in automatic, hence we put up a new file. We didn't want to break anything that might have loaded correctly off the old safetensors, hence the new one.

Hi, appreciate the compatible model file for the WebUI. I wonder how to convert the HF finetuned SSD1B model to Automatic1111 safetensors? I tried the conversion script in diffuser repo, the converted file only generate noise in the webui. May I request a correct conversion script Thanks!

Segmind org

Hi, appreciate the compatible model file for the WebUI. I wonder how to convert the HF finetuned SSD1B model to Automatic1111 safetensors? I tried the conversion script in diffuser repo, the converted file only generate noise in the webui. May I request a correct conversion script Thanks!

Some text encoder weights do not get mapped properly. To convert you can load in the SDXL state dict and replace the SDXL unet weights with SSD weights.

ssd_weights=safetensors.torch.load_file('') ##path to ssd weights
sdxl_weights=safetensors.torch.load_file('') ##path to sdxl weights

kys_ssd=list(ssd_weights.keys())
kys_sdxl=list(sdxl_weights.keys())

for i in kys_sdxl:
    if 'diffusion_model' in i.split('.'):
        del sdxl_weights[i]

for i in kys_ssd:
    if 'diffusion_model' in i.split('.'):
        sdxl_weights[i]=ssd_weights[i]

safetensors.torch.save_file(sdxl_weights,"") #put in name for your ckpt
Segmind org

Something like this should work. Do import safetensors and torch.

Have you considered submitting a PR to Auto WebUI to fix the mapping error, thus allowing you to only publish exactly 1 model file (ie the one currently separated as '-ModelSpec')?
(Not counting the messy folder Diffusers leaves)

Automatic1111 version has the same iteration ratio with SDXL 1.0. Is anyone having the same problem?

I'm also seeing that the automatic1111 version has the same iteration rate.
I would assume thats because i'm not using the dev branch though.

Segmind org

Please use the A1111 dev branch.

@Icar Thanks! The conversion code works

Will this work with A1111 without the dev branch once the next A1111 version is released as stable?

Segmind org

Should work then.

Sign up or log in to comment