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
| #!/usr/bin/env python3 | |
| """ | |
| Re-apply the Apple Silicon (MPS) FP8 patches to comfy_kitchen. | |
| comfy_kitchen ships FP8-quantized weights that PyTorch's MPS backend cannot | |
| cast or hold, so FP8 models (e.g. Ideogram 4) crash on Apple Silicon. This | |
| script patches two functions: | |
| 1. backends/eager/quantization.py : dequantize_per_tensor_fp8 | |
| Do the fp8 -> bf16 dequant on CPU (the only place MPS allows the cast), |
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
| When Darth Docker sent me the email changing the terms of use retroactively (!) I decided to start looking for alternatives. | |
| About 30 minutes later I found Lima (and nerdctl). | |
| Less than an hour later, I no longer use Docker Desktop. | |
| Not even for retrieving container images in corportate repos that require credentials. | |
| I just replaced Docker on my MacBook with Lima. | |
| $ brew install lima | |
| Then set up a default execution environment for nerdctl: |
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
| TOPFILES=100;TOPIPS=100;DATE=`date +%d.%b.%Y:%H`;for i in `lsof -p $(netstat \ | |
| -ltpn|awk '$4 ~ /:80$/ {print substr($7,1,index($7,"/")-1)}')| awk '$9 ~ \ | |
| /access.log$/ {print $9| "sort -u"}'` ; do echo "-------"$i"------"$DATE; awk \ | |
| '$4 ~ /^.'$DATE'/ {day=substr($4,2,2);hour=substr($4,14,2);sixth= \ | |
| substr($4,17,1); hit[day"\t"hour"."sixth"0 - "hour"."sixth"9"]++;ip[$1]++; \ | |
| bytes[day"\t"hour"."sixth"0 - "hour"."sixth"9"]+=$10; flds=split($7, req, \ | |
| /\//);toss=split(req[flds],fn,/\?/);files[fn[1]]++ } END { for (i in hit) { \ | |
| print hit[i]"\t"i"\t"sprintf("%2.2d",bytes[i]/1024)"K"|"sort -k 3,3n"}; print \ | |
| "";for (i in ip) { if(ip[i] > '$TOPIPS') { print ip[i]"\t"i|"sort -n;echo \ | |
| \"\""}}; for (i in files) { if(files[i] > '$TOPFILES') {print files[i], i| \ |