Skip to content

Instantly share code, notes, and snippets.

@DarkStoorM
DarkStoorM / Subject-Oriented Inpainting.md
Last active April 1, 2026 12:36
Random document on Subject-Oriented Inpainting and Detailing in Stable Diffusion + my personal workflow.

Stable Diffusion, Subject-Oriented Inpainting

Caution

24 Aug 2024 - Please keep in mind that this document is obsolete and lots of things have changed since its release, this document is not maintained in terms of technicalities. Most things still apply as I still do things with the same workflow, except the settings at this point are a "whatever" and I use Hypertile with the recent A1111 releases (switched to 1.10), so the samplers/CFG etc. settings don't really matter unless you use things like XL Turbo or whatever people release today, use whatever is recommended. Also "enhancers" in prompts are just a meme.

Table of Contents:

@plusk01
plusk01 / taskset_example.md
Last active February 14, 2023 20:43
Understanding CPU affinity with taskset

CPU Affinity

In a single core system, the OS allows multiple processes to run by sharing CPU time with the multiple processes. This is called concurrency, which gives the illusion of multiple processes executing at once, but is in fact just using a scheduler to give each process dedicated time on the CPU. The time associated with switching processes on a single core is overhead caused by context switching.

When a multi-core processor is available to an OS (e.g., Linux), the scheduler will do its best to allow processes to run simultaneously (by placing processes on different cores) in addition to running concurrently (different processes on the same core).

To control which core a process runs on, we can tell the scheduler to give a process a certain affinity towards a given set of CPUs.

Using taskset, we can get/set the CPU affinity of a particular process. Consider the following example.

@radiatoryang
radiatoryang / SkinnedMeshCombiner.cs
Last active January 11, 2026 07:08
example code for combining SkinnedMeshRenderers at runtime (for optimization reasons usually), which I use in my games for Mixamo Fuse models specifically... PLEASE DON'T ASK ME FOR HELP WITH THIS, this is more for learning purposes, and it's not really an easy-to-use Asset Store thing? also I have a lot of weird hacks specific for my uses... ag…
// this code is under MIT License, by Robert Yang + others (credits in comments)
// a lot of this is based on http://wiki.unity3d.com/index.php?title=SkinnedMeshCombiner
// but I removed the atlasing stuff because I don't need it
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;