Textual Inversion Tutorial - Embeddings and Hypernetwork basics and walkthrough

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 มิ.ย. 2024
  • Hey Everyone! This has been a popular request in both comments and in the discord, so I put together a more comprehensive breakdown while focusing on both "how it works" and "how we make it work".
    Textual Inversion allows us to push our models toward a very specific look, and here's where we can learn how to give that push.
    00:00 Intro
    00:59 Understanding Textual Inversion
    06:10 Preparing Images
    08:00 Creating The Tokens
    09:22 Preprocessing Images
    11:20 Training A Hypernetwork
    16:37 Training Embeddings
    17:05 Understanding Templates
    19:05 Examples with a larger set
    linktr.ee/FrankTankGaming
  • ภาพยนตร์และแอนิเมชัน

ความคิดเห็น • 56

  • @rawyin
    @rawyin ปีที่แล้ว +7

    I wish it didn't take so long to find this video. Confirmed much of what I've learned the last two weeks and showed me clarity on a few things that I found confusing. Well done.

    • @FrankTheTankGaming
      @FrankTheTankGaming  ปีที่แล้ว

      Sorry I couldn't help any sooner, but thank you for your feedback and I appreciate your support! :)

  • @LoneRanger.801
    @LoneRanger.801 ปีที่แล้ว +3

    This is such an excellent video. I love that you have shared example outputs, settings and most of all, descriptions and explanations of underlying concepts & theory. Thanks

  • @johneato
    @johneato 8 หลายเดือนก่อน +1

    Thanks for making this great tutorial, everyone else wants to lecture us for an hour, you nailed it in 20 minutes.

  • @mandai2
    @mandai2 หลายเดือนก่อน

    8:27 The initialization text is used to limit which part of the image the inversion is applied to. * means all of the image will be influenced. For example if you set it to tree it will only draw trees in that particular style (or for subject it would add a tree where there was none).
    For subjects keep it as basic as possible i.e. 1 word to limit the changes to other things in the image.
    For styles you may want to keep the asterisk, or you can change this if there are only specific things which you want to have the new style.

  • @RobertJene
    @RobertJene 4 หลายเดือนก่อน

    This is the only video I found with information regarding the Hypernetworks training

  • @TheMinion256
    @TheMinion256 2 หลายเดือนก่อน +1

    This is the most helpful guide I have found! Thank you for taking the time
    I noticed my train tab has Create Embedding, Create Hypernetwork, and Train. I don't have Preprocess Images. That whole section is gone

    • @mecha.mio.00
      @mecha.mio.00 หลายเดือนก่อน

      now the options of preprocess images are in "Extras". look there and tell me if its works

    • @jeremyvolland8508
      @jeremyvolland8508 หลายเดือนก่อน

      Same here, did you figure it out?

  • @JackReverbs
    @JackReverbs ปีที่แล้ว

    real good vid! very helpful thx :)

  • @shadowdemonaer
    @shadowdemonaer ปีที่แล้ว +4

    I saw people trained textual inversion models for negative prompts so people could be able to type in one thing like "easynegative" and it gets rid of a lot of problems that typically tend to come with generations. I am having some trouble with something and would like to train textual inversion very specifically for some negative things to see if I can get rid of these problems. I am watching this video trying to get it figured out, and I'm hoping it can work... if it doesn't, I'll be back.

    • @FrankTheTankGaming
      @FrankTheTankGaming  ปีที่แล้ว +2

      Honestly that's the first I'd heard of that use case - I'm really curious what kind of training material would be used for something like that. If you haven't seen it, my video breaking down Loab and negative prompts might help you get a better understanding of how negative prompts work, as far as what I found with testing: th-cam.com/video/RYiXwKTVR2A/w-d-xo.html

    • @shadowdemonaer
      @shadowdemonaer ปีที่แล้ว +1

      @@FrankTheTankGaming I'll check it out for sure. I found out by trying to use someone else's lora as a negative prompt set that apparently loras don't work for it, so that saddens me :') I'll go look at it right away. Tyvm.

  • @GerwaldJensRadsma
    @GerwaldJensRadsma ปีที่แล้ว +7

    Nice! thank you very clear... Do you have some experience with LORA as well?? :) people with a clear voice and some deeper knowledge are important :) tnx for this!!

    • @FrankTheTankGaming
      @FrankTheTankGaming  ปีที่แล้ว +2

      I haven't yet figured out a clear workflow for LORA, but I absolutely want to try to make a video about it once I have a better understanding of exactly what to do. Especially if this video does well, I want to continue to make more tutorials so I appreciate the feedback. 😃

    • @GerwaldJensRadsma
      @GerwaldJensRadsma ปีที่แล้ว

      @@FrankTheTankGaming Tnx! I like the way you teach... so thanks!

    • @devnull_
      @devnull_ ปีที่แล้ว

      @@FrankTheTankGaming Simply DL Kohya GUI by Bernard Maltais, training workflow is pretty similar to this video's workflow for TI training. Those trained LoRAs work without any extra work in A1111 webui.

  • @weakmindedidiot
    @weakmindedidiot 11 หลายเดือนก่อน +1

    Goddamn. I am really glad you took the time to sit down and make that video. I saw a lot of things and they just didn't work. Something was off. Went back, learned.. trained the nets. Makes a lot more sense now.

    • @FrankTheTankGaming
      @FrankTheTankGaming  11 หลายเดือนก่อน

      Thanks, and I'm glad to hear that. A lot of these methods stop working relatively quick because things keep getting updated lol.

  • @Catapumblamblam
    @Catapumblamblam 3 หลายเดือนก่อน +2

    My SD (a1111 and Forge) doesn't have the preprocessing tab. :-/

  • @kodiak90
    @kodiak90 ปีที่แล้ว +2

    Excellent video, informative and to-the-point. I am curious though, I notice that you're able to view the contents of text files without opening them. Unless you're on Linux I can't figure out how. Share?

    • @FrankTheTankGaming
      @FrankTheTankGaming  ปีที่แล้ว +1

      I'm using a program called One Commander instead of Windows explorer 🙂 Hope that helps!

  • @alekmoth
    @alekmoth ปีที่แล้ว

    thanks for this tutorial. quick side question I couldnt find the answer to, how have you scaled down the previews of embedds, and hypernetworks in the text2img tab?

    • @FrankTheTankGaming
      @FrankTheTankGaming  ปีที่แล้ว

      in the settings, find 'Default view for Extra Networks' and you have an option there for thumbs vs cards ;)

  • @Tummel007
    @Tummel007 หลายเดือนก่อน

    great video, with lots of helpful information and like others mentioned pretty unique in the flood of videos on that subject. Unfortunately on mac-os it's a bumpy road. I got stuck with "AttributeError: 'NoneType' object has no attribute 'get'" in terminal while training hyper network and the embedding will not show up in the dropdown menu, though it's in the folder... so that's the terminal station for me :-/

  • @RemiStardust
    @RemiStardust ปีที่แล้ว +2

    13:49 It's really cool to see, that - while close - this image generated is not just a copy! The angle is a bit differnt and it added wrinkles above the raised eyebrow. It's a pretty bad-ass result!
    Maybe I should try hypernetwork, I had no success trying to train an embedding, even though I have a great graphics card and a new computer, stable diffusion Automatic1111 and I let it run for hours. The renders just didn't start approaching the target :(
    I had 27 images at 512x512 and I used the stable-diffusion 1.5 pruned model.
    I tried it several times, carefully followed tutorials - I have no idea why failure.

    • @snickle1980
      @snickle1980 ปีที่แล้ว

      I'm new to this, but i suppose...when in doubt? Add more photos?
      Let me know what you've discovered. =)

  • @aashas8553
    @aashas8553 3 หลายเดือนก่อน +1

    For some reason there's no preprocess tab anymore.

  • @devnull_
    @devnull_ ปีที่แล้ว

    14:41 - what did you do to make your extra networks picker look like a popup window? Or is that by the magic of video editing?

    • @FrankTheTankGaming
      @FrankTheTankGaming  ปีที่แล้ว +1

      Ah that was just video editing - there's only the two views that I'm aware of, where you can get a larger display card or a smaller one in the options

    • @devnull_
      @devnull_ ปีที่แล้ว +2

      @@FrankTheTankGaming OK! I was thinking what the hell. Anyway, that window is horrible, would rather get such a nice looking popup! 😃

  • @___x__x_r___xa__x_____f______
    @___x__x_r___xa__x_____f______ 24 วันที่ผ่านมา

    hi Frank, is embeddings tab bugged in auto1111 and Forge?

  • @RobertJene
    @RobertJene 4 หลายเดือนก่อน

    15:55 if you had the hypernetwork file in the correct folder, someone else's prompt image would work for you

  • @TheAlice4444
    @TheAlice4444 ปีที่แล้ว +2

    Hello and thank you for these great videos, I was wondering if you had a tutorial which explains basics about how to download webui automatic 1111 as well as dreambooth, lora etc.. I also have no idea how python really works and how I know there is a correct path between Python and webui automatic, I have downloaded all of these from one tutorial but it feels messy cause I don't have deeper knowledge about these things.. I also have no idea how to make updates and how all of these things interact with each other 😢 I just dont want to simply repeat what people do without understanding it in a deeper level.. If you know a good tutorial or have done one, it would be wonderful.. thank you so much

    • @FrankTheTankGaming
      @FrankTheTankGaming  ปีที่แล้ว +1

      You know what- I was thinking about creating an updated tutorial since my other one is getting a little dated... I think your comment just put me over the top for that.
      Stay tuned because I do want to do another proper install tutorial with some of the new information and tools, and I'll do my best to make sense out of all the complicated stuff

    • @TheAlice4444
      @TheAlice4444 ปีที่แล้ว

      @@FrankTheTankGaming That's fantastic ! Thank you so much :) its been a month and even tho I'm getting better, its still so fascinating and alien to me... I'm trying to run everything via Runpod like most people who do not have a powerful computer, my goal is to make an animation like in Corridor Crew for my music video clip. I have not seen any tutorial on how to turn a "video to anime" via runpod yet. So if you ever do it too, I'll watch it many times ^^

  • @ThaRaiZe
    @ThaRaiZe ปีที่แล้ว

    Followed steps to a tee but when I use the in my prompt, a completly different image pops out. I dont know if it matters but my training stops every 500 steps and says complete.

    • @ThaRaiZe
      @ThaRaiZe ปีที่แล้ว

      Also - it says training complete but cant find the sample images in the log file?

  • @ameet21
    @ameet21 10 หลายเดือนก่อน

    Bro you have cool voice

  • @emiletetrt
    @emiletetrt ปีที่แล้ว

    Great tutorial, I have started getting error
    KeyError: 'clip_skip'
    Anyone else get this?

  • @babydollface
    @babydollface ปีที่แล้ว

    So it's not possible to train an embedding that copies a face perfectly?

    • @FrankTheTankGaming
      @FrankTheTankGaming  ปีที่แล้ว +1

      An embedding is probably the weakest form of training, so it's far less likely with an embedding than with a hypernetwork, for example. Dreambooth and LORAs give the most spot-on results. (Video tutorial coming soon on that 😁)

    • @babydollface
      @babydollface ปีที่แล้ว +1

      @@FrankTheTankGaming thanks for the reply! I've been trying to train an embedding of my face for days and it always looks like a caricature no matter what I do. I wish I had known it was this hard to make it copy a face right before I started 😩

    • @joeyc666
      @joeyc666 ปีที่แล้ว

      @@babydollface Are you working exclusively with hypernetworks and embeddings? Did you try LoRa or DB?

    • @babydollface
      @babydollface ปีที่แล้ว +1

      @@joeyc666 I gave up on embeddings. I trained a lora of my face and it looks pretty good

  • @relaxation_ambience
    @relaxation_ambience ปีที่แล้ว +1

    @FrankTheTankGaming Hi ! I'm a newbie, so sorry if my question will sound stupid. I just came to your video after I watched this video: th-cam.com/video/dVjMiJsuR5o/w-d-xo.html
    Here guy explains about 4 main training methods: dreambooth, lora, textual inversion, hypernetworks. Also he mentions about "aesthetic embedding" which according to him is totally useless. And I somehow liked "textual inversion" most, as it's small file and you can get high quality results. But I saw here in the comments, that you say, that "textual embedding" is the weakest training form. So now I'm confused: is textual inversion is the same as textual embedding ? Do they have anything in common with "aesthetic embedding" ? Which is the best method to train ? Before your video I thought about "textual inversion", but now I'm confused and linked more to Lora kind of...

    • @FrankTheTankGaming
      @FrankTheTankGaming  ปีที่แล้ว +2

      'Textual inversion' is the official name of the process that can create both embeddings and hypernetworks. Hopefully that clears up the confusion. :)
      LORAs and checkpoints are the results of the dreambooth process.

    • @relaxation_ambience
      @relaxation_ambience ปีที่แล้ว +1

      @@FrankTheTankGaming Thank you for the answer, but still a little bit dark forest to me :) So if I understand correctly- I can't get Lora without Dreambooth ? As that guy in my provided link explained, that to train Dreambooth it takes 1 hour or something and to train Lora it takes ~15 minutes. So I understood, that those processes are independent...

    • @FrankTheTankGaming
      @FrankTheTankGaming  ปีที่แล้ว +1

      @@relaxation_ambience yeah be sure to watch my dreambooth video before going into that territory, because it will explain a lot better... Each type of training has advantages and disadvantages. You might end up with a favorite, but why not get great with all of them? :)

    • @relaxation_ambience
      @relaxation_ambience ปีที่แล้ว +1

      @@FrankTheTankGaming Thanx ! I go watching :)

  • @GamingInfested
    @GamingInfested 4 หลายเดือนก่อน

    make it simpler, embedding:ai influencer / hypernetwork: nsfw fanvue addon