Skip to content

Commit 0afb4ca

Browse files
committed
Fix crash display
Output tuple was changed; also, fix text so it isn't black-on-black with light UI theme
1 parent a6452fb commit 0afb4ca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

webui.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,9 @@ def sample(init_data, x, conditioning, unconditional_conditioning, sampler_name)
599599
return output_images, seed, info, stats
600600
except RuntimeError as e:
601601
err = e
602-
err_msg = f'CRASHED:<br><textarea rows="5" style="background: black;width: -webkit-fill-available;font-family: monospace;font-size: small;font-weight: bold;">{str(e)}</textarea><br><br>Please wait while the program restarts.'
602+
err_msg = f'CRASHED:<br><textarea rows="5" style="color:white;background: black;width: -webkit-fill-available;font-family: monospace;font-size: small;font-weight: bold;">{str(e)}</textarea><br><br>Please wait while the program restarts.'
603603
stats = err_msg
604-
return [], 1
604+
return [], seed, 'err', stats
605605
finally:
606606
if err:
607607
crash(err, '!!Runtime error (txt2img)!!')
@@ -816,9 +816,9 @@ def sample(init_data, x, conditioning, unconditional_conditioning, sampler_name)
816816
return output_images, seed, info, stats
817817
except RuntimeError as e:
818818
err = e
819-
err_msg = f'CRASHED:<br><textarea rows="5" style="background: black;width: -webkit-fill-available;font-family: monospace;font-size: small;font-weight: bold;">{str(e)}</textarea><br><br>Please wait while the program restarts.'
819+
err_msg = f'CRASHED:<br><textarea rows="5" style="color:white;background: black;width: -webkit-fill-available;font-family: monospace;font-size: small;font-weight: bold;">{str(e)}</textarea><br><br>Please wait while the program restarts.'
820820
stats = err_msg
821-
return [], 1
821+
return [], seed, 'err', stats
822822
finally:
823823
if err:
824824
crash(err, '!!Runtime error (img2img)!!')

0 commit comments

Comments
 (0)