Skip to content

Instantly share code, notes, and snippets.

View aimerib's full-sized avatar

Aimeri Baddouh aimerib

View GitHub Profile
@aimerib
aimerib / qwen-audio-2-kokoro-example.py
Created January 19, 2025 14:43
This overly complicated example uses a Qt application and the spacebar to start recording audio, sending it to qwen-audio and then processing via kokoro for TTS. ATTENTION: This code is littered with .device("mps") so make sure to change that to your device type or let torch detect it automatically.
from PySide6.QtWidgets import (
QApplication,
QMainWindow,
QLabel,
QVBoxLayout,
QHBoxLayout,
QWidget,
QTextEdit,
)
from PySide6.QtCore import Qt, QThread, Signal
@aimerib
aimerib / script.py
Created September 16, 2024 16:00
Update Oobabooga StableDiffusion extension to use SwarmUI instead
# Either change extensions/sd_api_pictures/script.py or copy the extensions/sd_api_pictures folder as second folder like sd_api_pictures_swarm and change extensions/sd_api_pictures_swarm/script.py
import base64
import io
import json
import re
from datetime import date
from pathlib import Path
from PIL import Image
import gradio as gr

Keybase proof

I hereby claim:

  • I am aimerib on github.
  • I am aimeri (https://keybase.io/aimeri) on keybase.
  • I have a public key ASA78Z3NHRMwh1lvlU55LT_-oTjKPS3X__sjt-WVMEHCZwo

To claim this, I am signing this object:

@aimerib
aimerib / .zshrc
Last active September 10, 2020 01:43
Quickly generating dockerized rails projects
#append this to the end of your ~/.zshrc or ~/.bashrc
generate_rails_project() {
docker run -it --rm -v "$PWD":/"$1" -w /"$1" ruby:latest /bin/bash -c "curl -sL https://deb.nodesource.com/setup_12.x | bash && apt-get install -y nodejs && npm i -g yarn && gem install rails && rails new $1 $2"
echo "FROM ruby:latest
\n
\n
RUN mkdir /"$1"
WORKDIR /"$1"
\n