Skip to content

Instantly share code, notes, and snippets.

View tcapelle's full-sized avatar
😄
happy

Thomas Capelle tcapelle

😄
happy
View GitHub Profile
@madebyollin
madebyollin / stable_diffusion_m1.py
Last active February 10, 2024 02:25
Stable Diffusion on Apple Silicon GPUs via CoreML; 2s / step on M1 Pro
# ------------------------------------------------------------------
# EDIT: I eventually found a faster way to run SD on macOS, via MPSGraph (~0.8s / step on M1 Pro):
# https://github.com/madebyollin/maple-diffusion
# The original CoreML-related code & discussion is preserved below :)
# ------------------------------------------------------------------
# you too can run stable diffusion on the apple silicon GPU (no ANE sadly)
#
# quick test portraits (each took 50 steps x 2s / step ~= 100s on my M1 Pro):
# * https://i.imgur.com/5ywISvm.png
@rwightman
rwightman / standalone_bifpn.py
Last active January 27, 2023 06:09
Use effdet BiFPN standalone
from typing import Callable, Union
from dataclasses import dataclass
import timm
import torch.nn as nn
from effdet.efficientdet import BiFpn
from effdet.config import fpn_config
from omegaconf import DictConfig
@hamelsmu
hamelsmu / sanity.ipynb
Last active March 13, 2021 14:01
GitHub Notification Sanity With `ghapi`
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.