Skip to content

Instantly share code, notes, and snippets.

View hooke007's full-sized avatar
💭
working

Karl Hook hooke007

💭
working
View GitHub Profile
import torch
import torch.nn as nn
import os
import sys
import onnx
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from models.SR_models import Bicubic_plus_plus
import os
import sys
import cv2
import glob
import numpy as np
import onnx
import onnxruntime as ort
import torch
import torch.onnx
import torch.nn as nn
@hooke007
hooke007 / havsfunc.py
Created November 30, 2025 12:26 — forked from RyougiKukoc/havsfunc.py
HAvsFunc <7f0a9a7a37b60a05b9f408024d203e511e544a61> with mod
"""
Holy's ported AviSynth functions for VapourSynth.
Main functions:
daa
daa3mod
mcdaa3
santiag
FixChromaBleedingMod
Deblock_QED
"""
Export GRDFNet model to ONNX format.
Supports three recommended configurations:
- Standard: num_sets=3, feature_channels=32 (balanced quality/speed)
- HighQuality: num_sets=6, feature_channels=48 (best quality, ~4x slower)
- Lightweight: num_sets=3, feature_channels=24 (fast, for video inference)
"""
import sys
import os
@hooke007
hooke007 / eq.lua
Created September 13, 2025 13:24
mpv-miv [deprecated]
local assdraw = require "mp.assdraw"
local usr_bars = "brightness,contrast,gamma,saturation,hue,"
local enabled = false
local active_bars = {}
local bar_being_dragged = nil
local stale = false
@hooke007
hooke007 / AreaTex.py
Last active September 13, 2025 05:37
smaa2mpv-glsl [broken]
from PIL import Image
from multiprocessing import *
from math import *
import operator
import numpy as np
# Subsample offsets for orthogonal and diagonal areas:
SUBSAMPLE_OFFSETS_ORTHO = [ 0.0, #0
-0.25, #1
"""
转换hqx纹理
"""
from PIL import Image
import sys
IMAGE_FILENAME = "hq2x.png"
OUTPUT_FILENAME = "hq2x.txt"
TEXTURE_NAME = "HQX2"
@hooke007
hooke007 / refresh_osd.lua
Last active July 3, 2025 14:35
强制自动刷新mpv的overlay
--[[
文档_ 无
强制自动刷新mpv的overlay
可用的快捷键示例(在 input.conf 中写入):
<KEY> script-message F5-timer stop # 停止刷新
<KEY> script-message F5-timer resume # 恢复刷新
@hooke007
hooke007 / audio_balance.lua
Last active August 13, 2023 18:19
[mpv-script] 声道平衡
--[[
SOURCE_ https://github.com/wiiaboo/mpv-scripts/blob/master/audio-balance.lua
COMMIT_ 20220811 03cfc0e39682a73d9d24a6e01a3c02716a019d1d
声道平衡
立体声使用的是仅削弱单边的逻辑,但多声道仍沿用了原设计(存在问题)中的混合思路
示例在 input.conf 中写入 :
Ctrl+A script-binding audio_balance/bal2l # 平衡偏左(步进1%,按住可持续触发)
@hooke007
hooke007 / opt_helper.lua
Last active November 1, 2023 15:12
[mpv-script] uosc的辅助脚本
--[[
依赖的前置脚本: https://github.com/hooke007/MPV_lazy/tree/main/portable_config/scripts/uosc
用于:
实时简易快速切换 --cscale --scale --dscale --tscale 的各值
快速预览各用户着色器(仅解析 `~~/shaders/` 目录)
input.conf 示例: