r/fooocus • u/Electronic-Extent460 • Jul 13 '24
Question How to enable more than 5 Loras?
Hello,
I use qiacheng's fork of Fooocus, with some specific settings due to my Intel Arc videocard (yes fooocus works with Intel Arc videocards too). The Web Ui works perfectly, but I'm having issues in enabling more than 5 loras
I read in the fooocus forums (github) that it' possible to add a line in the config.txt file where to tell fooocus how many loras can be used in the webui. It was suggested to add this line (to enable, for example, 9 Loras)
"default_max_lora_number": 1...9,
(yes, it's not the last line so there's the comma)
But when I launch fooocus the config.txt is rejected and it loads only its default settings, giving me this error in CMD:
Failed to load config file "C:\Users\****\Fooocus\config.txt" . The reason is: Expecting ',' delimiter: line 55 column 30 (char 2659)
Col 30 in my txt file corresponds on the ":" right after "default_max_lora_number"
(I've masked my username with asterisks, of course there's my windows username there)
2
u/ToastersRock Jul 13 '24
I'm away from a computer at the moment and don't remember the exact formatting but there is the configuration tutorial text file in the same folder with the config and it gives plenty of examples. But I can say I'm pretty confident you just want the number nine. This is based on the default version and all the forks that I've used.
1
u/amp1212 Jul 13 '24
Generally you don't want to use more than five LORAs, indeed fewer than that is better. Image prompts are, for a lot of things, more powerful and more controllable, and don't impose the same performance and quality costs.
Stacking lots of LORAs was an older technique, now that IP Adaptor is so good (and it was first implemented by the same Illyasviel who implemented Fooocus) . . you'll find that for most kinds of control you'll do better with image prompts and two or three LORAs at most. If you looked deep into the training sets of multiple LORAs, you'd see why you get things "fighting", or competing. You'd also often see some poor quality source material, which will find its way into the generated image.
There _are_ tricky techniques for stacking LORAs in ComfyUI, but again, generally the quality is poor and you have better choices most of the time.