Skip to content

Instantly share code, notes, and snippets.

View un1tz3r0's full-sized avatar
🕶️
acting natural

Victor Condino un1tz3r0

🕶️
acting natural
View GitHub Profile
@sayakpaul
sayakpaul / run_flux_under_24gbs.py
Last active April 7, 2025 21:44
This gist shows how to run Flux on a 24GB 4090 card with Diffusers.
from diffusers import FluxPipeline, AutoencoderKL
from diffusers.image_processor import VaeImageProcessor
from transformers import T5EncoderModel, T5TokenizerFast, CLIPTokenizer, CLIPTextModel
import torch
import gc
def flush():
gc.collect()
torch.cuda.empty_cache()
@sayakpaul
sayakpaul / run_sd3_8bit.py
Last active November 25, 2024 21:50
The code snippet shows how to run Stable Diffusion 3 with a 8bit T5-xxl, drastically reducing the memory requirements.
from diffusers import StableDiffusion3Pipeline
from transformers import T5EncoderModel
import torch
import time
import gc
def flush():
gc.collect()
torch.cuda.empty_cache()
@un1tz3r0
un1tz3r0 / refusal_demo.ipynb
Last active June 21, 2024 07:17
refusal_demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@promto-c
promto-c / General-Web-App-GitHub-Pages-Deployment-Guide.md
Created December 28, 2023 16:59
Comprehensive Guides for Deploying React, Node.js, and General Web Applications on GitHub Pages

Deploying a General Web App (HTML, CSS, JS) on GitHub Pages

A step-by-step guide to deploying web applications (using HTML, CSS, JavaScript) on GitHub Pages, categorized into three main sections for ease of understanding and implementation.

Preparing Your Web Application

  1. Create Your Web Application

    • Prepare your web application with HTML, CSS, and JavaScript files. Ensure the entry point of your app is an index.html file.
  2. Organize Your Application

import chess
import re
import outlines.text.generate as generate
import outlines.models as models
import chess.engine
import chessboard.display
import os
os.environ["TOKENIZERS_PARALLELISM"] = "false"
@regiellis
regiellis / iterative_upscale.json
Last active May 1, 2024 12:01
Iterative Upscale Images Workflow
{
"last_node_id": 25,
"last_link_id": 41,
"nodes": [
{
"id": 4,
"type": "Width/Height Literal",
"pos": [
-209,
451
@sbusso
sbusso / youtubemusicdownloader.py
Created August 19, 2023 22:46 — forked from un1tz3r0/youtubemusicdownloader.py
This script uses ytmusicapi and pytube together to download your playlists, history or 'liked' songs as high-quality audio-only streams from Youtube Music.
''' This script uses ytmusicapi and pytube together to download your playlists, history or 'liked' songs as
high-quality audio-only streams from Youtube Music, which are protected by a "signatureCipher" obfuscation scheme.
To use it, first install [ytmusicapi] and [pytube] using pip, then follow the instructions for creating the auth
file from the response in an authenticated session to a watch-page request as found in your browser's dev-tools.
The downloaded files are placed in ~/Music, named with the artist and track metadata, and will be skipped instead
of downloaded again next time it is run, based on the videoIds of the downloaded songs.
Merry Xmas - V.
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@shawwn
shawwn / example.sh
Created March 6, 2023 05:17
How I run 65B using my fork of llama at https://github.com/shawwn/llama
mp=1; size=7B; # to run 7B
mp=8; size=65B; # to run 65B
for seed in $(randint 1000000)
do
export TARGET_FOLDER=~/ml/data/llama/LLaMA
time python3 -m torch.distributed.run --nproc_per_node $mp example.py --ckpt_dir $TARGET_FOLDER/$size --tokenizer_path $TARGET_FOLDER/tokenizer.model --seed $seed --max_seq_len 2048 --max_gen_len 2048 --count 0 | tee -a ${size}_startrek.txt
done
@sbusso
sbusso / resume.json
Last active October 26, 2023 15:24
resume.json
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Stéphane BUSSO",
"label": "Tech Leader | Architect | Developer | Web3 | Blockchain | SaaS",
"image": "",
"email": "[email protected]",
"phone": "+642108923834",
"summary": "As an experienced engineering manager and technical leader, I enjoy helping companies grow their teams, design and develop better software solutions, be agile, and deliver quality products and services faster.",
"location": {