Transformers
Inference Endpoints
File size: 4,720 Bytes
0b5a380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "caeYrAXcZCQv",
        "cellView": "code"
      },
      "outputs": [],
      "source": [
        "!git clone https://tinyurl.com/vorstcavry-remajapekalongan /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry\n",
        "%cd /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry\n",
        "!git checkout baf6946e06249c5af9851c60171692c44ef633e0\n",
        "!conda install -y -c conda-forge opencv\n",
        "\n",
        "%cd /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/models/Stable-diffusion/\n",
        "!curl -O -J -L https://huggingface.co/vorstcavry/mymodel/resolve/main/Cavry_V2.safetensors\n",
        "!curl -O -J -L https://huggingface.co/vorstcavry/mymodel/resolve/main/Cavry_V2.preview.png\n",
        "%cd /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/models/VAE\n",
        "!curl -O -J -L https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.ckpt\n",
        "\n",
        "%cd /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/models/Lora\n",
        "!curl -O -J -L https://huggingface.co/vorstcavry/loraasia1/resolve/main/japaneseDollLikeness_v15.safetensors\n",
        "!curl -O -J -L https://huggingface.co/vorstcavry/loraasia1/resolve/main/koreanDollLikeness_v20.safetensors\n",
        "!curl -O -J -L https://huggingface.co/vorstcavry/loraasia1/resolve/main/taiwanDollLikeness_v15.safetensors\n",
        "\n",
        "!pip install rich\n",
        "!pip install onnxruntime\n",
        "!pip install numexpr\n",
        "\n",
        "!wget https://raw.githubusercontent.com/vorstcavry/s-scripts/main/run_n_times.py -O /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/scripts/run_n_times.py\n",
        "#install-bahan-dasar\n",
        "\n",
        "!git clone https://github.com/vorstcavry/lora /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/models/Lora/Lora-set\n",
        "!rm -rf /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/models/Lora/Lora-set/.git\n",
        "%cd /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/embeddings\n",
        "!git clone https://github.com/vorstcavry/embeddings /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/embeddings/negative\n",
        "!rm -rf /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/embeddings/negative/.git\n",
        "\n",
        "#install-ekstension\n",
        "%cd /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/extensions-builtin/\n",
        "!git clone https://github.com/BlafKing/sd-civitai-browser-plus\n",
        "!git clone https://github.com/A-I-Channel/explorer-image\n",
        "!git clone https://github.com/Iyashinouta/sd-model-downloader\n",
        "!git clone https://github.com/NoCrypt/inpaint-nav\n",
        "!git clone https://tinyurl.com/tagcomplete-1111\n",
        "!git clone https://github.com/vorstcavry/Downloader\n",
        "!git clone https://tinyurl.com/aspect-ratio-v\n",
        "\n",
        "!sed -i -e '''/from modules import launch_utils/a\\import os''' /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/launch.py\n",
        "!sed -i -e '''/        prepare_environment()/a\\        os.system\\(f\\\"\"\"sed -i -e ''\\\"s/dict()))/dict())).cuda()/g\\\"'' /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/repositories/stable-diffusion-stability-ai/ldm/util.py\"\"\")''' /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/launch.py\n",
        "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/modules/shared.py\n",
        "\n",
        "%cd /home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry\n",
        "!rm -rf webui.py\n",
        "!curl -Lo \"/home/studio-lab-user/sagemaker-studiolab-notebooks/vorst-cavry/webui.py\" https://huggingface.co/vorstcavry/test/resolve/main/webui.py\n",
        "!pip install pyngrok\n",
        "authtoken=\"2Pru5tTivWjXNLotYH6jsGqJZRN_4MpnwGEaAEVKTgHJMt77t\"\n",
        "\n",
        "!python launch.py --share --disable-safe-unpickle --theme=dark --no-half-vae --enable-insecure-extension --gradio-queue --ngrok {authtoken}"
      ]
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}