diff --git a/modules/caption/vqa_detection.py b/modules/caption/vqa_detection.py index 8b03e21c9..17cc4e89b 100644 --- a/modules/caption/vqa_detection.py +++ b/modules/caption/vqa_detection.py @@ -313,7 +313,7 @@ def draw_bounding_boxes(image: Image.Image, detections: list, points: list | Non # Try to load a font, fall back to default if unavailable try: font_size = max(12, int(min(width, height) * 0.02)) - font_path = shared.opts.font or os.path.join(script_path, "ui", "fonts", "notosans-nerdfont-regular.ttf") + font_path = shared.opts.font or os.path.join(script_path, "ui", "css", "ubuntu-nerdfont.ttf") font = ImageFont.truetype(font_path, size=font_size) except Exception: font = ImageFont.load_default() diff --git a/modules/image/grid.py b/modules/image/grid.py index dbd4bbda6..374fe0ea1 100644 --- a/modules/image/grid.py +++ b/modules/image/grid.py @@ -146,9 +146,9 @@ class GridAnnotation: def get_font(fontsize: float): try: - return ImageFont.truetype(shared.opts.font or os.path.join(script_path, "ui", "fonts", "notosans-nerdfont-regular.ttf"), fontsize) + return ImageFont.truetype(shared.opts.font or os.path.join(script_path, "ui", "css", "ubuntu-nerdfont.ttf"), fontsize) except Exception: - return ImageFont.truetype(os.path.join(script_path, "ui", "fonts", "notosans-nerdfont-regular.ttf"), fontsize) + return ImageFont.truetype(os.path.join(script_path, "ui", "css", "ubuntu-nerdfont.ttf"), fontsize) def draw_grid_annotations(im: Image.Image, width: int, height: int, x_texts: list[list[GridAnnotation]], y_texts: list[list[GridAnnotation]], margin=0, title: list[GridAnnotation] | None = None): diff --git a/modules/progress.py b/modules/progress.py index 263bc6342..cd6a52d4f 100644 --- a/modules/progress.py +++ b/modules/progress.py @@ -116,8 +116,6 @@ def api_progress(req: ProgressRequest): try: buffered = io.BytesIO() shared.state.current_image.save(buffered, format='jpeg', quality=60) - fn = f'/tmp/preview-{shared.state.preview_job}-{shared.state.current_image_sampling_step}.jpg' - shared.state.current_image.save(fn, quality=90) b64 = base64.b64encode(buffered.getvalue()) live_preview = f'data:image/jpeg;base64,{b64.decode("ascii")}' except Exception: