Skip to content

Commit c191336

Browse files
author
Lu Teng
authored
[Example] Fix SD crash in multi-instances (#390)
1 parent f4716be commit c191336

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

example/sdxl/inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ def nrmse(source, target):
127127
return 1 - rmse / 255
128128

129129
if args.accuracy:
130-
source = np.array(Image.open("castle.png"))
130+
source = np.array(images[0])
131131
target = np.array(Image.open("target.png"))
132132
print("RMSE accuracy is: {:.3f}".format(nrmse(source, target)), file=sys.stderr)

example/stable_diffusion/jax_stable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,6 @@ def nrmse(source, target):
111111
return 1 - rmse / 255
112112

113113
if args.accuracy:
114-
source = np.array(Image.open("img.png"))
114+
source = np.array(images[0])
115115
target = np.array(Image.open("target.png"))
116116
print("RMSE accuracy is: {:.3f}".format(nrmse(source, target)), file=sys.stderr)

0 commit comments

Comments
 (0)