sd-leap-booster: Stable diffusion 1.4 model doesn't work

The following error occurs when using a model derived from StableDiffusion 1.4.

output_feat torch.Size([1, 64, 4, 4])
Conv length: 1024
Traceback (most recent call last):
  File "/venv/bin/leap_textual_inversion", line 780, in <module>
    main()
  File "/venv/bin/leap_textual_inversion", line 540, in main
    token_embeds[placeholder_token_id] = boosted_embed
RuntimeError: The expanded size of the tensor (768) must match the existing size (1024) at non-singleton dimension 0.  Target sizes: [768].  Tensor sizes: [1024]

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 24 (9 by maintainers)

Most upvoted comments

@AI-Casanova @AI-Casanova I usually code hyperparam search with Optuna, control is very fine-grained, but not the choice of algorithms (it uses a mix at will, from what I understood).

An example of this is here, and could be used in colab: https://github.com/peterwilli/sd-leap-booster/blob/lora-test-7/training/train_lora.py#L165

However, for such example, I’d suggest to stick with Pytorch, but swap the optimizer for something that is optimized for non-differential problems. Back when I was a naive tween, I used this: https://github.com/atgambardella/pytorch-es

I know it’s old AF but hey you live a day you learn a day! Just kidding, there’s probably more modern and popular repo’s these days.

My point is, it generally gives us more control. I’d definitely be interested in trying this out with you guys especially since it’s basically my original idea, but I gave up on it, no particular reason for it, I guess I found it too much effort to dig into old stuff again, or maybe I wanted to learn something new! If you’re ok with it, I can make a repo, a starter notebook, perhaps dig up some old stuff before this repo, and add you all as co-owners.