This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base image with Python 3.11 and CUDA 12.5 support | |
FROM nvidia/cuda:12.8.1-runtime-ubuntu22.04 | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
python3-pip \ | |
libgl1-mesa-glx \ | |
&& rm -rf /var/lib/apt/lists/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from diffusers import FluxPipeline | |
prompt = "A cat holding a sign that says hello world" | |
model = "/home/yakov/.cache/huggingface/hub/models--black-forest-labs--FLUX.1-schnell/snapshots/741f7c3ce8b383c54771c7003378a50191e9efe9" | |
device = "cuda" | |
pipe = FluxPipeline.from_pretrained(model, torch_dtype=torch.bfloat16).to(device) | |
pipe.enable_model_cpu_offload() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# LABELS: master=18 | |
[p2b8] | |
[p2b8] | |
[p2b8] | |
[p2b8] | |
[p8s8] | |
[p8s8] | |
[p2b8] | |
# ------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[b32] | |
[m4] | |
# ------------------------------------------------- | |
# clocks | |
# ------------------------------------------------- | |
[clocktool] | |
clock = I1 | |
reset = _RESET |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[p4b2] | |
# ------------------------------------------------- | |
# clocks | |
# ------------------------------------------------- | |
[clocktool] | |
clock = _INPUT_CLOCK | |
# reset = _INPUT_RESET | |
# multiply = 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drive a Continuous Rotation (a.k.a. 360 degree) servo. | |
from PiicoDev_Unified import sleep_ms | |
from PiicoDev_Servo import PiicoDev_Servo, PiicoDev_Servo_Driver | |
controller = PiicoDev_Servo_Driver() | |
continuous_servo = PiicoDev_Servo(controller, 1, midpoint_us=1500, range_us=1800) # Connect a 360° servo to channel 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[p2b8] | |
[p2b8] | |
[p4b2] | |
[m4] | |
[b32] | |
[b32] | |
[p10] | |
# ------------------------------------------------- | |
# clocks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[b32] | |
[m4] | |
[b32] | |
[p4b2] | |
# ------------------------------------------------- | |
# clocks | |
# ------------------------------------------------- | |
[clocktool] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[b32] | |
[b32] | |
[m4] | |
[p4b2] | |
[p2b8] | |
[p2b8] | |
[clocktool] | |
clock = I1 | |
reset = _RESET |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[b32] | |
[b32] | |
[p2b8] | |
[p2b8] | |
[m4] | |
[p4b2] | |
# ------------------------------------------------- | |
# clocks | |
# ------------------------------------------------- |
NewerOlder