Closed altoiddealer closed 2 days ago
What's happening looks to be that the loractl extra network isn't activated, I think you need to do this from somewhere in the request but I'm not certain, it could be alwayson_scripts, or something else... Can you post the details of a generation done from the UI (under the generated photo with seed, model, dimensions etc.), as it may be necessary to specify that the extra network should be activated there. It may alternatively/additonally be necessary to add loractl
to alwayson_scripts
in your request json.
There could be a bug here with 'NoneType' object is not iterable
but I think that's an edge case where I don't check if model copy failed (which it looks to here due to the out of memory error) - if it does then I imagine we want to throw an error anyway rather than continuing with the previous model
I'll also look into potential memory optimisations as I suspect that I don't release the GPU memory until after copy or even later (end of generation?) but I'm currently unsure how to even monitor that
There could be a bug here with
'NoneType' object is not iterable
but I think that's an edge case where I don't check if model copy failed (which it looks to here due to the out of memory error) - if it does then I imagine we want to throw an error anyway rather than continuing with the previous modelI'll also look into potential memory optimisations as I suspect that I don't release the GPU memory until after copy or even later (end of generation?) but I'm currently unsure how to even monitor that
The OOM was a separate issue for sure - I’ll see about the script activation… I wouldn’t think that’s the issue though, because the script is enabled by default when I launch ReForge
What's happening looks to be that the loractl extra network isn't activated, I think you need to do this from somewhere in the request but I'm not certain, it could be alwayson_scripts, or something else... Can you post the details of a generation done from the UI (under the generated photo with seed, model, dimensions etc.), as it may be necessary to specify that the extra network should be activated there. It may alternatively/additonally be necessary to add
loractl
toalwayson_scripts
in your request json.
You are CORRECT!
It seems that, despite the extension being enabled by default in my UI settings, the script is still disabled by default via API.
I added the following to my discord bot, which enables the script via the API call:
self.img_payload['alwayson_scripts'].setdefault('dynamic lora weights (reforge)', {}).setdefault('args', []).append({'Enable Dynamic Lora Weights': True})
That does happen because, the setting to be enabled or disabled on the UI is set the value you have on ui-config.json
While, the extension itself is disabled by default on the code.
Nice catch though! I have it disabled by default for combability and such.
@Panchovix btw, I have a very advanced discord bot that, a very long time ago, I implemented this idea I had which is to automatically calculate and apply loractl scaling values, when there are multiple LORAs triggered by the bot.
The way I have this written it modifies the values before they get inserted into the prompt... looking at this now, seems like something I should be doing after they get inserted.
Nonetheless, I'm mentioning this in case this sparks any light bulbs in your own head - such as adding similar functionality to the built-in extension
https://github.com/altoiddealer/ad_discordbot/blob/main/bot.py#L2500-L2543
https://github.com/altoiddealer/ad_discordbot/blob/main/settings_templates/config.yaml#L91-L100
Checklist
What happened?
I'm really scratching my head as to why I'm experiencing this issue via API, but not via the UI...
Here is a json dump of my payload immediately before it is posted to txt2img endpoint:
For some reason, when used via API, the loractl parsing is capturing the entire string as "the first element".
I added a print statement in
\extensions-builtin\Lora\extra_networks_lora.py
So this is what gets printed when used via API:
If I go into the UI and copy/paste my prompt into the box, it works successfully.
Steps to reproduce the problem
http://127.0.0.1:7860/docs
)What should have happened?
Applies the loractl
What browsers do you use to access the UI ?
Google Chrome
Sysinfo
sysinfo-2024-11-30-15-29.json
Console logs
Additional information
No response