Skip to content

Instantly share code, notes, and snippets.

View jfischoff's full-sized avatar
™️
Jonathaning

Jonathan Fischoff jfischoff

™️
Jonathaning
View GitHub Profile
@jfischoff
jfischoff / vecglypher-overrides.txt
Created March 19, 2026 20:53
vecglypher dependency overrides for vllm+fal platform compatibility
pydantic==2.10.6
fastapi==0.110.3
starlette==0.37.2
@jfischoff
jfischoff / platform-overrides.txt
Last active March 19, 2026 20:03
fal platform dependency overrides for apps with transitive fastapi/pydantic/torchaudio conflicts
fastapi==0.110.3
pydantic==2.10.6
torchaudio==2.5.1
starlette==0.37.2
@jfischoff
jfischoff / ace-step-override.txt
Created March 17, 2026 18:07
ace-step-1.5: override torchaudio/pydantic for vllm compat
torchaudio==2.9.0
pydantic==2.10.6
@jfischoff
jfischoff / stable-audio-override.txt
Created March 17, 2026 18:07
stable-audio: protobuf + gradio pin to avoid fastapi conflict
protobuf>=4.19
gradio<5.20.0
@jfischoff
jfischoff / fastvideo-override.txt
Created March 17, 2026 18:04
fastvideo-wan22: pin gradio to avoid fastapi conflict
gradio<5.20.0
@jfischoff
jfischoff / diff_loss.py
Created November 13, 2023 17:03
Random Start Frame Diff Loss
def frame_diff_with_anchor(video_tensor, anchor_frame_index):
"""
Compute the frame difference for a video tensor using an anchor frame.
video_tensor should have shape (batch_size, channels, frames, height, width)
anchor_frame_index is the index of the anchor frame around which diffs are computed
"""
# Ensure that the anchor frame is within the correct range
num_frames = video_tensor.shape[2]
if not (0 <= anchor_frame_index < num_frames):
raise ValueError("anchor_frame_index is out of range.")
@jfischoff
jfischoff / run.py
Created July 14, 2023 06:13
AnimateDiff simple runner
from pathlib import Path
from animatediff.pipelines.pipeline_animation import AnimationPipeline
import torch
from diffusers import AutoencoderKL, DDIMScheduler, EulerAncestralDiscreteScheduler
from tqdm.auto import tqdm
from transformers import CLIPTextModel, CLIPTokenizer
from animatediff.models.unet import UNet3DConditionModel
from diffusers.utils.import_utils import is_xformers_available
from safetensors import safe_open
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
postgres=# explain (analyze, buffers) UPDATE payloads
postgres-# SET state='dequeued'
postgres-# WHERE id in
postgres-# ( SELECT p1.id
postgres(# FROM payloads AS p1
postgres(# WHERE p1.state='enqueued'
postgres(# ORDER BY p1.modified_at ASC
postgres(# FOR UPDATE SKIP LOCKED
postgres(# LIMIT 1
postgres(# )
CREATE OR REPLACE FUNCTION enqueue(count int8, x anyarray) RETURNS void AS $$
DECLARE
startValue int8;
lastValue int8;
currentValue int8;
partition_name text;
doubleCount int8;
BEGIN
doubleCount := 2 * count;
SELECT nextval('modified_index') INTO currentValue ;