mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-07 10:17:31 +08:00
Fix crash on 1x1 px images
This commit is contained in:
parent
30f1baa9a6
commit
7135346488
@ -695,7 +695,7 @@ def _render_shader_batch(
|
|||||||
gl.glBindTexture(gl.GL_TEXTURE_2D, tex)
|
gl.glBindTexture(gl.GL_TEXTURE_2D, tex)
|
||||||
data = gl.glGetTexImage(gl.GL_TEXTURE_2D, 0, gl.GL_RGBA, gl.GL_FLOAT)
|
data = gl.glGetTexImage(gl.GL_TEXTURE_2D, 0, gl.GL_RGBA, gl.GL_FLOAT)
|
||||||
img = np.frombuffer(data, dtype=np.float32).reshape(height, width, 4)
|
img = np.frombuffer(data, dtype=np.float32).reshape(height, width, 4)
|
||||||
batch_outputs.append(np.ascontiguousarray(img[::-1, :, :]))
|
batch_outputs.append(img[::-1, :, :].copy())
|
||||||
|
|
||||||
# Pad with black images for unused outputs
|
# Pad with black images for unused outputs
|
||||||
black_img = np.zeros((height, width, 4), dtype=np.float32)
|
black_img = np.zeros((height, width, 4), dtype=np.float32)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user