Skip to content

Instantly share code, notes, and snippets.

View harubaru's full-sized avatar
🌺

Anthony Mercurio harubaru

🌺
  • CoreWeave, ASU
  • Phoenix, AZ
  • 09:18 (UTC -07:00)
View GitHub Profile
@harubaru
harubaru / main.c
Last active May 24, 2024 09:53
some random shit
/*
hello, i got bored while trying to sleep again so here is this.
it's a dumb little CPU emulator thing just to get back into the C grind.
anyways, don't mind its sillyness, it's not that much of a serious
project. have a good day!
~ haru */
// 0 : blit <val> <addr> : plaps a value to an address
@harubaru
harubaru / sim.c
Created August 30, 2023 07:00
simulate nbody problem on a lot of solidified sand called a computer
// simulate nbody problem on a lot of solidified sand called a computer
// $ mpicc -o nbody_dist sim.c -lm -O3
// $ mpirun -np 16 ./nbody_dist --steps 2 --n 100000 --frequency 0.01 --info
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mpi.h>
#include <math.h>
#include <time.h>
@harubaru
harubaru / wd1-3-release.md
Last active November 22, 2024 15:29
Official Release Notes for Waifu Diffusion 1.3

Waifu Diffusion 1.4 Overview

An image generated at resolution 512x512 then upscaled to 1024x1024 with Waifu Diffusion 1.3 Epoch 7.

Goals

  • Improving image generation at different aspect ratios using conditional masking during training. This will allow for the entire image to be seen during training instead of center cropped images, which will allow for better results when generating full body images, portraits, and improving the composition.
  • Expanded the input context from 77 tokens to 231 tokens or perhaps to an unlimited amount of tokens. Out of 77 tokens for input, only 75 are useable. This does not give nearly enough room for complex prompting that requires a lot of detail.

Data Labeling - A how to.

How do I...

Confused? You're in the right place! Here's a list of tips on how to use this bot.

  1. Type in the command /label

image

@harubaru
harubaru / tensorizer.py
Created April 14, 2022 04:26
Tensorizer
# Code is still a WIP!
from typing import Dict, List, Tuple
from mmappickle import mmapdict
import copy
import torch
import time
import psutil
import os
@harubaru
harubaru / context.py
Last active February 21, 2022 17:01
Context manager
import json
import re
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('gpt2')
TRIM_DIR_TOP=0
TRIM_DIR_BOTTOM=1
TRIM_DIR_NONE=2
TRIM_TYPE_NEWLINE=3

Keybase proof

I hereby claim:

  • I am tone121 on github.
  • I am amd64 (https://keybase.io/amd64) on keybase.
  • I have a public key whose fingerprint is DBF7 4ACC 0E39 9AD5 93DF C660 A42A 85B3 47A8 50BC

To claim this, I am signing this object:

@harubaru
harubaru / dither.glsl
Last active February 5, 2019 18:11
glsl dithering
/* Special thanks to Hugh Kennedy! */
float luma(vec3 color)
{
return dot(color, vec3(0.299, 0.587, 0.114));
}
float dither2x2_imp(vec2 pos, float brightness)
{
int x = int(mod(position.x, 2.0));