Convert animated WebP to WebM movie with Python

In my last post I mentioned converting an animated WebP image format into a WebM movie format. This post expands on how I did it. ...

21 Jan 2024

Extracting images from PDF files

Happy new year! Ever needed to extract images from PDFs and found both on-line and off-line tools lacking? Well, I certainly have, and here I present my Python code to extract JPGs/PNGs from PDFs, using PyMuPDF. ...

6 Jan 2024

Run code in a macOS Sandbox

I sometimes test randomly downloaded code on macOS in a Sandbox that has limited and network access. I posted about this way back in Jan 2017, Creating a macOS Sandbox to run Kodi, and this is a short refresher for me… ...

11 Jun 2023

Create an animated PNG

I recently wanted to create an animated PNG, but macOS does not include any built in tools to combine multiple PNGs into an APNG file. Here’s an option using Python source code. ...

9 Jun 2023

File Date Created = Photo / video metadata

When I export photos or videos from Photos.app, I want the file’s Created Date (Created Date in Finder) to be the time the photo or video was taken. Alas, this is not the way Photos works, and setting the date turned out to be more challenging than expected. ...

4 Jun 2023

myByways Simple-SD v1.1 Python script using Safetensors

Epic Diffusion recently came to my attention, a high-quality merge of various models by John Slegers: “Epîc Diffusion is a general purpose model based on Stable Diffusion 1.x intended to replace the official SD releases as your default model. It is focused on providing high quality output in a wide range of different styles…” Figured I’d give it a spin. ...

24 Jan 2023

Fast Stable Diffusion using Core ML on M1

Recently (around 14 December 2022), Apple’s Machine Learning Research team published “Stable Diffusion with Core ML on Apple Silicon” with Python and Swift source code optimized for Apple Silicon (M1/M2) on Github apple/ml-stable-diffusion. Here I’m trying it out on a MacBook (though the code also works on iPhones and iPads)… ...

18 Dec 2022

myByways Simple-SD v1.0 Python script

I refactored my previous Stable Diffusion code, to clean up, OO it a little, and add new features like tiling, upscaling, PNG metadata. As I mentioned before, I don’t understand AI/ML… but I do understand programming! So here is my new, more elegant Simple-SD v1.0 Python script. ...

9 Oct 2022

Adding CLIPSeg automatic masking to Stable Diffusion

I have more ideas for Stable Diffusion. My nights and weekends are consumed! This time: For inpainting, why create a mask image manually, when A.I. can automatically build a mask from a text prompt? Someone much smarter has already published a paper (arXiv:2112.10003 [cs.CV]), with source code, to do just this! ...

28 Sep 2022

Stable Diffusion script with inpainting mask

More Stable Diffusion! This time attempting to add inpainting / masking based on my previous code, to merge both txt2img.py and img2img.py capabilities, disregarding the out-of-box inpainting.py code, which does not have parameters for positive or negative prompts. Keyword being attempting… ...

26 Sep 2022