Skip to content

Commit

Permalink
Ver109 Show progress
Browse files Browse the repository at this point in the history
Show progress <br />
Ver109 work for Automatic1111 2022/11/05 02:00 UTC version<br />
https://github.com/AUTOMATIC1111/stable-diffusion-webui/tree/30b1bcc64e67ad50c5d3af3a6fe1bd1e9553f34e
  • Loading branch information
Invary authored and Invary committed Nov 5, 2022
1 parent 9388173 commit dd48255
Show file tree
Hide file tree
Showing 9 changed files with 221 additions and 48 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Recently, Automatic1111 changes its API specifications every few days. <br />
As a result, there are times when an error occurs and the IvyPhotoshopDiffusion does not work. <br />
In this case, please use the version of Automatic1111 that is a few days old. <br />

Ver108 works on latest version of Automatic1111 (2022/11/05 01:00 UTC)<br />
Ver109 works on latest version of Automatic1111 (2022/11/05 02:00 UTC)<br />

<br />

Expand Down Expand Up @@ -84,6 +84,11 @@ see [Documents](https://github.com/Invary/IvyPhotoshopDiffusion/tree/main/doc) p

## Changelog

- Ver109 <br />
Show progress <br />
Ver109 work for Automatic1111 2022/11/05 02:00 UTC version<br />
https://github.com/AUTOMATIC1111/stable-diffusion-webui/tree/30b1bcc64e67ad50c5d3af3a6fe1bd1e9553f34e

- Ver108 <br />
Support dynamic prompts <br />
Add option enable/disable wildcards and dynamic prompts <br />
Expand Down
10 changes: 10 additions & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@

<br />

## Windows protect your PC

If such a message appears at runtime after installation, it must be unlocked. <br />
Right-click on the executable file, select "Properties," and "Unlock". <br />

<img src="https://raw.githubusercontent.com/Invary/IvyPhotoshopDiffusion/main/doc/res/doc05_locked.png" width="300" />

<br />


## Background color in photoshop

Transparent background cannot use. <br />
Expand Down
Binary file added doc/res/doc05_locked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/res/doc05_unlock_security.mp4
Binary file not shown.
45 changes: 45 additions & 0 deletions src/IvyPhotoshopDiffusion/Automatic1111.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,32 @@ public static JsonResponseImg2Img SendImg2Img(JsonRequestImg2Img objJson)







public static JsonResponseProgress SendGetProgress()
{
var url = $"{XmlSetting.Current.Automatic1111ApiUrl}/sdapi/v1/progress";

var request = WebRequest.Create(url);
request.Method = "GET";

using (var response = request.GetResponse())
{
using (var respStream = response.GetResponseStream())
using (var reader = new StreamReader(respStream))
{
string jsonresponse = reader.ReadToEnd();

return JsonSerializer.Deserialize<JsonResponseProgress>(jsonresponse);
}
}
}




//extra check code
//{
// JsonRequestExtra objJson = new JsonRequestExtra();
Expand Down Expand Up @@ -539,6 +565,25 @@ public class JsonResponseInfo



public class JsonResponseProgress
{
public float progress { get; set; }
public float eta_relative { get; set; }
public JsonResponseProgressState state { get; set; }
//public object current_image { get; set; }
}

public class JsonResponseProgressState
{
public bool skipped { get; set; }
public bool interrupted { get; set; }
public string job { get; set; }
public int job_count { get; set; }
public int job_no { get; set; }
public int sampling_step { get; set; }
public int sampling_steps { get; set; }
}



}
Loading

0 comments on commit dd48255

Please sign in to comment.