Skip to content

Instantly share code, notes, and snippets.

@rhasselbaum
rhasselbaum / Stable Diffusion WebUI on AMD Radeon RX 5700 XT.md
Last active January 30, 2024 17:38
Stable Diffusion WebUI on AMD Radeon RX 5700 XT

Docker must be installed and working.

In shell:

docker pull rocm/pytorch:rocm5.2_ubuntu20.04_py3.7_pytorch_1.11.0_navi21
docker run -it --name stable-diffusion-webui --network=host --device=/dev/kfd --device=/dev/dri \
  --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
  -v $HOME/dev/stable-diffusion-docker:/dockerx rocm/pytorch:rocm5.2_ubuntu20.04_py3.7_pytorch_1.11.0_navi21

Alternatively, replace --network=host with a different network if you don't want the container sharing the host's interface.

@rhasselbaum
rhasselbaum / Home Assistant Kumo Cloud Integration Notes.md
Last active January 20, 2024 15:21
Home Assistant Kumo Cloud Integration Notes

So I recently upgraded my router and wireless access points at home and thought it would be a great time to change my WPA password because it'd been the same since... too long. Most of my IoT devices moved over without too much hassle except my Mitsubishi mini-splits. These connect to Home Assistant through the awesome Kumo Cloud HACS integration. I knew they would be a pain, since they require 2.4GHz and the wifi modules aren't physically accessible without taking the devices apart so if anything went horribly wrong, I wouldn't be able to reset them easily.

Things went horribly wrong.

Fortunately, after a call to Mitsubishi and a LOT of messing around with the Kumo Cloud app, I'm back up and running without needinng to crack open the units. Here are some lessons learned in case they help others (or me in 6 months!).

  1. Assign static IPs to the units on your DHCP server. No, really. I know the HA integration doc says it will update the IP addresses when you restart
@rhasselbaum
rhasselbaum / GoogleMusicPlayListExport.md
Last active February 15, 2021 15:24
Export Google Music Playlists to M3U

Recently, I decided to migrate my music library from Google Play Music to a self-hosted server running Subsonic. Only problem is I have a bunch of playlists, and Google provides no way to export those into any format that Subsonic can consume (m3u, pls, xspf). I also couldn't find an unofficial tool to do this. The best I could find was a handy app in the Play store called Playlist Backup. It can't export playlists for music stored remotely at Google, but it can create lists of albums and tracks names. Good enough! Now all I needed was a utility that could employ some fuzzy logic to match these lists to my local music files, which follow a typical Artist / Albumn / Track hierarchy.

Turns out, Python 3 makes this really easy! Just copy the script below:

playlist-gen.py:

#!/usr/bin/env python3

# Converts a list of audio tracks