From fbc1f66805a34ccbdb1e35243b0336e0b4baea37 Mon Sep 17 00:00:00 2001 From: Pablo Hellmann Date: Wed, 17 Jun 2026 16:00:03 +0200 Subject: [PATCH] Revert "Ruff fixes" This reverts commit 10145f7f2b76c1d8ca34b9d979f5192565710eb5. --- modules/api/preview.py | 4 ++-- modules/ui_definitions.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/api/preview.py b/modules/api/preview.py index f38643065..9a55abbf2 100644 --- a/modules/api/preview.py +++ b/modules/api/preview.py @@ -8,7 +8,7 @@ class PreviewManager: """Manages WebSocket connections for step-based live preview streaming. Each denoising step, diffusers_callback calls push_step() from the - generation thread. Image encoding happens there (non-blocking for + generation thread. Image encoding happens there (non‑blocking for TAESD, the default preview method) and the binary JPEG + JSON progress are dispatched to the event loop via run_coroutine_threadsafe(). """ @@ -39,7 +39,7 @@ class PreviewManager: self._client_hidden = not data.get('visible', True) # ------------------------------------------------------------------ - # Push from generation thread (thread-safe) + # Push from generation thread (thread‑safe) # ------------------------------------------------------------------ def push_step(self, step: int, steps: int, state): diff --git a/modules/ui_definitions.py b/modules/ui_definitions.py index a4215b24e..abac5d06b 100644 --- a/modules/ui_definitions.py +++ b/modules/ui_definitions.py @@ -567,7 +567,7 @@ def create_settings(cmd_opts): options_templates.update(options_section(('live-preview', "Live Previews"), { "show_progress_every_n_steps": OptionInfo(1, "Live preview display period", gr.Slider, {"minimum": 0, "maximum": 20, "step": 1, "visible": False}), "show_progress_type": OptionInfo("TAESD", "Live preview method", gr.Dropdown, {"choices": ["None", "Simple", "Approximate", "TAESD", "Full"]}), - "live_preview_refresh_period": OptionInfo(500, "Progress update period (ms)", gr.Slider, {"minimum": 0, "maximum": 5000, "step": 25}), + "live_preview_refresh_period": OptionInfo(500, "Progress update period of polling (ms)", gr.Slider, {"minimum": 0, "maximum": 5000, "step": 25}), "live_preview_transport": OptionInfo("Polling", "Preview transport", gr.Dropdown, {"choices": ["Polling", "WebSocket"]}), "live_preview_ws_interval": OptionInfo(1, "WebSocket preview step interval", gr.Slider, {"minimum": 1, "maximum": 20, "step": 1}), "taesd_variant": OptionInfo(shared_items.sd_taesd_items()[0], "TAESD variant", gr.Dropdown, {"choices": shared_items.sd_taesd_items()}),