Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: Select the non-EMA checkpoint for Stable Cascade #190

Open
sjuxax opened this issue Mar 10, 2024 · 2 comments
Open

[Feat]: Select the non-EMA checkpoint for Stable Cascade #190

sjuxax opened this issue Mar 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@sjuxax
Copy link

sjuxax commented Mar 10, 2024

Describe your use-case.

Trying to train a Stable Cascade LoRA and find the non-EMA samples are much better. I'm now faced with trying to create a safetensors file that uses the EMA weights. At #116 (comment), @Nerogar mentioned this was possible with some manual manipulation and the Model Convert tool. Instructions on how to do that would be nice, but the Model Convert dropdown doesn't have Stable Cascade as an option, so adding it may be a pre-requisite.

What would you like to see as a solution?

Ideally, make a simple-to-copy no-ema safetensors file alongside the ema one.

Probably also requires Model Convert for Cascade.

Have you considered alternatives? List them here.

N/A

@sjuxax sjuxax added the enhancement New feature or request label Mar 10, 2024
@sjuxax
Copy link
Author

sjuxax commented Mar 11, 2024

It looks like we can just use the lora.safetensors file to drop the EMA, working for me in ComfyUI. It also looks like I can resume training without EMA by renaming the EMA folder and settings EMA to OFF in the backup's config json. It'd be nice if this was documented somewhere. Thanks.

@311-code
Copy link

311-code commented Mar 15, 2024

Edit: I just ended up reading the kohya-ss scripts cascade branch and got the answer to quesiton:
The first time, specify --text_model_checkpoint_path and --save_text_model to save the Text Encoder weights. From the next time, specify --text_model_checkpoint_path to load the saved weights.

So I assume Onetrainer is doing two models exported also. Official learning rate default is 1e-4 (0.0001) and official settings use bf16 for training. I think I was accidently using fp16 which says is unstable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants