Stability-AI / StableSwarmUI

StableSwarmUI, A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility.
MIT License
4.52k stars 361 forks source link

DotNET Installation Error on Windows 11 #2

Closed Feanix-Fyre closed 1 year ago

Feanix-Fyre commented 1 year ago

I read the instructions on the README.md and downloaded install-windows.bat. I placed it where I wanted to install and ran it. It didn't work. I further attempted to run make-shortcut.bat and launch-windows.bat --launch_mode webinstall and this is the resulting output.

C:\AI>install-windows.bat
The `msstore` source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").

Found Microsoft .NET SDK 7.0 [Microsoft.DotNet.SDK.7] Version 7.0.306
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dotnetcli.azureedge.net/dotnet/Sdk/7.0.306/dotnet-sdk-7.0.306-win-x64.exe
  ██████████████████████████████   201 MB /  201 MB
Successfully verified installer hash
Starting package install...
Successfully installed
Found an existing package already installed. Trying to upgrade the installed package...
Found Git [Git.Git] Version 2.41.0.3
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/git-for-windows/git/releases/download/v2.41.0.windows.3/Git-2.41.0.3-64-bit.exe
  ██████████████████████████████  58.3 MB / 58.3 MB
Successfully verified installer hash
Starting package install...
The installer will request to run as administrator, expect a prompt.
Successfully installed
Cloning into 'StableSwarmUI'...
remote: Enumerating objects: 3310, done.
remote: Counting objects: 100% (566/566), done.
remote: Compressing objects: 100% (201/201), done.
remote: Total 3310 (delta 364), reused 563 (delta 362), pack-reused 2744
Receiving objects: 100% (3310/3310), 1.80 MiB | 10.54 MiB/s, done.
Resolving deltas: 100% (2310/2310), done.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.

C:\AI\StableSwarmUI>make-shortcut.bat
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.

C:\AI\StableSwarmUI>launch-windows.bat --launch_mode webinstall
The command could not be loaded, possibly because:
  * You intended to execute a .NET application:
      The application 'build' does not exist.
  * You intended to execute a .NET SDK command:
      No .NET SDKs were found.

Download a .NET SDK:
https://aka.ms/dotnet/download

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
The command could not be loaded, possibly because:
  * You intended to execute a .NET application:
      The application 'src\bin\live_release\StableSwarmUI.dll' does not exist.
  * You intended to execute a .NET SDK command:
      No .NET SDKs were found.

Download a .NET SDK:
https://aka.ms/dotnet/download

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found

C:\AI\StableSwarmUI>
mcmonkey4eva commented 1 year ago

That looks like you might just need to rerun it, or that .NET failed to install for some reason? Just retry running it - if it still fails the same way, check https://dotnet.microsoft.com/en-us/download/dotnet/7.0 and see if installing manually that way that resolves it?

Feanix-Fyre commented 1 year ago

Did a manual install of the SDK 7.0.306 and then the ASP.NET Core Runtime 7.0.9 and .NET Desktop Runtime 7.0.9 (in hindsight, was unnecessary cause the SDK provides those) and, after each install, this still happened.

C:\AI\StableSwarmUI>launch-windows.bat --launch_mode webinstall
The command could not be loaded, possibly because:
  * You intended to execute a .NET application:
      The application 'build' does not exist.
  * You intended to execute a .NET SDK command:
      No .NET SDKs were found.

Download a .NET SDK:
https://aka.ms/dotnet/download

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
The command could not be loaded, possibly because:
  * You intended to execute a .NET application:
      The application 'src\bin\live_release\StableSwarmUI.dll' does not exist.
  * You intended to execute a .NET SDK command:
      No .NET SDKs were found.

Download a .NET SDK:
https://aka.ms/dotnet/download

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found

I'd restart my computer but that would close discord so it'll have to wait till after.

Feanix-Fyre commented 1 year ago

Restarting did not fix the issue.

ptmarks commented 1 year ago

Crashed for me as well. Any guidance would be helpful. Thanks!

MSBuild version 17.6.8+c70978d4d for .NET Determining projects to restore... All projects are up-to-date for restore. StableSwarmUI -> C:\StableSwarmUI\StableSwarmUI\src\bin\live_release\StableSwarmUI.dll

Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:00:00.75 14:46:15.814 [Init] === StableSwarmUI Starting === 14:46:15.854 [Init] Prepping extension: StableSwarmUI.Builtin_StabilityAPIExtension.StabilityAPIExtension... 14:46:15.862 [Init] Prepping extension: StableSwarmUI.Builtin_ScorersExtension.ScorersExtension... 14:46:15.862 [Init] Prepping extension: StableSwarmUI.Builtin_GridGeneratorExtension.GridGeneratorExtension... 14:46:15.863 [Init] Prepping extension: StableSwarmUI.Builtin_DynamicThresholding.DynamicThresholdingExtension... 14:46:15.863 [Init] Prepping extension: StableSwarmUI.Builtin_ComfyUIBackend.ComfyUIBackendExtension... 14:46:15.864 [Init] Prepping extension: StableSwarmUI.Builtin_AutoWebUIExtension.AutoWebUIBackendExtension... 14:46:15.889 [Init] Parsing command line... 14:46:15.890 [Init] Loading settings file... 14:46:15.897 [Init] Re-saving settings file... 14:46:15.906 [Init] Applying command line settings... 14:46:15.918 [Init] Prepping options... 14:46:15.998 [Init] Loading models list... 14:46:15.999 [Init] Loading backends... 14:46:16.000 [Init] Loading backends from file... 14:46:16.001 [Init] Prepping API... 14:46:16.002 [Init] Prepping webserver... 14:46:16.121 [Init] Scan for web extensions... 14:46:16.122 [Init] Readying extensions for launch... 14:46:16.123 [Init] Launching server... 14:46:16.123 [Init] Starting webserver on http://localhost:7801 14:46:16.146 [Init] Launch web browser to install page... 14:46:16.181 [Init] Program is running. fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1] An unhandled exception has occurred while executing the request. System.ArgumentException: At least one object must implement IComparable. at System.Collections.Comparer.Compare(Object a, Object b) at System.Collections.Generic.ObjectComparer1.Compare(T x, T y) at System.Linq.CachingComparer2.Compare(TElement element, Boolean cacheLower) at System.Linq.OrderedEnumerable1.TryGetFirst(Boolean& found) at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Boolean& found) at System.Linq.Enumerable.First[TSource](IEnumerable1 source) at StableSwarmUI.Utils.WebUtil.CheckGPUIsSufficient() in C:\StableSwarmUI\StableSwarmUI\src\Utils\WebUtil.cs:line 59 at StableSwarmUI.Pages.Pages_Install.ExecuteAsync() in C:\StableSwarmUI\StableSwarmUI\src\Pages\Install.cshtml:line 179 at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable1 statusCode) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at StableSwarmUI.Core.WebServer.<>c.<b19_1>d.MoveNext() in C:\StableSwarmUI\StableSwarmUI\src\Core\WebServer.cs:line 125 --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

