Skip to content

Commit

Permalink
Merge pull request #1251 from d8ahazard/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ArrowM authored Jun 3, 2023
2 parents 926ae20 + 1f5f355 commit 1566e3a
Show file tree
Hide file tree
Showing 41 changed files with 3,557 additions and 1,314 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ coverage.xml
docs/_build/

# PyBuilder
target/
target/
.vscode/launch.json
176 changes: 88 additions & 88 deletions D8-DreamBooth.ipynb
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU",
"gpuClass": "standard"
},
"cells": [
{
"cell_type": "markdown",
Expand All @@ -27,35 +11,35 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "W4eFr-nSHE85"
},
"outputs": [],
"source": [
"from google.colab import drive\n",
"import os\n",
"\n",
"drive.mount(\"/content/gdrive\", force_remount=True)\n",
"\n",
"if not os.path.exists(\"/content/gdrive/MyDrive/sd-db-d8\"):\n",
" os.mkdirs(\"/content/gdrive/MyDrive/sd-db-d8\")\n",
" os.mkdir(\"/content/gdrive/MyDrive/sd-db-d8\")\n",
"\n",
"if not os.path.exists(\"/content/working/\"):\n",
" os.mkdirs(\"/content/working/\")\n",
" os.mkdir(\"/content/working/\")\n",
"\n",
"!rm -f /content/working/stable-diffusion-webui\n",
"!ln -s /content/gdrive/MyDrive/sd-db-d8 /content/working/stable-diffusion-webui"
],
"metadata": {
"id": "W4eFr-nSHE85"
},
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "markdown",
"source": [
"Install various packages"
],
"metadata": {
"id": "PLbCegoEyO4M"
}
},
"source": [
"Install various packages"
]
},
{
"cell_type": "code",
Expand All @@ -79,80 +63,85 @@
},
{
"cell_type": "markdown",
"source": [
"Bump Python Version (RUN ONCE)"
],
"metadata": {
"id": "no--xkmZyJGx"
}
},
"source": [
"Bump Python Version (RUN ONCE)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "IJxdOKeBvUGp"
},
"outputs": [],
"source": [
"\n",
"!wget https://github.com/korakot/kora/releases/download/v0.10/py310.sh\n",
"!bash ./py310.sh -b -f -p /usr/local\n",
"!python -m ipykernel install --name \"py310\" --user\n"
],
"metadata": {
"id": "IJxdOKeBvUGp"
},
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "markdown",
"source": [
"Download the 1.5 Model"
],
"metadata": {
"id": "sQirFY6cyr1O"
}
},
"source": [
"Download the 1.5 Model"
]
},
{
"cell_type": "code",
"source": [
"!wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors -O /content/working/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned.safetensors\n"
],
"execution_count": null,
"metadata": {
"id": "F42Hh4v8yjyB"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"!wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors -O /content/working/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned.safetensors\n"
]
},
{
"cell_type": "markdown",
"source": [
"And/Or download the 2.1 Model"
],
"metadata": {
"id": "K0uL_P3OyvC5"
}
},
"source": [
"And/Or download the 2.1 Model"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "FKyzSN7SyfbZ"
},
"outputs": [],
"source": [
"!wget https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-nonema-pruned.safetensors -O /content/working/stable-diffusion-webui/models/Stable-diffusion/v2-1_768-nonema-pruned.safetensors\n",
"\n",
"!wget https://huggingface.co/ckpt/stable-diffusion-2-1/raw/main/v2-inference-v.yaml -O /content/working/stable-diffusion-webui/models/Stable-diffusion/v2-1_768-nonemaema-pruned.yaml\n"
],
"metadata": {
"id": "FKyzSN7SyfbZ"
},
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "markdown",
"source": [
"Install Dreambooth and Auto1111 dependencies (RUN ONCE)"
],
"metadata": {
"id": "kzh_c4qvyFUs"
}
},
"source": [
"Install Dreambooth and Auto1111 dependencies (RUN ONCE)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "q4-o5-Grx_sw"
},
"outputs": [],
"source": [
"!%cd /content/working/stable-diffusion-webui/\n",
"# Clone Auto1111 repos\n",
Expand All @@ -171,24 +160,24 @@
"!git clone \"https://github.com/salesforce/BLIP.git\" \"/content/working/stable-diffusion-webui/repositories/BLIP\" \n",
"!%cd \"/content/working/stable-diffusion-webui/repositories/BLIP\"\n",
"!git checkout \"48211a1594f1321b00f14c9f7a5b4813144b2fb9\"\n"
],
"metadata": {
"id": "q4-o5-Grx_sw"
},
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "markdown",
"source": [
"Setup VENV"
],
"metadata": {
"id": "_G-NX4mvIv-G"
}
},
"source": [
"Setup VENV"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "XIdP81K-Isiw"
},
"outputs": [],
"source": [
"# Install PIP stuff\n",
"!%cd /content/working/stable-diffusion-webui/\n",
Expand All @@ -205,35 +194,46 @@
"!pip install -r /content/working/stable-diffusion-webui./extensions/sd_dreambooth_extension/requirements.txt\n",
"!pip install https://github.com/ArrowM/xformers/releases/download/xformers-0.0.17%2B36e23c5.d20230209-cp310-cu118/xformers-0.0.17+36e23c5.d20230209-cp310-cp310-linux_x86_64.whl\n",
"!pip install https://download.pytorch.org/whl/nightly/cu118/torch-2.0.0.dev20230209%2Bcu118-cp310-cp310-linux_x86_64.whl https://download.pytorch.org/whl/nightly/cu118/torchvision-0.15.0.dev20230209%2Bcu118-cp310-cp310-linux_x86_64.whl\n"
],
"metadata": {
"id": "XIdP81K-Isiw"
},
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "markdown",
"source": [
"Run Auto1111"
],
"metadata": {
"id": "A_AePD55yYeQ"
}
},
"source": [
"Run Auto1111"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "qa5T38izv6CX"
},
"outputs": [],
"source": [
"!%cd /content/working/stable-diffusion-webui/extensions/sd_dreambooth_extension/\n",
"!git fetch && git pull\n",
"!%cd /content/working/stable-diffusion-webui/ \n",
"!python launch.py --share --xformers --enable-insecure-extension-access --torch2 --skip-install --skip-torch-cuda-test"
],
"metadata": {
"id": "qa5T38izv6CX"
},
"execution_count": null,
"outputs": []
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"provenance": []
},
"gpuClass": "standard",
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
]
},
"nbformat": 4,
"nbformat_minor": 0
}
3 changes: 0 additions & 3 deletions config/dreambooth.json

This file was deleted.

40 changes: 39 additions & 1 deletion css/dreambooth.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
.btn-top {
min-width: 150px;
}
}

.db_adv {
display: none;
}

.linkBtn {
position: absolute;
right: 0;
top: 050%;
border: 1px solid var(--bs-border-dark);
border-radius: 5px;
}

.linkBtn * {
color: var(--primary-accent-text-color);
}

@media (max-width: 767.98px) {
.dbButtons {
display: inline-block;
}
}

.linkBtn:hover * {
color: var(--primary-accent-color);
background-color: var(--primary-accent-text-color);
}

.linkBtn.active * {
background-color: var(--primary-color);
color: var(--primary-text-color);
}

.dbChart {
width: 100%;
height: 300px;
}

Loading

0 comments on commit 1566e3a

Please sign in to comment.