File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/BuiltinExtensions/ComfyUIBackend Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,8 @@ async Task doInterruptNow()
359359 if ( output is not null )
360360 {
361361 user_input . ReceiveRawBackendData ? . Invoke ( "comfy_websocket" , output ) ;
362- if ( Encoding . ASCII . GetString ( output , 0 , 8 ) == "{\" type\" :" )
362+ string firstChunk = Encoding . ASCII . GetString ( output , 0 , 8 ) ;
363+ if ( firstChunk == "{\" type\" :" || firstChunk == "{ \" type\" " )
363364 {
364365 JObject json = Utilities . ParseToJson ( Encoding . UTF8 . GetString ( output ) ) ;
365366 if ( Logs . MinimumLevel <= Logs . LogLevel . Verbose )
Original file line number Diff line number Diff line change @@ -153,7 +153,8 @@ public void RunClientReceiveTask()
153153 return ;
154154 }
155155 // TODO: This is hacky message type detection. Maybe backend should actually pay attention to this properly?
156- if ( Encoding . ASCII . GetString ( data , 0 , 8 ) == "{\" type\" :" )
156+ string firstChunk = Encoding . ASCII . GetString ( data , 0 , 8 ) ;
157+ if ( firstChunk == "{\" type\" :" || firstChunk == "{ \" type\" " )
157158 {
158159 JObject jmessage = StringConversionHelper . UTF8Encoding . GetString ( data ) . ParseToJson ( ) ;
159160 string jtype = $ "{ jmessage [ "type" ] } ";
You can’t perform that action at this time.
0 commit comments