Skip to content

Instantly share code, notes, and snippets.

View yakovkhalinsky's full-sized avatar

Yakov Khalinsky yakovkhalinsky

View GitHub Profile
@yakovkhalinsky
yakovkhalinsky / comfyui-Dockerfile
Created April 20, 2025 11:39
Docker LLM AI Setup
# Base image with Python 3.11 and CUDA 12.5 support
FROM nvidia/cuda:12.8.1-runtime-ubuntu22.04
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
python3-pip \
libgl1-mesa-glx \
&& rm -rf /var/lib/apt/lists/*
@yakovkhalinsky
yakovkhalinsky / flux.py
Last active April 13, 2025 23:03
flux python starter files
import torch
from diffusers import FluxPipeline
prompt = "A cat holding a sign that says hello world"
model = "/home/yakov/.cache/huggingface/hub/models--black-forest-labs--FLUX.1-schnell/snapshots/741f7c3ce8b383c54771c7003378a50191e9efe9"
device = "cuda"
pipe = FluxPipeline.from_pretrained(model, torch_dtype=torch.bfloat16).to(device)
pipe.enable_model_cpu_offload()
@yakovkhalinsky
yakovkhalinsky / droid.ini
Created December 30, 2024 23:20
Sequencer with 2 x P8S8
# LABELS: master=18
[p2b8]
[p2b8]
[p2b8]
[p2b8]
[p8s8]
[p8s8]
[p2b8]
# -------------------------------------------------
@yakovkhalinsky
yakovkhalinsky / two-controllers.ini
Created October 21, 2023 04:27
DROID setup with two controllers
[b32]
[m4]
# -------------------------------------------------
# clocks
# -------------------------------------------------
[clocktool]
clock = I1
reset = _RESET
@yakovkhalinsky
yakovkhalinsky / tiny.ini
Created October 20, 2023 13:08
Tiny Droid Sequencer
[p4b2]
# -------------------------------------------------
# clocks
# -------------------------------------------------
[clocktool]
clock = _INPUT_CLOCK
# reset = _INPUT_RESET
# multiply = 4
# Drive a Continuous Rotation (a.k.a. 360 degree) servo.
from PiicoDev_Unified import sleep_ms
from PiicoDev_Servo import PiicoDev_Servo, PiicoDev_Servo_Driver
controller = PiicoDev_Servo_Driver()
continuous_servo = PiicoDev_Servo(controller, 1, midpoint_us=1500, range_us=1800) # Connect a 360° servo to channel 2
@yakovkhalinsky
yakovkhalinsky / dual-sequencers.ini
Last active May 2, 2023 10:47
Dual Sequencers, 4 voice channels, 4 drum channels
[p2b8]
[p2b8]
[p4b2]
[m4]
[b32]
[b32]
[p10]
# -------------------------------------------------
# clocks
@yakovkhalinsky
yakovkhalinsky / next-wip.ini
Last active March 28, 2023 11:46
Work in progress DROID patch
[b32]
[m4]
[b32]
[p4b2]
# -------------------------------------------------
# clocks
# -------------------------------------------------
[clocktool]
@yakovkhalinsky
yakovkhalinsky / 32-steps.ini
Last active February 16, 2023 06:20
32 steps
[b32]
[b32]
[m4]
[p4b2]
[p2b8]
[p2b8]
[clocktool]
clock = I1
reset = _RESET
@yakovkhalinsky
yakovkhalinsky / big-sequencer.ini
Last active February 11, 2023 23:40
Big Sequencer
[b32]
[b32]
[p2b8]
[p2b8]
[m4]
[p4b2]
# -------------------------------------------------
# clocks
# -------------------------------------------------