Junyx's Blog

Thoughts, Experiments, and Discoveries

Stable Diffusion Prompt Writing

July 17, 2023 — ~junyx

Fine tuning Stable Diffusion prompts can be art in itself. Here are some tips on how to do just that:

  1. A good prompt should be detailed and specific, and keywords can be used from various categories such as subject, medium, style, artist, website, resolution, additional details, color, and lighting

  2. Adding specific details to the subject, such as appearance, clothing, and background, helps generate more accurate images

  3. Prompt building is an iterative process where keywords are added gradually to assess their effect on the generated images

  4. The style category allows for specifying the artistic style of the image, such as hyperrealistic, surrealist, or fantasy

  5. Negative prompts can be used to specify what should be avoided in the image

This is an excellent guide to learn more about fine tuning Stable Diffusion prompts:

Guide

tags: stablediffusion, ai, art, imagegeneration, machinelearning

Interesting Stable Diffusion Sites

July 17, 2023 — ~junyx

Some interesting websites I’ve found on Stable Diffusion (AI image generation):

tags: ai, stablediffusion, imagegeneration, machinelearning

Created a Utility to Extract Urls

July 17, 2023 — ~junyx

I was exploring my IRC chatlogs and wanted a way to get all urls mentioned in all channels.

So, I created a small command line utility to extract urls from standard input: Check it out here

Usage:

command | python3 urls.py

tags: unix, github, commandline, linux, macos

Unix Philosophy

July 17, 2023 — ~junyx

The unix philosophy is powerful and leads to modular, reusable, and easy to understand systems.

From Doug McIlroy in Bell System Technical Journal from 1978:

  1. Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new “features”.

  2. Expect the output of every program to become the input to another, as yet unknown, program. Don’t clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don’t insist on interactive input.

  3. Design and build software, even operating systems, to be tried early, ideally within weeks. Don’t hesitate to throw away the clumsy parts and rebuild them.

  4. Use tools in preference to unskilled help to lighten a programming task, even if you have to detour to build the tools and expect to throw some of them out after you’ve finished using them.

tags: unix, design, software, programming

Make your Mac speak

July 17, 2023 — ~junyx

On macOS you can use the say command to make your computer speak.

This can be used for a number of applications like reading articles or books and creating custom notifications.

Usage:

say "How are you?"

You can also add it to a pipeline:

echo "I'm fine" | say

To can the change the voice with the -v option:

say -v "Albert" "I have a frog in my throat"

Configuration

You can set the default voice in

System Preferences -> Accessibility -> Spoken Content -> System voice

Have fun and let me know what uses you find for this

tags: macos, commandline, texttospeech, frog

Lineselect and Vipe

July 17, 2023 — ~junyx

Interesting projects I found today:

lineselect - command line utility to select lines from stdin in the middle of a pipeline

vipe - command line utility to inspect and modify stdin lines in your $EDITOR in the middle of a pipeline

tags: unix, github, linux, commandline