Skip to content

Commit 2543b64

Browse files
committed
Update blog
1 parent 125c319 commit 2543b64

17 files changed

+17
-0
lines changed

content/blog/2024-09-04-1725463249.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tags:
99
- performance
1010
- featured
1111
---
12+
1213
**tl;dr**: Explored a possible optimization for Flux with `diffusers` when using `enable_sequential_cpu_offload()`. It did not work.
1314

1415
While trying to use Flux (nearly 22 GB of weights) with `diffusers` on a 12 GB graphics card, I noticed that it barely used any GPU memory when using `enable_sequential_cpu_offload()`. And it was super slow. It turns out that the largest module in Flux's transformer model is around 108 MB, so because diffusers streams modules one-at-a-time, the peak VRAM usage never crossed above a few hundred MBs.

content/blog/2024-10-16-1729102225.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tags:
1111
- performance
1212
- featured
1313
---
14+
1415
**tl;dr** - *Today, I worked on using stable-diffusion.cpp in a simple C++ program. As a linked library, as well as compiling sd.cpp from scratch (with and without CUDA). The intent was to get a tiny and fast-starting executable UI for Stable Diffusion working. Also, ChatGPT is very helpful!*
1516

1617
## Part 1: Using sd.cpp as a library

content/blog/2024-11-19-1732043895.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ tags:
66
- easydiffusion
77
- stable-diffusion
88
---
9+
910
Spent a few days getting a C++ based version of Easy Diffusion working, using stable-diffusion.cpp. I'm working with a fork of stable-diffusion.cpp [here](https://github.com/cmdr2/stable-diffusion.cpp), to add a few changes like per-step callbacks, live image previews etc.
1011

1112
It doesn't have a UI yet, and currently hardcodes a model path. It exposes a RESTful API server (written using the `Crow` C++ library), and uses a simple task manager that runs image generation tasks on a thread. The generated images are available at an API endpoint, and it shows the binary JPEG/PNG image (instead of base64 encoding).

content/blog/2024-11-21-1732202276.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tags:
77
- stable-diffusion
88
- c++
99
---
10+
1011
Spent some more time on the [v4 experiments](https://github.com/cmdr2/easy-diffusion4) for Easy Diffusion (i.e. C++ based, fast-startup, lightweight). `stable-diffusion.cpp` is missing a few features, which will be necessary for Easy Diffusion's typical workflow. I wasn't keen on forking stable-diffusion.cpp, but it's probably faster to work on [a fork](https://github.com/cmdr2/stable-diffusion.cpp) for now.
1112

1213
For now, I've added live preview and per-step progress callbacks (based on a few pending pull-requests on sd.cpp). And protection from `GGML_ASSERT` killing the entire process. I've been looking at the ability to load individual models (like the vae) without needing to reload the entire SD model.

content/blog/2024-12-14-1734205658.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ tags:
88
- design
99
- v4
1010
---
11+
1112
Worked on a few UI design ideas for Easy Diffusion v4. I've uploaded the work-in-progress mockups at [https://github.com/easydiffusion/files](https://github.com/easydiffusion/files).
1213

1314
So far, I've mocked out the design for the outer skeleton. That is, the new tabbed interface, the status bar, and the unified main menu. I also worked on how they would look like on mobile devices.

content/blog/2024-12-17-1734433390.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tags:
77
- v4
88
- ui
99
---
10+
1011
Notes on two directions for ED4's UI that I'm unlikely to continue on.
1112

1213
One is to start a desktop app with a full-screen webview (for the app UI). The other is writing the tabbed browser-like shell of ED4 in a compiled language (like Go or C++) and loading the contents of the tabs as regular webpages (by using webviews). So it would load URLs like `http://localhost:9000/ui/image_editor` and `http://localhost:9000/ui/settings` etc.

content/blog/2025-01-03-1735918711.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tags:
77
- ui
88
- v4
99
---
10+
1011
Spent a few days prototyping a UI for Easy Diffusion v4. Files are at [this repo](https://github.com/easydiffusion/files/blob/main/ED4-ui-design/prototype).
1112

1213
The main focus was to get a simple but pluggable UI, that was backed by a reactive data model, and to allow splitting the codebase into individual components (with their own files). And require only a text editor and a browser to develop, i.e. no compilation or nodejs-based developer experiences.

content/blog/2025-01-04-1736020626.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tags:
77
- amd
88
- directml
99
---
10+
1011
Spent most of the day doing some support work for Easy Diffusion, and experimenting with [torch-directml](https://pypi.org/project/torch-directml/) for AMD support on Windows.
1112

1213
From the initial experiments, torch-directml seems to work properly with Easy Diffusion. I ran it on my NVIDIA card, and another user ran it on their AMD Radeon RX 7700 XT.

content/blog/2025-01-13-1736779606.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ tags:
88
- torch
99
- ml
1010
---
11+
1112
Spent the last few days writing [torchruntime](https://github.com/easydiffusion/torchruntime), which will automatically install the correct torch distribution based on the user's OS and graphics card. This package was written by extracting this logic out of Easy Diffusion, and refactoring it into a cleaner implementation (with tests).
1213

1314
It can be installed (on Win/Linux/Mac) using `pip install torchruntime`.

content/blog/2025-01-17-1737134382.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ tags:
88
- easydiffusion
99
- torchruntime
1010
---
11+
1112
*Continued in [Part 2](https://cmdr2.github.io/notes/2025/01/1737566382/), where I figured out how to include the required libraries in the wheel.*
1213

1314
Spent all of yesterday trying to compile `pytorch` with the compile-time `PYTORCH_ROCM_ARCH=gfx803` environment variable.

0 commit comments

Comments
 (0)