Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -148,43 +148,17 @@ DownLoad(r"https://huggingface.co/Yntec/epiCPhotoGasm/resolve/main/epiCPhotoGasm
|
|
148 |
DownLoad(r"https://civitai.com/api/download/models/39885",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks" / r"models"/ r"lora"),r"Better_light.safetensors")
|
149 |
DownLoad(r"https://civitai.com/api/download/models/21065",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks" / r"models"/ r"lora"),r"LAS.safetensors")
|
150 |
DownLoad(r"https://civitai.com/api/download/models/39164",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks" / r"models"/ r"lora"),r"backlighting.safetensors")
|
151 |
-
#strt webui
|
152 |
|
153 |
-
# Stable Diffusion WebUI のディレクトリを設定
|
154 |
-
webui_dir = user_home / "stable-diffusion-webui"
|
155 |
-
|
156 |
-
# 拡張機能のインストール先
|
157 |
-
extensions_dir = webui_dir / "extensions"
|
158 |
-
|
159 |
-
# 拡張機能のクローン先
|
160 |
-
fluxdev_dir = extensions_dir / "Fluxdev"
|
161 |
-
fluxschnell_dir = extensions_dir / "Fluxschnell"
|
162 |
-
|
163 |
-
# モデルの保存先
|
164 |
-
model_dir = webui_dir / "models" / "Stable-diffusion"
|
165 |
-
|
166 |
-
# ダウンロードするモデルのURL(適宜変更)
|
167 |
-
model_url = "https://civitai.com/api/download/models/39164"
|
168 |
-
model_path = model_dir / "backlighting.safetensors"
|
169 |
-
|
170 |
-
# WebUI のディレクトリへ移動
|
171 |
-
os.chdir(webui_dir)
|
172 |
-
|
173 |
-
# Fluxdev のインストール
|
174 |
-
if not fluxdev_dir.exists():
|
175 |
-
os.system(f"git clone https://github.com/FluxAi/Fluxdev {fluxdev_dir}")
|
176 |
-
|
177 |
-
# Fluxschnell のインストール
|
178 |
-
if not fluxschnell_dir.exists():
|
179 |
-
os.system(f"git clone https://github.com/FluxAi/Fluxschnell {fluxschnell_dir}")
|
180 |
-
|
181 |
-
# モデルフォルダが存在しない場合は作成
|
182 |
-
model_dir.mkdir(parents=True, exist_ok=True)
|
183 |
-
|
184 |
-
# モデルをダウンロード(すでに存在しない場合のみ)
|
185 |
if not model_path.exists():
|
186 |
os.system(f"wget {model_url} -O {model_path}")
|
187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
|
190 |
print("Done\nStarting Webui...")
|
|
|
148 |
DownLoad(r"https://civitai.com/api/download/models/39885",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks" / r"models"/ r"lora"),r"Better_light.safetensors")
|
149 |
DownLoad(r"https://civitai.com/api/download/models/21065",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks" / r"models"/ r"lora"),r"LAS.safetensors")
|
150 |
DownLoad(r"https://civitai.com/api/download/models/39164",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks" / r"models"/ r"lora"),r"backlighting.safetensors")
|
|
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
if not model_path.exists():
|
153 |
os.system(f"wget {model_url} -O {model_path}")
|
154 |
|
155 |
+
# Flux モデルの URL を指定
|
156 |
+
flux_model_url = "https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/flux1-dev.safetensors"
|
157 |
+
flux_model_path = model_dir / "flux1-dev.safetensors"
|
158 |
+
|
159 |
+
# モデルをダウンロード(まだ存在しない場合のみ)
|
160 |
+
if not flux_model_path.exists():
|
161 |
+
os.system(f"wget {flux_model_url} -O {flux_model_path}")
|
162 |
|
163 |
|
164 |
print("Done\nStarting Webui...")
|