Skip to content

Instantly share code, notes, and snippets.

'''
https://arxiv.org/abs/2312.00858
1. put this file in ComfyUI/custom_nodes
2. load node from <loaders>
start_step, end_step: apply this method when the timestep is between start_step and end_step
cache_interval: interval of caching (1 means no caching)
cache_depth: depth of caching
'''
@Setsugennoao
Setsugennoao / keyframes.py
Last active January 20, 2025 07:04
Keyframe generator script
from argparse import ArgumentParser
from pathlib import Path
from vsexprtools import ExprOp, norm_expr
from vstools import (
CustomRuntimeError, Keyframes, KwargsT, Sentinel, clip_async_render, core, get_w, mod4, mod_x, ranges_product,
shift_clip, split, vs
)
name = 'SetsuNoKeyframes'
@MidSpike
MidSpike / readme.md
Last active January 29, 2025 18:02
CVE-2022-23812 | RIAEvangelist/node-ipc is malware / protest-ware
# Modified StyleGAN2 Projector with CLIP, addl. losses, kmeans, etc.
# by Peter Baylies, 2021 -- @pbaylies on Twitter
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
@HanClinto
HanClinto / highresslowmo.ipynb
Created August 6, 2020 18:49
HighResSlowMo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sgraaf
sgraaf / ddp_example.py
Last active November 7, 2024 05:39
PyTorch Distributed Data Parallel (DDP) example
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from argparse import ArgumentParser
import torch
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel as DDP
from torch.utils.data import DataLoader, Dataset
from torch.utils.data.distributed import DistributedSampler
from transformers import BertForMaskedLM
@A03ki
A03ki / ICNR.md
Last active March 25, 2024 05:03
Implementation of ICNR with PyTorch
@bikcrum
bikcrum / tf_upgrade_v2.py
Last active October 20, 2021 07:30
Tensorflow migration script tf_upgrade_v2.py
# Lint as: python2, python3
# Copyright 2018 The TensorFlow Authors. 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
@amaotone
amaotone / icnr_example.ipynb
Created July 29, 2019 04:30
Sub-Pixel Conv with ICNR
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@geoffsmith
geoffsmith / test_pixelshuffle.py
Created June 12, 2019 12:41
Example showing PixelShuffle ONNX export doesn't use same ordering as PyTorch
import onnx
import torch
from caffe2.python.onnx import backend
from torch import nn
from torch.autograd import Variable
from torch.nn import PixelShuffle
class MyPixelShuffle(nn.Module):
"""
Alternative version of pixel shuffle that was copied from the C++ version