Comfy-Org/ComfyUI · error · RuntimeError
Framebuffer is not complete
Error message
Framebuffer is not complete
What it means
Raised in _render_shader_batch() after attaching one RGBA32F texture per output to the FBO and calling glDrawBuffers() with all color attachments; glCheckFramebufferStatus() did not report GL_FRAMEBUFFER_COMPLETE. With MRT of float textures the two usual causes are: num_outputs exceeding GL_MAX_COLOR_ATTACHMENTS, or the driver not treating RGBA32F as color-renderable without EXT_color_buffer_float.
Source
Thrown at comfy_extras/nodes_glsl.py:474
# Create framebuffer with only the needed color attachments
fbo = gl.glGenFramebuffers(1)
gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, fbo)
draw_buffers = []
for i in range(num_outputs):
tex = gl.glGenTextures(1)
output_textures.append(tex)
gl.glBindTexture(gl.GL_TEXTURE_2D, tex)
gl.glTexImage2D(gl.GL_TEXTURE_2D, 0, gl.GL_RGBA32F, width, height, 0, gl.GL_RGBA, gl.GL_FLOAT, None)
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR)
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR)
gl.glFramebufferTexture2D(gl.GL_FRAMEBUFFER, gl.GL_COLOR_ATTACHMENT0 + i, gl.GL_TEXTURE_2D, tex, 0)
draw_buffers.append(gl.GL_COLOR_ATTACHMENT0 + i)
gl.glDrawBuffers(num_outputs, draw_buffers)
if gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER) != gl.GL_FRAMEBUFFER_COMPLETE:
raise RuntimeError("Framebuffer is not complete")
# Create ping-pong resources for multi-pass rendering
if num_passes > 1:
for _ in range(2):
pp_tex = gl.glGenTextures(1)
ping_pong_textures.append(pp_tex)
gl.glBindTexture(gl.GL_TEXTURE_2D, pp_tex)
gl.glTexImage2D(gl.GL_TEXTURE_2D, 0, gl.GL_RGBA32F, width, height, 0, gl.GL_RGBA, gl.GL_FLOAT, None)
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR)
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR)
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_EDGE)
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_EDGE)
pp_fbo = gl.glGenFramebuffers(1)
ping_pong_fbos.append(pp_fbo)
gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, pp_fbo)
gl.glFramebufferTexture2D(gl.GL_FRAMEBUFFER, gl.GL_COLOR_ATTACHMENT0, gl.GL_TEXTURE_2D, pp_tex, 0)
gl.glDrawBuffers(1, [gl.GL_COLOR_ATTACHMENT0])View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Reduce the number of outputs of the GLSL node (split the effect across two nodes/stages).
- Verify EXT_color_buffer_float is present (glGetString(GL_EXTENSIONS) / the log line printed at context init); if absent, update drivers or use a GPU/driver stack that exposes it.
- Confirm width and height are > 0 and within GL_MAX_TEXTURE_SIZE.
- On software rendering, switch to a real GPU or accept fewer outputs.
Defensive patterns
Strategy: validation
Validate before calling
# Before configuring many outputs, check the driver limit (needs a live GL context): # max_attachments = gl.glGetIntegerv(gl.GL_MAX_COLOR_ATTACHMENTS) # assert num_outputs <= max_attachments # assert 'EXT_color_buffer_float' in gl.glGetString(gl.GL_EXTENSIONS) num_outputs = 4 # keep conservative; most drivers guarantee >= 4
Try / catch
try:
out = run_glsl(...)
except RuntimeError as e:
if "Framebuffer is not complete" in str(e):
raise ValueError("Reduce the node's output count or use a driver with EXT_color_buffer_float") from e
raise Prevention
- Keep MRT output counts small (<= 4) for portability.
- Confirm EXT_color_buffer_float is listed in the context init log line before relying on float outputs.
- Avoid 0-sized width/height inputs.
When it happens
Trigger: A GLSL node configured with more outputs than the implementation supports (software/older drivers commonly cap at 4-8 color attachments); GLES3.0 contexts lacking EXT_color_buffer_float where rendering to GL_RGBA32F is illegal; width/height of 0.
Common situations: Requesting 8-16 outputs from one fragment shader on Mesa llvmpipe or embedded drivers; running on a GLES3 context where only half-float rendering is guaranteed.
Related errors
- Ping-pong framebuffer is not complete
- eglCreatePbufferSurface() failed
- eglCreateContext() failed
- eglMakeCurrent() failed
- eglMakeCurrent() failed (EGL error: 0x{err:04X})
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/4182837dd1f0158a.
Report an issue: GitHub.