Skip to content

Instantly share code, notes, and snippets.

View doctorpangloss's full-sized avatar

Benjamin Berman doctorpangloss

View GitHub Profile
@doctorpangloss
doctorpangloss / example.md
Last active February 4, 2025 00:38
distributed comfyui example

Below is a succinct guide showing how to set up:

  1. A uv‑backed virtual environment on Linux
  2. A Docker build for ComfyUI
  3. RabbitMQ with a KEDA ScaledObject for auto-scaling workers
  4. A ComfyUI frontend Deployment and ComfyUI worker StatefulSet

…plus a short Python script using the “queue_and_forget” approach.


@doctorpangloss
doctorpangloss / install.sh
Last active November 25, 2024 17:56
Installing ComfyUI on macOS
# install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# install python 3.12
brew install python@3.12
# link it
brew link python@3.12
# check that you have python installed and that it's python 3.12
python3 --version
# install UV to get everything working faster
curl -LsSf https://astral.sh/uv/install.sh | sh
import math
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as TT
from PIL import Image
from einops import rearrange
from einops.layers.torch import Rearrange
@doctorpangloss
doctorpangloss / containerd-1.7.2.yaml
Created June 22, 2023 22:59
upgrades containerd on windows for GKE
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: containerd-upgrade
namespace: kube-system
spec:
selector:
matchLabels:
name: containerd-upgrade
template:
@doctorpangloss
doctorpangloss / hdrp.patch
Created July 16, 2022 00:51
patch for hdrp reflection probe culling issue
diff --git a/Packages/com.unity.render-pipelines.high-definition@12.1.7/Runtime/RenderPipeline/HDRenderPipeline.cs b/Packages/com.unity.render-pipelines.high-definition@12.1.7/Runtime/RenderPipeline/HDRenderPipeline.cs
index 34918678..6997fe2e 100644
--- a/Packages/com.unity.render-pipelines.high-definition@12.1.7/Runtime/RenderPipeline/HDRenderPipeline.cs
+++ b/Packages/com.unity.render-pipelines.high-definition@12.1.7/Runtime/RenderPipeline/HDRenderPipeline.cs
@@ -1334,6 +1334,14 @@ namespace UnityEngine.Rendering.HighDefinition
hdCamera.RequestDynamicResolution(cameraRequestedDynamicRes, dynResHandler);
+ // Force add all the HDProbes
+ var allProbes = GameObject.FindObjectsOfType<HDProbe>();
+ cullingResults.hdProbeCullingResults.Reset();
+ foreach (var probe in allProbes)
@doctorpangloss
doctorpangloss / GrpcExtensions.cs
Created October 7, 2021 16:46
Improving semantics around gRPC on Unity
using System;
using System.Collections.Generic;
using Grpc.Core;
using UniRx;
using UniRx.Diagnostics;
using UnityEngine;
using System;
using System.Collections.Concurrent;
using System.Threading;
using Cysharp.Threading.Tasks;
[*]
trim_trailing_whitespace=false
charset=utf-8
end_of_line=lf
insert_final_newline=false
indent_style=space
indent_size=4
# Microsoft .NET properties
csharp_new_line_before_members_in_object_initializers=false
{
"data-root" : "/var/packages/Docker/target/docker",
"log-driver" : "json-file",
"registry-mirrors" : [],
"group": "administrators"
}
#if !UniRxLibrary
using ObservableUnity = UniRx.Observable;
#endif
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.Networking;
using Hash = System.Collections.Generic.Dictionary<string, string>;
package com.hiddenswitch.spellsource.applications;
import com.hiddenswitch.spellsource.Broadcaster;
import com.hiddenswitch.spellsource.Gateway;
import com.hiddenswitch.spellsource.Spellsource;
import com.hiddenswitch.spellsource.Tracing;
import com.hiddenswitch.spellsource.util.Logging;
import com.hiddenswitch.spellsource.util.Mongo;
import com.hiddenswitch.spellsource.util.RpcClient;
import io.vertx.core.Vertx;