This file contains 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 { writeFile } from 'fs/promises' | |
const DRAW_THINGS_URL = 'http://127.0.0.1:7860/sdapi/v1/txt2img' | |
const BATCH_COUNT = 5 | |
const IMG_SIZE = 512 | |
const MAX_FILE_NAME_LEN = 30 | |
const prompt = 'bunch of carrots' | |
const params = { |
This file contains 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
# Based on younesbelkada/finetune_llama_v2.py | |
# Install the following libraries: | |
# pip install accelerate==0.21.0 peft==0.4.0 bitsandbytes==0.40.2 transformers==4.31.0 trl==0.4.7 scipy | |
from dataclasses import dataclass, field | |
from typing import Optional | |
import torch | |
from datasets import load_dataset | |
from transformers import ( |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Video tutorial of this gist file : https://www.youtube.com/watch?v=kmT-z2lqEPQ | |
Used web UI commit hash id: a9eef1fbb1dcdce4f0eb0b8e0f79dcd4c96713e1 | |
Used ControlNet commit hash id : 241c05f8c9d3c5abe637187e3c4bb46f17447029 | |
git checkout a9eef1fbb1dcdce4f0eb0b8e0f79dcd4c96713e1 | |
git checkout master |