yui-futao commited on
Commit
c290d1b
·
1 Parent(s): cb343fc

Update setup_webui_yui.ipynb

Browse files
Files changed (1) hide show
  1. setup_webui_yui.ipynb +64 -0
setup_webui_yui.ipynb CHANGED
@@ -25,6 +25,69 @@
25
  "!pip install --upgrade gdown"
26
  ]
27
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  {
29
  "cell_type": "code",
30
  "execution_count": null,
@@ -131,6 +194,7 @@
131
  "!python launch.py\\\n",
132
  "--gradio-auth <gradio_username>:<gradio_password>\\\n",
133
  "--share\\\n",
 
134
  "--no-half-vae\\\n",
135
  "--skip-version-check\\\n",
136
  "--enable-insecure-extension-access"
 
25
  "!pip install --upgrade gdown"
26
  ]
27
  },
28
+ {
29
+ "cell_type": "code",
30
+ "execution_count": null,
31
+ "id": "2fe03bfa",
32
+ "metadata": {},
33
+ "outputs": [],
34
+ "source": [
35
+ "# install xformers\n",
36
+ "# https://rentry.co/paperspace_de_xformers\n",
37
+ "from pathlib import Path\n",
38
+ "%cd /notebooks/\n",
39
+ "! mkdir lora\n",
40
+ "\n",
41
+ "%cd lora\n",
42
+ "! git clone https://github.com/kohya-ss/sd-scripts.git\n",
43
+ "! git clone https://github.com/derrian-distro/LoRA_Easy_Training_Scripts.git\n",
44
+ "\n",
45
+ "%cd /notebooks/lora/sd-scripts\n",
46
+ "! cp ~/LoRA_Easy_Training_Scripts/lora_train_command_line.py ./\n",
47
+ "! apt install python3.10 python3.10-dev -y\n",
48
+ "! pip3.10 install setuptools\n",
49
+ "! apt autoremove python3-yaml python3-lxml --purge -y\n",
50
+ "! curl https://bootstrap.pypa.io/get-pip.py | python3.10\n",
51
+ "! pip3.10 install lxml\n",
52
+ "! pip3.10 install -U torch==1.12.1+cu116 torchvision==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116\n",
53
+ "! pip3.10 install `grep 'fairscale==' requirements.txt` --no-build-isolation\n",
54
+ "! pip3.10 install gradio==3.16.2 altair==4.2.2 easygui requests timm==0.4.12 \"tensorflow<2.11\" huggingface-hub\n",
55
+ "! pip3.10 install -r requirements.txt\n",
56
+ "! pip3.10 install -U --pre triton\n",
57
+ "! pip3.10 uninstall accelerate -y;pip3.10 install accelerate\n",
58
+ "! pip3.10 install -U https://github.com/ninele7/xfromers_builds/releases/download/3393900949/xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl\n",
59
+ "! sed -i 's/^accelerate.*//g' /notebooks/stable-diffusion-webui/requirements_versions.txt\n",
60
+ "d = Path(\"/root/.cache/huggingface/accelerate\")\n",
61
+ "if not d.exists():\n",
62
+ " d.mkdir(parents=True)\n",
63
+ "p = d / Path(\"default_config.yaml\")\n",
64
+ "p.write_text(\"\"\"command_file: null\n",
65
+ "commands: null\n",
66
+ "compute_environment: LOCAL_MACHINE\n",
67
+ "deepspeed_config: {}\n",
68
+ "distributed_type: 'NO'\n",
69
+ "downcast_bf16: 'no'\n",
70
+ "dynamo_backend: 'NO'\n",
71
+ "fsdp_config: {}\n",
72
+ "gpu_ids: all\n",
73
+ "machine_rank: 0\n",
74
+ "main_process_ip: null\n",
75
+ "main_process_port: null\n",
76
+ "main_training_function: main\n",
77
+ "megatron_lm_config: {}\n",
78
+ "mixed_precision: fp16\n",
79
+ "num_machines: 1\n",
80
+ "num_processes: 1\n",
81
+ "rdzv_backend: static\n",
82
+ "same_network: true\n",
83
+ "tpu_name: null\n",
84
+ "tpu_zone: null\n",
85
+ "use_cpu: false\"\"\")\n",
86
+ "\n",
87
+ "! echo FINISHED!\n",
88
+ "! date"
89
+ ]
90
+ },
91
  {
92
  "cell_type": "code",
93
  "execution_count": null,
 
194
  "!python launch.py\\\n",
195
  "--gradio-auth <gradio_username>:<gradio_password>\\\n",
196
  "--share\\\n",
197
+ "--xformers\\\n",
198
  "--no-half-vae\\\n",
199
  "--skip-version-check\\\n",
200
  "--enable-insecure-extension-access"