View SSD-1B.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View videomaskbyface.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import os | |
import time | |
import mediapipe as mp | |
import numpy as np | |
def extract_faces(image): | |
center_faces = [] | |
BaseOptions = mp.tasks.BaseOptions | |
FaceDetector = mp.tasks.vision.FaceDetector |
View img.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
import dlib | |
import mediapipe as mp | |
import argparse | |
import torch | |
from diffusers import StableDiffusionImg2ImgPipeline | |
from diffusers import EulerAncestralDiscreteScheduler | |
from typing import Any, Callable, Dict, List, Optional, Union | |
import PIL |
View merge.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from typing import Tuple, Callable | |
def do_nothing(x: torch.Tensor, mode:str=None): | |
return x | |
def mps_gather_workaround(input, dim, index): | |
if input.shape[-1] == 1: |
View weightedsim.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import argparse | |
import torch | |
import numpy as np | |
from tqdm import tqdm | |
parser = argparse.ArgumentParser(description="Merge models with weighted similarity") | |
parser.add_argument("a", type=str, help="Path to model a") | |
parser.add_argument("b", type=str, help="Path to model b") | |
parser.add_argument("--out", type=str, help="Output file name, without extension", default="merged", required=False) |
View server.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/recoilme/clean" | |
. "github.com/stevelacy/daz" | |
) |
View gist:5eff4c28c9b2b982c08e2621deb81d68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"log" | |
"os" | |
ljpg "github.com/pixiv/go-libjpeg/jpeg" | |
) |
View hash_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main_test | |
import ( | |
"strconv" | |
"testing" | |
"github.com/cespare/xxhash" | |
"github.com/spaolacci/murmur3" | |
) |
View vowpal_wabbit_in_daemon.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"net" | |
) | |
// mac: brew install vowpal-wabbit |
View server.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"strings" | |
"time" | |
) | |
// Server is a HTTP interface |
NewerOlder