Add files via upload

This commit is contained in:
Engineer-of-Stuff 2022-09-07 16:27:47 -06:00 committed by GitHub
parent b769bac2da
commit 2018f4ade4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,86 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "65dbc5f6-5523-4c34-b3b6-c296e06a357c",
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [],
"source": [
"# 1. Run this cell to download the Anaconda3 installer\n",
"# 2. Do `bash /notebooks/Anaconda3-2022.05-Linux-x86_64.sh` in the terminal to install it\n",
"!wget https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh\n",
"!bash /notebooks/Anaconda3-2022.05-Linux-x86_64.sh -b -f -p /notebooks/anaconda3"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7a33c19e-fd40-4f72-80df-697024e50964",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# 1. Run this cell to download the repo installer\n",
"# 2. Do `/notebooks/linux-sd.sh` in the terminal to run the installer\n",
"# 3. The installer will initalize and then prompt you to download the 1.4 AI Model from Huggingface.\n",
"# At this point, run the next cell then continue the installer (press enter in the terminal you're running the script it).\n",
"!wget https://raw.githubusercontent.com/JoshuaKimsey/Linux-StableDiffusion-Script/main/linux-sd.sh\n",
"!chmod +x /notebooks/linux-sd.sh\n",
"!echo \"/notebooks/linux-sd.sh\""
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "11ede4f9-3b47-47df-b0e2-e04c9287e62e",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Download the 1.4 AI Model from Huggingface.\n",
"import os\n",
"if os.path.exists('Models'): # if this dir doesn't exist, you need to run the linux-sd.sh script and FOLLOW DIRECTIONS!!\n",
" user_token = \"<enter huggingface user_token here>\"\n",
" user_header = f\"'Authorization: Bearer {user_token}'\"\n",
" !wget --header={user_header} https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt -O /notebooks/Models/sd-v1-4.ckpt"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "60c0784c-cf85-4ec9-a333-a2dbe6b428e0",
"metadata": {},
"outputs": [],
"source": [
"# The installer will do everything needed set up your environment "
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}