mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-20 01:48:21 +02:00
Updated old comments of doMakeImage to better reflect the updated reading process.
This commit is contained in:
parent
662644663e
commit
d336ead3b1
@ -506,9 +506,8 @@ async function doMakeImage(task) {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// hack for a middleman buffering all the streaming updates, and unleashing them on the poor browser in one shot.
|
// hack for a middleman buffering all the streaming updates, and unleashing them on the poor browser in one shot.
|
||||||
// this results in having to parse JSON like {"step": 1}{"step": 2}...{"status": "succeeded"..}
|
// this results in having to parse JSON like {"step": 1}{"step": 2}...{"status": "succeeded"..} which is obviously invalid.
|
||||||
// which is obviously invalid.
|
// So we need to extract only the next {} section
|
||||||
// So we need to just extract the last {} section, starting from "status" to the end of the response
|
|
||||||
if (finalJSON.length > 0) {
|
if (finalJSON.length > 0) {
|
||||||
// Append new data when required
|
// Append new data when required
|
||||||
if (jsonStr.length > 0) {
|
if (jsonStr.length > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user