Browse Source

Add Progress api models

pull/5/head
Ionite 2 years ago
parent
commit
73613bb36b
No known key found for this signature in database
  1. 9
      StabilityMatrix/Models/Api/ProgressRequest.cs
  2. 24
      StabilityMatrix/Models/Api/ProgressResponse.cs

9
StabilityMatrix/Models/Api/ProgressRequest.cs

@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace StabilityMatrix.Models.Api;
public class ProgressRequest
{
[JsonPropertyName("skip_current_image")]
public bool? SkipCurrentImage { get; set; }
}

24
StabilityMatrix/Models/Api/ProgressResponse.cs

@ -0,0 +1,24 @@
using System.Text.Json.Serialization;
namespace StabilityMatrix.Models.Api;
public class ProgressResponse
{
// Range from 0 to 1
[JsonPropertyName("progress")]
public float Progress { get; set; }
// ETA in seconds
[JsonPropertyName("eta_relative")]
public float EtaRelative { get; set; }
// state: dict
// The current image in base64 format. opts.show_progress_every_n_steps is required for this to work
[JsonPropertyName("current_image")]
public string? CurrentImage { get; set; }
[JsonPropertyName("textinfo")]
public string? TextInfo { get; set; }
}
Loading…
Cancel
Save