Skip to content

Instantly share code, notes, and snippets.

View obaid's full-sized avatar

Obaid obaid

  • Ottawa
View GitHub Profile
@obaid
obaid / convertToCheckpoint.md
Created December 17, 2022 18:26 — forked from Christopher-Hayes/convertToCheckpoint.md
Convert DreamBooth .bin files to a .ckpt file

Converting DreamBooth .bin files to a .ckpt model file.

These instructions are based on DreamBooth usage with the https://github.com/ShivamShrirao/diffusers repo.

1. Add the script files

Below are 2 files. "convertToCkpt.py" and "toCkpt.sh". Create those files inside the examples/dreambooth folder with the code provided.

1a. Python convert script (required)

@obaid
obaid / routing_patterns.php
Created October 23, 2017 21:08 — forked from Braunson/routing_patterns.php
Routing patterns from laravel-tricks.com
<?php
// This is what you might have right now
Route::get('users/{id}', 'UserController@getProfile')->where('id', '[\d+]+');
Route::get('products/{id}', 'ProductController@getProfile')->where('id', '[\d+]+');
Route::get('articles/{slug}', 'ArticleController@getFull')->where('slug', '[a-z0-9-]+');
Route::get('faq/{slug}', 'FaqController@getQuestion')->where('slug', '[a-z0-9-]+');
// and many more, now imagine you'll have to change the rule
// Instead, you could have a handy list of patterns and reuse them everywhere:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://npmcdn.com/flickity@2/dist/flickity.css" rel="stylesheet" type="text/css" />
<script src="https://npmcdn.com/flickity@2/dist/flickity.pkgd.js"></script>