Skip to content

Instantly share code, notes, and snippets.

conda create --name myenv python=3.10.11
conda activate myenv
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
pip install xformers
pip install audiocraft
pip install IPython
from IPython import display as ipd
from audiocraft.models import musicgen
from audiocraft.utils.notebook import display_audio
import torch
import torchaudio
import os
# Define the output directory
output_dir = r'C:\Users\USER\OneDrive\Desktop\musicgen2'
@mberman84
mberman84 / gist:7029a8c3bc57c143c1e1b546e9cd0ed0
Last active April 29, 2024 18:40
text-to-video install
conda create --name myenv python=3.10.11
conda activate myenv
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
git clone -b dev https://github.com/camenduru/Text-To-Video-Finetuning
git clone https://huggingface.co/kabachuha/potat1-with-text-encoder-original-format/tree/main
pip install -r requirements.txt
python inference.py -m "C:\Users\USER\Desktop\content\potat1" -p "ducks in a lake" -W 320 -H 320 -o "C:\Users\USER\Desktop\content\Text-To-Video-Finetuning\outputs" -d cuda -x -s 33 -g 23 -f 30 -T 24
@mberman84
mberman84 / checker.py
Created June 12, 2023 02:47
Cuda Checker
import torch
print(torch.version.cuda)
print(torch.cuda.is_available())
import openai
import os
import subprocess
from github import Github, GithubException
from dotenv import load_dotenv
load_dotenv()
def commit_and_push_folder_to_github(github_repo, folder_path):
try:
➜ texthub git:(develop) ✗ bundle exec derailed bundle:mem
TOP: 149.5039 MiB
twilio-ruby: 18.0234 MiB
libxml: 1.1563 MiB (Also required by: twilio-ruby/twiml/twiml)
libxml_ruby: 0.3828 MiB
/Users/matthewberman/.rvm/gems/ruby-2.3.0@texthub/gems/twilio-ruby-5.1.1/lib/twilio-ruby/rest/api/v2010/account.rb: 0.3594 MiB
/Users/matthewberman/.rvm/gems/ruby-2.3.0@texthub/gems/twilio-ruby-5.1.1/lib/twilio-ruby/rest/api/v2010/account/call.rb: 0.3242 MiB
rails/all: 16.7695 MiB
active_record/railtie: 7.0156 MiB
active_record: 5.7773 MiB (Also required by: multidb, orm_adapter/adapters/active_record)
class SegmentService
# method_name must be a symbol
# def initialize(user, method_name, method_args = nil)
# binding.pry
# @user = user
# @company = @user.company
# @analytics_uuid = @user.analytics_uuid
# send(method_name, method_args)
# # wrap the entire SegmentService in a rescue so if SegmentService fails
# # for whatever reason, our other code doesn't fail
class AwayMessagesWorker
include Sidekiq::Worker
include Sidetiq::Schedulable
sidekiq_options retry: false
recurrence { secondly(10) }
def perform
redis_away_lock_key = 'away_messaging'
[3155257,
3155326,
3175384,
3364331,
3364450,
3364462,
3364641,
3366279,
3366306,
3367398,
<div class="fb-messengermessageus"
messenger_app_id="747394735396112"
page_id="PAGE_ID"
color="blue"
size="standard" ></div>