Skip to content

Slider property update freezes UI in Gradio ≥6.6.0 (works in 6.5.1) #12995

@Iagnyshev-Pavel

Description

@Iagnyshev-Pavel

Describe the bug

Updating slider properties (visibility and range) via a button callback causes the UI to freeze in Gradio versions 6.6.0 and newer.

The same code works correctly in 6.5.1.

When the button is clicked, the page stops responding and the UI becomes stuck. No Python exception is shown in the backend.

Steps to Reproduce

Run the script

Open the UI in browser

Click "Show" button to update Sliders

Expected Behavior

Sliders become visible and their ranges update:

slider1: 0–10 (value 5)

slider2: 100–200 (value 150)

Actual Behavior

The page freezes and stops responding after clicking the button.

Environment

Gradio: 6.9.0

Python: (3.12)

Browser: (Chrome Version 146.0.7680.72 (Official Build) (64-bit) / Edge)

OS: (Linux WSL)

Regression

✅ Works in 6.5.1

❌ Broken in 6.6.0+

Additional Notes

The issue appears related to updating multiple slider properties (visible, minimum, maximum, value) using gr.update() and gr.Slider().

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

def show_sliders():
    print("clicked")
    return gr.update(visible=True), gr.update(visible=True)

with gr.Blocks() as demo:
    btn = gr.Button("Show")

    s1 = gr.Slider(0, 1, value=0, visible=False)
    s2 = gr.Slider(0, 1, value=0, visible=False)

    btn.click(show_sliders, None, [s1, s2])

demo.launch(debug=True)
import gradio as gr


def show_sliders():
    print("clicked")
    return gr.Slider(minimum=0, maximum=10, value=5, visible=True), gr.Slider(
        minimum=100, maximum=200, value=150, visible=True
    )


with gr.Blocks() as demo:
    btn = gr.Button("Show")

    s1 = gr.Slider(0, 1, value=0, visible=False)
    s2 = gr.Slider(0, 1, value=0, visible=False)

    btn.click(show_sliders, None, [s1, s2])

demo.launch(debug=True)

Screenshot

No response

Logs

System Info

Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 6.9.0
gradio_client version: 2.3.0

Severity

I can work around it

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions