Browse Source

Merge remote-tracking branch 'origin/inference' into inference

pull/165/head
JT 1 year ago
parent
commit
0d78574b37
  1. 3
      StabilityMatrix.Avalonia/Helpers/PngDataHelper.cs
  2. 4
      StabilityMatrix.Core/Inference/ComfyClient.cs

3
StabilityMatrix.Avalonia/Helpers/PngDataHelper.cs

@ -27,6 +27,9 @@ public static class PngDataHelper
var imageWidth = BitConverter.ToInt32(imageWidthBytes.Reverse().ToArray()); var imageWidth = BitConverter.ToInt32(imageWidthBytes.Reverse().ToArray());
var imageHeight = BitConverter.ToInt32(imageHeightBytes.Reverse().ToArray()); var imageHeight = BitConverter.ToInt32(imageHeightBytes.Reverse().ToArray());
generationParameters.Width = imageWidth;
generationParameters.Height = imageHeight;
var idatIndex = SearchBytes(inputImage, Idat); var idatIndex = SearchBytes(inputImage, Idat);
var iendIndex = SearchBytes(inputImage, Iend); var iendIndex = SearchBytes(inputImage, Iend);

4
StabilityMatrix.Core/Inference/ComfyClient.cs

@ -80,9 +80,11 @@ public class ComfyClient : InferenceClientBase
Path = "/ws", Path = "/ws",
Query = $"clientId={ClientId}" Query = $"clientId={ClientId}"
}.Uri; }.Uri;
webSocketClient = new WebsocketClient(wsUri) webSocketClient = new WebsocketClient(wsUri)
{ {
ReconnectTimeout = TimeSpan.FromSeconds(30), Name = "ComfyClient",
ReconnectTimeout = TimeSpan.FromSeconds(30)
}; };
webSocketClient.DisconnectionHappened.Subscribe( webSocketClient.DisconnectionHappened.Subscribe(

Loading…
Cancel
Save