Update invoke.bat.in isolate environment variables
Without locally scoped (to the script) environment variables, this script can only be run once and then you need to start a new cmd session to get a clean environment.
Surrounding the script with setlocal/endlocal achieves this.
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setlocal https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/endlocal
@lynnewu; Have you tested this?
@lynnewu; Have you tested this?
Yes, on a single physical machine running Windows 10.
Before - cancel out of a working/running invoke.bat session. Restart it. Get the dreaded "No module named 'ldm'" error. Also note it leaves the prompt changed, to (invoked) H:\invokeAI>

After - Here's a screenshot showing me terminating a running copy and then immediately restarting it successfully.

Yes, on a single physical machine running Windows 10.
Nice work. TYVM.
Yes, on a single physical machine running Windows 10.
Nice work. TYVM.
YW. Apologies for closing. This is the first time I've ever done this.