Linaqruf / kohya-trainer

Adapted from https://note.com/kohya_ss/n/nbf7ce8d80f29 for easier cloning
Apache License 2.0
1.86k stars 306 forks source link

about v2 training #10

Closed cameback0123 closed 1 year ago

cameback0123 commented 1 year ago

Can anyone tell me how to define the "v2" option? (I just realized that V2.1 is not yet supported, and will start over with 2.0) 1

Linaqruf commented 1 year ago

First you need to put the args --v2 right there image

then you should load Stable diffusion 2.0/2.1 as pretrained model https://huggingface.co/stabilityai/stable-diffusion-2

you should do the same with !accelerate fine-tune.py, by add --v2 for 512 model and --v_parameterization for 768v you need to put v2 inference.yaml as well

i'm sorry but i haven't tried training SDv2 because i don't think it's worth the time to do that in colab, so i haven't implemented v2 args to the cells

Maybe after Waifu Diffusion 1.4 comes out i will consider to add it

cameback0123 commented 1 year ago

Thank you so much for the kind advice! I got out of that problem:) Please let me ask one more question.

I got the following error in training begin


"<ipython-input-19-edddc6509f6d File "", line 49 --pretrained_model_name_or_path={pre_trained_model_path} ^ IndentationError: unexpected indent


Do I need to remove Indent?

Linaqruf commented 1 year ago

sorry for late reply, busy day yeah the issue is the indent after --pretrained_model_name_or_path={pre_trained_model_path}

if you are adding --v2 and --v_parameterization after that args you need to add line break \ like this (in colab)


    --pretrained_model_name_or_path={pre_trained_model_path} \
    --v2 \
    --v_parameterization \
cameback0123 commented 1 year ago

I understood your explanation perfectly! Thank you so much for taking time out of your busy schedule to help me:)