Skip to content

Commit

Permalink
XYZ plot do not fail if an exception occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Aug 1, 2023
1 parent 07be13c commit 401ba1b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/xyz_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import modules.scripts as scripts
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.shared import opts, state
import modules.shared as shared
Expand Down Expand Up @@ -651,7 +651,12 @@ def cell(x, y, z, ix, iy, iz):
y_opt.apply(pc, y, ys)
z_opt.apply(pc, z, zs)

res = process_images(pc)
try:
res = process_images(pc)
except Exception as e:
errors.display(e, "generating image for xyz plot")

res = Processed(p, [], p.seed, "")

# Sets subgrid infotexts
subgrid_index = 1 + iz
Expand Down

0 comments on commit 401ba1b

Please sign in to comment.