iciromaco commited on
Commit
f8a1b9a
·
verified ·
1 Parent(s): da27493

Update Fooocus_onColabwithMM.ipynb

Browse files
Files changed (1) hide show
  1. Fooocus_onColabwithMM.ipynb +9 -8
Fooocus_onColabwithMM.ipynb CHANGED
@@ -123,14 +123,16 @@
123
  "print(f\"ja.json downloaded and saved to {ja_json_path}\")\n",
124
  "\n",
125
  "# MM用のプリセットを追加\n",
126
- "mm_json_url = \"https://huggingface.co/iciromaco/mm/raw/main/mm_preset.json\"\n",
127
- "mm_json_path = \"/content/Fooocus/presets/mm_preset.json\" if GPU_ready else \"/content/Fooocus/presets/mm_cpu_preset.json\"\n",
 
128
  "os.makedirs(os.path.dirname(mm_json_path), exist_ok=True)\n",
129
  "!curl -L -o {mm_json_path} {mm_json_url}\n",
130
  "print(f\"mm_preset.json downloaded and saved to {mm_json_path}\")\n",
131
  "\n",
132
  "# アニメ版の設定ファイルのパッチ(最新版)を追加\n",
133
- "anime_json_url = \"https://raw.githubusercontent.com/aquapathos/FooocusJAni/refs/heads/main/anime.json\"\n",
 
134
  "anime_json_path = \"/content/Fooocus/presets/anime.json\"\n",
135
  "os.makedirs(os.path.dirname(anime_json_path), exist_ok=True)\n",
136
  "!curl -L -o {anime_json_path} {anime_json_url}\n",
@@ -175,7 +177,6 @@
175
  "モデルタイプ = \"MM\" # @param [\"デフォルト\", \"アニメ\",\"MM\"] {allow-input: true}\n",
176
  "\n",
177
  "if 翻訳機能:\n",
178
- " print(\"H\")\n",
179
  " !git clone https://github.com/AlekPet/Fooocus_Extensions_AlekPet.git\n",
180
  " !mv Fooocus_Extensions_AlekPet/prompt_translate/webui.py .\n",
181
  " !mv Fooocus_Extensions_AlekPet/prompt_translate/modules/* ./modules\n",
@@ -207,13 +208,13 @@
207
  " elif モデルタイプ == \"デフォルト\" and 日本語メニュー :\n",
208
  " !python entry_with_update.py --always-cpu 1 --unet-in-fp8-e5m2 --all-in-fp16 --attention-split --output-path {target_local_dir} --share --language ja\n",
209
  " elif モデルタイプ == \"アニメ\" and not 日本語メニュー:\n",
210
- " !python entry_with_update.py --always-cpu 1 --unet-in-fp8-e5m2 --all-in-fp16 --attention-split --preset anime_cpu --output-path {target_local_dir} --share\n",
211
  " elif モデルタイプ == \"アニメ\" and 日本語メニュー:\n",
212
- " !python entry_with_update.py --always-cpu 1 --unet-in-fp8-e5m2 --all-in-fp16 --attention-split --preset anime_cpu --output-path {target_local_dir} --share --language ja\n",
213
  " elif モデルタイプ == \"MM\" and not 日本語メニュー:\n",
214
- " !python entry_with_update.py --always-cpu 1 --unet-in-fp8-e5m2 --all-in-fp16 --attention-split --preset mm_cpu_preset --output-path {target_local_dir} --share\n",
215
  " elif モデルタイプ == \"MM\" and 日本語メニュー:\n",
216
- " !python entry_with_update.py --always-cpu 1 --unet-in-fp8-e5m2 --all-in-fp16 --attention-split --preset mm_cpu_preset --output-path {target_local_dir} --share --language ja\n"
217
  ],
218
  "metadata": {
219
  "id": "4AUIG7Xsutxx",
 
123
  "print(f\"ja.json downloaded and saved to {ja_json_path}\")\n",
124
  "\n",
125
  "# MM用のプリセットを追加\n",
126
+ "mm_json_url = \"mm_preset.json\" if GPU_ready else \"mm_cpu_preset.json\"\n",
127
+ "mm_json_url = f\"https://raw.githubusercontent.com/aquapathos/FooocusJAni/refs/heads/main/{mm_json_url}\"\n",
128
+ "mm_json_path = \"/content/Fooocus/presets/mm_preset.json\"\n",
129
  "os.makedirs(os.path.dirname(mm_json_path), exist_ok=True)\n",
130
  "!curl -L -o {mm_json_path} {mm_json_url}\n",
131
  "print(f\"mm_preset.json downloaded and saved to {mm_json_path}\")\n",
132
  "\n",
133
  "# アニメ版の設定ファイルのパッチ(最新版)を追加\n",
134
+ "anime_json_url = \"anime.json\" if GPU_ready else \"anime_cpu.json\"\n",
135
+ "anime_json_url = f\"https://raw.githubusercontent.com/aquapathos/FooocusJAni/refs/heads/main/{anime_json_url}\"\n",
136
  "anime_json_path = \"/content/Fooocus/presets/anime.json\"\n",
137
  "os.makedirs(os.path.dirname(anime_json_path), exist_ok=True)\n",
138
  "!curl -L -o {anime_json_path} {anime_json_url}\n",
 
177
  "モデルタイプ = \"MM\" # @param [\"デフォルト\", \"アニメ\",\"MM\"] {allow-input: true}\n",
178
  "\n",
179
  "if 翻訳機能:\n",
 
180
  " !git clone https://github.com/AlekPet/Fooocus_Extensions_AlekPet.git\n",
181
  " !mv Fooocus_Extensions_AlekPet/prompt_translate/webui.py .\n",
182
  " !mv Fooocus_Extensions_AlekPet/prompt_translate/modules/* ./modules\n",
 
208
  " elif モデルタイプ == \"デフォルト\" and 日本語メニュー :\n",
209
  " !python entry_with_update.py --always-cpu 1 --unet-in-fp8-e5m2 --all-in-fp16 --attention-split --output-path {target_local_dir} --share --language ja\n",
210
  " elif モデルタイプ == \"アニメ\" and not 日本語メニュー:\n",
211
+ " !python entry_with_update.py --always-cpu 1 --unet-in-fp8-e5m2 --all-in-fp16 --attention-split --preset anime --output-path {target_local_dir} --share\n",
212
  " elif モデルタイプ == \"アニメ\" and 日本語メニュー:\n",
213
+ " !python entry_with_update.py --always-cpu 1 --unet-in-fp8-e5m2 --all-in-fp16 --attention-split --preset anime --output-path {target_local_dir} --share --language ja\n",
214
  " elif モデルタイプ == \"MM\" and not 日本語メニュー:\n",
215
+ " !python entry_with_update.py --always-cpu 1 --unet-in-fp8-e5m2 --all-in-fp16 --attention-split --preset mm_preset --output-path {target_local_dir} --share\n",
216
  " elif モデルタイプ == \"MM\" and 日本語メニュー:\n",
217
+ " !python entry_with_update.py --always-cpu 1 --unet-in-fp8-e5m2 --all-in-fp16 --attention-split --preset mm_preset --output-path {target_local_dir} --share --language ja\n"
218
  ],
219
  "metadata": {
220
  "id": "4AUIG7Xsutxx",