Skip to content

Instantly share code, notes, and snippets.

@Bzcasper
Bzcasper / model.yml
Created November 1, 2025 08:31 — forked from patrickhulce/model.yml
ComfyUI Setup
animatediff:
- model: mm_sdxl_beta.ckpt
download_url: https://huggingface.co/guoyww/animatediff/resolve/fdfe36afa161e51b3e9c24022b0e368d59e7345e/mm_sdxl_v10_beta.ckpt
commit_sha: fdfe36afa161e51b3e9c24022b0e368d59e7345e
md5: b211db6a009ecf8f63c4b7cfaa6dbfc3
- model: mm_sd15_v2.ckpt
download_url: https://huggingface.co/guoyww/animatediff/resolve/fdfe36afa161e51b3e9c24022b0e368d59e7345e/mm_sd_v15_v2.ckpt
commit_sha: fdfe36afa161e51b3e9c24022b0e368d59e7345e
md5: 52ed8a4d2f0cf64c8d85f04bc8e38c1e
- model: mm_sd15_v3_adapter.ckpt
@Bzcasper
Bzcasper / lora.py
Created November 1, 2025 08:30 — forked from patrickhulce/lora.py
Modal LoRA training script.
# ---
# deploy: true
# ---
# # Fine-tune Flux on a style using LoRA
# This example finetunes the [Flux.1-dev model](https://huggingface.co/black-forest-labs/FLUX.1-dev)
# on images of a style (by default, a style named sksStoryBook)
# using a technique called textual inversion from [the "Dreambooth" paper](https://dreambooth.github.io/).
# Effectively, it teaches a general image generation model a new "proper noun",
@Bzcasper
Bzcasper / async_thread.py
Created November 1, 2025 08:25 — forked from imnotdev25/async_thread.py
This decorator provides a robust way to execute async functions across multiple threads while maintaining compatibility with both async and synchronous Python code. Use it when you need to: - Parallelize I/O-bound async operations - Integrate async code into legacy synchronous systems - Scale beyond single-threaded asyncio while maintaining asyn…
import asyncio
import threading
from functools import wraps
from concurrent.futures import ThreadPoolExecutor
from typing import Optional, Callable, Coroutine
class ThreadedAsync:
_executor: Optional[ThreadPoolExecutor] = None
def __init__(self, max_threads: Optional[int] = None):
@Bzcasper
Bzcasper / prompt.txt
Created November 1, 2025 08:23 — forked from imnotdev25/prompt.txt
GitHub System Prompt
You are Copilot, a world class Programming AI assistant designed to help users with programming topics.
Your goal is to cater to programmers of all skill levels, from beginners to advanced. Follow these guidelines to ensure your examples are effective and easy to understand:
1. **Provide Clear Explanations:**
- Explain concepts and steps of examples thoroughly.
- Avoid jargon or complex terminology unless the user is advanced.
- Tailor your examples to match the user's skill level (beginner, intermediate, advanced).
2. **Offer Context and Use Cases:**
@Bzcasper
Bzcasper / vllm_modal.py
Created November 1, 2025 08:22 — forked from imnotdev25/vllm_modal.py
VLLM Modal Deployment
import json
from typing import Any
import aiohttp
import modal
vllm_image = (
modal.Image.debian_slim(python_version="3.12")
.pip_install(
"vllm",
def load_learned_patterns(self):
"""Load previously learned interaction patterns"""
try:
patterns_file = self.memory_dir / "learned_patterns.json"
if patterns_file.exists():
with open(patterns_file, 'r') as f:
return json.load(f)
except Exception as e:
print(f"Could not load learned patterns: {e}")
return {}
import os
import subprocess
from modal import App, Image, Volume, is_local, web_server, concurrent
app = App("Scratch-to-Scale")
CACHE_DIR = "/cache"
VSCODE_VERSION = "1.104.1"
@Bzcasper
Bzcasper / cloudflare-worker-proxy.js
Created October 29, 2025 13:14 — forked from elyeandre/cloudflare-worker-proxy.js
cloudflare-worker-proxy
// Website you intended to retrieve for users.
const upstream = 'api.openai.com'
// Custom pathname for the upstream website.
const upstream_path = '/'
// Website you intended to retrieve for users using mobile devices.
const upstream_mobile = upstream
// Countries and regions where you wish to suspend your service.

image

prompt:

A [nationality] woman sitting on a couch, 24 year old, social media, cute sweater over dress, big smile, beautiful dark hair, shot on iPhone, no filter, plant blurred in background, hands or palm not in frame

Negative prompt: >(no hands visible, bad hands, worst quality, low quality, normal quality, lowres, low details, oversaturated, undersaturated, overexposed, underexposed, grayscale, bw, bad photo, bad photography, bad art:1.4), (watermark, signature, text font, username, error, logo, words, letters, digits, autograph, trademark, name:1.2), (blur, blurry, grainy), morbid, ugly, asymmetrical, mutated malformed, mutilated, poorly lit, bad shadow, draft, cropped, out of frame, cut off, censored, jpeg artifacts, out of focus, glitch, duplicate, (airbrushed, cartoon, anime, semi-realistic, cgi, render, blender, digital art, manga, amateur:1.3), (3D ,3D Game, 3D Game Scene, 3D Character:1.1), (bad hands, bad anat

{
"name": "quran_videos_maker_workflow",
"nodes": [
{
"parameters": {
"url": "=https://quranapi.pages.dev/api/{{ $json.surah_number }}.json",
"options": {}
},
"id": "00aa4786-94ea-45d9-9e93-e857a4ce162c",
"name": "Get Surah Data",