mcmonkey4eva commented 1 year ago

@ptmarks that's a different error - simple code error, fixed with the above commit

Feanix-Fyre commented 1 year ago

After uninstalling every instance of .NET SDK, .NET, ASP.NET and Microsoft Windows Desktop Runtime, and then reinstalling just the SDK, running install-windows.bat, and running launch-windows.bat --launch_mode webinstall, it still didn't work. ran it three more times, still no. deleted folder, grabbed newest install-windows.bat and ran it. didn't work. deleted folder and ran it again and then launch-windows.bat --launch_mode webinstall. still didn't work. deleted the folder, ran install-windows.bat and, at this point, i was out of ideas, so I tried just double-clicking launch-windows.bat instead of the launch-windows.bat --launch_mode webinstall and now it's working.

I don't know why. I hypothesize that it looked for .NET and grabbed whatever it saw, which was the wrong version, like a similar issue I had with CUDA in the past, but I don't actually know.I've typed it all out here and in discord in case it helps anybody else.

The below pictures are to show my environment before uninstalling all those whatnots.

Screenshot 2023-07-26 152636 Screenshot 2023-07-26 152723 Screenshot 2023-07-26 152620

ptmarks commented 1 year ago

That worked, thanks! I already have the SDXL1.0 downloaded so skipped that part of the install. Where do I need to put the model for Swarm?

From: mcmonkey4eva Sent: Wednesday, July 26, 2023 3:29 PM To: Stability-AI/StableSwarmUI Cc: ptmarks; Mention Subject: Re: [Stability-AI/StableSwarmUI] Installation Error: Windows 11(Issue #2)

@ptmarks that's a different error - simple code error, fixed with the above commit — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

ptmarks commented 1 year ago

I found the models folder, so should be good. I’m not sure where to place the Lora file or how to invoke it. Normally in Automatic1111 I drop it into a Lora folder and then reference the name of the Lora in the prompt. Does it work the same way in Swarm?

Thanks again.

From: mcmonkey4eva Sent: Wednesday, July 26, 2023 3:29 PM To: Stability-AI/StableSwarmUI Cc: ptmarks; Mention Subject: Re: [Stability-AI/StableSwarmUI] Installation Error: Windows 11(Issue #2)

@ptmarks that's a different error - simple code error, fixed with the above commit — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

mcmonkey4eva commented 1 year ago

native support for LoRAs is TODO, however:

ptmarks commented 1 year ago

Thanks, I was able to add and use the LoRA node earlier today. I’m only just learning Comfy; I’ve been on Automatic1111 since I started. Your interface is very good, and better than most of the ComfyUI variations out there. I haven’t been able to stress out my GPUs; barely using any VRAM on either my 4090 or 3080. Do you have any suggestions for how to stress test the multi-GPU feature Swarm has?My main thing with Automatic1111 is Deforum. I work mainly on animation, using multi-ControlNet.  Just generating images Midjourney style isn’t my focus, and without ControlNet options for SDXL, I will still focus on 1.5 models. I think the most useful SDXL function for me now will be to create seed images I can feed back into Deforum either as guided images or init images to drive the animations’ styles.Thanks again for a great product, even as an alpha.On Jul 26, 2023, at 6:26 PM, mcmonkey4eva @.***> wrote: native support for LoRAs is TODO, however:

if you're using the Comfy backend, just pop over to the Comfy Workflow tab, and add a LoRA node and you're good. if you're using the Auto WebUI backend, just add the lora name in the prompt, like

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

mcmonkey4eva commented 1 year ago

To do a stress-test to see what your multiple GPUs can do, just generate a large batch (set "Images" high) or use the Grid Generator tool.

(Make sure you have both GPUs enabled as backends first btw)

Native integration and/or extensions for tools like Deforum is long-term goal, but not during the alpha stage.

btw if you have more questions please open a post on the Discussions tab, so you're not hijacking Feanix's issue post further.

mcmonkey4eva commented 1 year ago

I found out why the .net install issues! If you had a 32-bit copy of .net installed in the past, windows favors that and ignores the 64-bit version -- I've fixed it to now force a preference for 64-bit, so it should Just Work :tm: !