Super Fast Image Generation in stable diffusion using LCM LoRA

Поделиться
HTML-код
  • Опубликовано: 24 сен 2024

Комментарии • 70

  • @BenjyDale
    @BenjyDale 6 месяцев назад

    I have followed a few LCM tutorials on RUclips and this was the clearest one for me, so a big *thumbs up*. The most important step is to name the 2 safetensors files differently like this dude did in his video. I made the mistake of keeping them both as "pytorch_lora_weights" in 2 sub-folders and only 1 of them showed up in the Lora browser oops!

    • @AI-HowTo
      @AI-HowTo  6 месяцев назад

      Gald it was helpful.

  • @lennoyl
    @lennoyl 10 месяцев назад +3

    Thanks for your video. It's very useful to render much more images with my 8GB VRAM GPU.
    I use it also with Ultimate SD Upscale and it's really awesome to have hires images so fast.
    I'll certainly try to render some videos now

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад

      Glad it helped, indeed, quality will even get better in the future if newer sampler dedicated to these types of LCM LoRAs was implemented in A1111.

  • @duskairable
    @duskairable 10 месяцев назад +1

    Automatic 1111 UI doesn't have the LCM sampler yet and still gives a good result.
    Tried this with LCM sampler + the LORA in comfy UI and produced better results

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +1

      true, hopefully soon with LCM sampler, the quality of the images would be even higher than with Eular a.

    • @93aristar
      @93aristar 10 месяцев назад

      There is an extension that adds an lcm sampler

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад

      true, i saw couple on github, but hopefully soon we get this as part of official A1111 samplers so that everyone feels safer using them.

  • @UnknownHC
    @UnknownHC 2 месяца назад

    Is there a LCM sampler for "hires fix"? The hires fix is the one that takes a lot of time

  • @aliyilmaz852
    @aliyilmaz852 6 месяцев назад

    thanks for the video, especially for the cfg vs weight trick.
    I just started to learn SD with my old machine and it helped me a lot.
    I think to upscale images after first fast generations, but could not decide to select either SDXL-Lightning or LCM-XDSL
    Did you compare the quality SDXL-Lightning vs LCM-SDXL?

    • @AI-HowTo
      @AI-HowTo  6 месяцев назад +1

      You are welcome, currently in A1111 1.8 verision, LCM is officially supported one can try instead of Eular a for sampling... unfortunately i didnt do any real comparision, however, some people reported lighting to provide slighly better quality than LCM, but requires slighly more steps, you have to test for your work and see which option is better.

  • @vignesh_waran
    @vignesh_waran 10 месяцев назад +1

    Great Tut. Like wise can you make a video for animediff? With LCM?

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +2

      I will probably do.

  • @nodewizard
    @nodewizard 9 месяцев назад

    Very good video! Thank you

  • @Beka613
    @Beka613 10 месяцев назад

    What kind of web application are you using in this demo? Is this self-built or some open source project? Looks pretty cool!

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +1

      called Automatic 1111 or A1111 primarly used for Stable diffusion AI image generation, it is open source and free to use, but requires proper Graphics card to run smoothly, you can check more information about it here ruclips.net/video/RtjDswbSEEY/видео.html which is a beginners guide....
      if your graphics card however is not strong enough, i suggest sticking with Bing Chat which gives you amazing AI Images as in ruclips.net/video/aEJrdidKwMk/видео.html

  • @hairy7653
    @hairy7653 10 месяцев назад +2

    man, idk what's going wrong but I cannot get decent images from it, I've tried on 2 different installs and followed all the steps!

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +1

      this is new, so bugs might happen, i get problems sometimes when switching between checkpoints, so i restart A1111 and it works again....but while I am using a certain checkpoint such as Majicmixv4 or Aniverse or any other, it works perfectly and produces decent quality images without any bugs or issues and very quickly too.
      please double check the settings again, there must be something missing.
      CGG Scale = 1 or 2 maximum... Sample steps = 5 or max of 8 ... LoRA at weight 1 ... it works perfectly with me
      yesterday my A1111 automatically downloaded a new model, I think it is related to LCM which make generation of LCM faster than it appears in this video... so an update might be useful to A1111.

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +1

      i tried using other LoRAs with it too, it works better than i expected, even for character LoRAs, the Character LoRAs produce decent results, not as pure and accurate as the normal 25+ steps though, but it is decent enough... i Just didnt like its results with AnimateDiff, but its results with img2img and controlnet are very reliable and good.

    • @hairy7653
      @hairy7653 10 месяцев назад

      @@AI-HowTo I got them working, thanks for the advice, i downloaded Aniverse and it got things working

  • @hehe42069-k
    @hehe42069-k 6 месяцев назад

    This is completely insane, it dropped my normal 1min20sec gen time with a particular image i'm trying to make, down to 22 seconds.
    but it follows the prompt really terribly lol

  • @arhamahmedkhan7060
    @arhamahmedkhan7060 8 месяцев назад

    Why is lcm ssd1b lora giving better results for sdxl models than sdxl lora?

    • @AI-HowTo
      @AI-HowTo  8 месяцев назад +1

      not sure, I have not done enough tests to confirm this , usually, standard LoRAs should produce slighly more detailed images than any LCM based LoRAs despite its type (ssd1b, or other).

  • @ParvathyKapoor
    @ParvathyKapoor 10 месяцев назад

    i am always getting blurry images why?

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад

      possible reasons could be that CGG scale is larger than 2...usually this is the main reason.
      currently Euler a produces clear images, some other samplers dont.
      there is a small chance that some check points produce better results than others with this LoRA.

    • @ParvathyKapoor
      @ParvathyKapoor 10 месяцев назад

      @@AI-HowTo i manually added lcm sampler in SD and now kinda ok with output. Also i switch to another model and got fixed. Thanks btw

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +1

      You are welcome, great to hear, A1111 seems to be having more bugs over time, thanks for the tip, i just looked up how to install LCM Sampler for A1111, will do more testing for this sampler, because the link i found may not be very reliable... I am not sure, in my case, things just worked out by themselves, I even saw A1111 download some model automatically when i restarted, was not sure if it had to do with it, but after it downloaded automatically, LCM started rendering very quickly and dispalying images very quickly even without LCM Sampler, I should have recorded that to get more details about what is actually going on, but didnt.

    • @ParvathyKapoor
      @ParvathyKapoor 10 месяцев назад

      @@AI-HowTo oh yes Lcm is good. 🙏

  • @PivotMasterGer
    @PivotMasterGer 9 месяцев назад

    Are there special settings that must be done so the SDXL can work? I added it with a weight of 1 but no matter what I do, when I click generate image it tries to start but always instantly stops.

    • @AI-HowTo
      @AI-HowTo  9 месяцев назад

      no, it works out of the box, but not as fast as i hope with SDXL... best used in ComfyUI.
      now there is LCM sampler in A1111 which gives better image quality. note that LCM results are not of equal quality to the standard 25+ sampling steps without LCM, but still LCM has its applications

    • @PivotMasterGer
      @PivotMasterGer 9 месяцев назад

      @@AI-HowTo ok. Tanks a lot

  • @nobit1604
    @nobit1604 10 месяцев назад

    Have you tried this lora in Hires. Fix function? I tried it, but the result looks not well.

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +1

      Yes, it produces good results , however not at lower denoising, with 0.7 denosing strength for instance, the results are super...but kind of blurry at 0.3 for instance.

  • @KDD0063
    @KDD0063 10 месяцев назад +1

    There is no lora section or setting in the menu like you have

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад

      Your A1111 is probably not upto date, you can update it using Git Pull ... or just write the manually, all the same.

    • @KDD0063
      @KDD0063 10 месяцев назад

      thanks @@AI-HowTo

    • @carolineito9312
      @carolineito9312 10 месяцев назад

      Did it work? I had the same problem and mine is up to date.@@KDD0063

  • @bunici1996
    @bunici1996 10 месяцев назад

    Whenever I have an SDXL checkpoint loaded, I cant find the LCM LoRA in the LCM tab :( i can only spot it when a DS1.5 checkpoint is loaded instead

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +1

      if you downloaded the SD 1.5 and SDXL LCM loras, you should give them different names otherwise, the file will be overwritten, because in their huggingface they both have the same name...I think that's why.

    • @bunici1996
      @bunici1996 10 месяцев назад

      @@AI-HowTo thanks for the quick reply! A weird work around I found was to first load a sd1.5 checkpoint, apply the prompt and LoRA I want to use, then switch back to a SDXL checkpoint xD. It’s silly but it works! Great vid btw

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +1

      Yes i think i have encoutered something similar too, it seems A1111 is somewhat buggy, like the LoRA remained stuck somewhere...I remember in one trials yesterday, i removed the image from controlnet and results continued to generated based on the IP Adapter Controlnet image that i provided despite disabling it.
      hopefully A1111 will get some decent updates soon, because its bugs are increasing, and this is not healthy, otherwise people will start looking for alternative tools.

    • @bunici1996
      @bunici1996 10 месяцев назад

      @@AI-HowTo speaking of alternative tools, have you tried ComfyUI? It’s supposed to be less resource intensive but the idea of learning a new UI all over again?! ;_;

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +1

      Yes, ComfyUI is more powerful and often faster , but less user friently and operates very differently than User interfacce apps that most people are used to.

  • @netspike
    @netspike 7 месяцев назад

    It does not work for me. The images come out very bad.

    • @AI-HowTo
      @AI-HowTo  7 месяцев назад

      this often happens if CFG scale is larger than 2. LCM is used at 4-8 sampling steps, and 1-2 CFG scale, sampler such as Euler a works great, or LCM Sampler.... the quality of the picture generated from LCM is often not of equal quality to the standard 30 steps from normal generation though, we can say 90-95% as good as it is with the right settings/checkpoint.

  • @BrogramFilmss
    @BrogramFilmss 10 месяцев назад

    mines very slow? i have a 8gb 2080

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад

      not sure,
      the first time i ran it with LCM, it gets the steps quickly, but when it tries to put the image in the image panel(final render from latent to image space), it takes a while for some reason, i updated the extensions and A1111 just in case, on my second run, when i tested with LCM LoRA it downloaded some model, i could see it in the console but could not tell what it is exactly, but it started Rendering immediately and quickly, so it fixed itself by itself, A1111 looks buggy to be honest.
      if things continue being slow, considering switching to ComfyUI, hopefully soon they implement LCM Sampler and remove any bugs that causes slowdown glitches.

  • @apa_channel_
    @apa_channel_ 7 месяцев назад

    Can I use other lora while using lora lcm?

    • @AI-HowTo
      @AI-HowTo  7 месяцев назад

      yes, but quality will not equal to normal generations.

    • @apa_channel_
      @apa_channel_ 7 месяцев назад

      @@AI-HowTo simply
      the results are not as good as normal ones
      because of the step and cfg restrictions for lcm
      will affect other lora that require normal settings?

    • @AI-HowTo
      @AI-HowTo  7 месяцев назад

      it affects them a little but not by a big degree, in general, i prefer normal generation because it gives highest level of details, and gives the diffusion model more time to create finer details, but for video generation, LCM remains a great option and quality is good enough.

    • @apa_channel_
      @apa_channel_ 7 месяцев назад

      @@AI-HowTo so should I just use the normal way?
      because I mostly use it to find the best lora from the one I made using xyz plot.
      rather than making works/arts like in general.
      because I'm interested in lcm maybe it can speed up finding my best lora rather than normal hehe..

    • @AI-HowTo
      @AI-HowTo  7 месяцев назад

      Yes, I think Normal rendering is the best for production level output and for stilled images... You can still test the LCM and see if you find it useful for your own use cases, I only found it useful for fast video rendering nothing else.

  • @TentationAI
    @TentationAI 10 месяцев назад

    hi, we not supposed to wait that a1111 release the LCM sampler for using this ?

    • @yeezythabest
      @yeezythabest 10 месяцев назад +1

      You can use it right now as any other LoRa

    • @TheKamrenB
      @TheKamrenB 10 месяцев назад +1

      I believe the LCM sampler coming soon to A1111 will have much better results

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад

      this is working perfectly without any updates to A1111, the LoRA does the job ... updates to A1111 may help in improving results and speed soon, possibly.

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад +1

      I tested it, working just like any other LoRA and produces very useful results even at 4-8 sampling steps on A1111.... and works with any check point.

    • @goodlux777
      @goodlux777 10 месяцев назад +1

      I tried the SDXL version, didn't show up in LoRA tab after restarting server, like any other LoRA would. Does something need to be done to the safetensors file first? @@AI-HowTo

  • @SonnyBurnett2012
    @SonnyBurnett2012 6 месяцев назад

    Where are you going with such hurry?

    • @technoprincess95
      @technoprincess95 6 месяцев назад

      Haha true. Maybe his love is waiting him

  • @nermal93
    @nermal93 10 месяцев назад

    Is this working img2img?

    • @AI-HowTo
      @AI-HowTo  10 месяцев назад

      yes, pretty effectively, i will post some videos today i made in img2img with LCM LoRA in A1111 ruclips.net/video/k4ZWJD6W8d0/видео.html

  • @M--S
    @M--S 9 месяцев назад

    Thank you for this great tutorial. But please, don't speak so fast!

    • @AI-HowTo
      @AI-HowTo  8 месяцев назад

      You are welcome, thanks for the note, will take that into consideration in my future videos.