mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-01 20:35:06 +08:00
XYZ plot do not fail if an exception occurs
This commit is contained in:
parent
07be13caa3
commit
401ba1b879
@ -11,7 +11,7 @@ import numpy as np
|
|||||||
import modules.scripts as scripts
|
import modules.scripts as scripts
|
||||||
import gradio as gr
|
import gradio as gr
|
||||||
|
|
||||||
from modules import images, sd_samplers, processing, sd_models, sd_vae, sd_samplers_kdiffusion
|
from modules import images, sd_samplers, processing, sd_models, sd_vae, sd_samplers_kdiffusion, errors
|
||||||
from modules.processing import process_images, Processed, StableDiffusionProcessingTxt2Img
|
from modules.processing import process_images, Processed, StableDiffusionProcessingTxt2Img
|
||||||
from modules.shared import opts, state
|
from modules.shared import opts, state
|
||||||
import modules.shared as shared
|
import modules.shared as shared
|
||||||
@ -651,7 +651,12 @@ class Script(scripts.Script):
|
|||||||
y_opt.apply(pc, y, ys)
|
y_opt.apply(pc, y, ys)
|
||||||
z_opt.apply(pc, z, zs)
|
z_opt.apply(pc, z, zs)
|
||||||
|
|
||||||
|
try:
|
||||||
res = process_images(pc)
|
res = process_images(pc)
|
||||||
|
except Exception as e:
|
||||||
|
errors.display(e, "generating image for xyz plot")
|
||||||
|
|
||||||
|
res = Processed(p, [], p.seed, "")
|
||||||
|
|
||||||
# Sets subgrid infotexts
|
# Sets subgrid infotexts
|
||||||
subgrid_index = 1 + iz
|
subgrid_index = 1 + iz
|
||||||
|
Loading…
Reference in New Issue
Block a user