icon
Personal Website

Weekly Coding • 2025-08-11

Hello everyone. It's time for my weekly report.

::My Projects::

  • LeetCode 🖥️ 1 hour
    • Completed two problems and reached problem number 130 in order.
  • Drawing 🖼️ 7 hours
    • Started working on a large digital drawing. Need to continue this week.

::Optimizing Stable Diffusion on Windows::

I will share my optimizations for running the image generation model, Stable Diffusion, on Windows 11 to achieve the best performance. The key factor for an image generator is video memory. We've noticed a peculiarity: many programs on Windows 11 consume video memory excessively. Despite numerous complaints online about high memory usage, there is no clear explanation. To identify memory-hungry applications, you need to enable the "Dedicated GPU Memory" column in Task Manager, which is hidden by default. Here's the list of optimizations:

  • Add command-line arguments for ComfyUI
    • --use-split-cross-attention --novram
  • Disable Hardware Acceleration for specific programs:
    • Browser
    • VS Code
    • Windows Terminal
    • Steam
  • Use Flux and SD 3.5 models
    • Download fp8 versions, ignore fp16 versions.

For the browser, further adjustments are required: first, disable Smooth Scrolling as it will cause severe lag without hardware acceleration on many pages. Additionally, set up a separate instance of the browser for video playback and use this dedicated browser only for videos, avoiding any other tasks.

As a result, you can work with any models seamlessly and without lags on a graphics card with 16 GB VRAM.