Spaces:
Running
Running
test
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import spaces
|
|
| 5 |
from huggingface_hub import hf_hub_download
|
| 6 |
from utils import utils, tools, preprocess
|
| 7 |
|
| 8 |
-
BASE_MODEL_PATH = "stablediffusionapi/neta-art-xl-v2"
|
| 9 |
VAE_PATH = "madebyollin/sdxl-vae-fp16-fix"
|
| 10 |
REPO_ID = "Pbihao/ControlNeXt"
|
| 11 |
UNET_FILENAME = "ControlAny-SDXL/anime_canny/unet.safetensors"
|
|
@@ -23,6 +23,11 @@ def ui():
|
|
| 23 |
# filename='AAM_XL_Anime_Mix.safetensors',
|
| 24 |
# cache_dir=CACHE_DIR,
|
| 25 |
# )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
unet_file = hf_hub_download(
|
| 27 |
repo_id=REPO_ID,
|
| 28 |
filename=UNET_FILENAME,
|
|
@@ -35,7 +40,7 @@ def ui():
|
|
| 35 |
)
|
| 36 |
|
| 37 |
pipeline = tools.get_pipeline(
|
| 38 |
-
pretrained_model_name_or_path=
|
| 39 |
unet_model_name_or_path=unet_file,
|
| 40 |
controlnet_model_name_or_path=controlnet_file,
|
| 41 |
vae_model_name_or_path=VAE_PATH,
|
|
@@ -43,8 +48,7 @@ def ui():
|
|
| 43 |
load_weight_increasement=True,
|
| 44 |
device=device,
|
| 45 |
hf_cache_dir=CACHE_DIR,
|
| 46 |
-
use_safetensors=
|
| 47 |
-
variant=None,
|
| 48 |
)
|
| 49 |
|
| 50 |
preprocessors = ['canny']
|
|
|
|
| 5 |
from huggingface_hub import hf_hub_download
|
| 6 |
from utils import utils, tools, preprocess
|
| 7 |
|
| 8 |
+
# BASE_MODEL_PATH = "stablediffusionapi/neta-art-xl-v2"
|
| 9 |
VAE_PATH = "madebyollin/sdxl-vae-fp16-fix"
|
| 10 |
REPO_ID = "Pbihao/ControlNeXt"
|
| 11 |
UNET_FILENAME = "ControlAny-SDXL/anime_canny/unet.safetensors"
|
|
|
|
| 23 |
# filename='AAM_XL_Anime_Mix.safetensors',
|
| 24 |
# cache_dir=CACHE_DIR,
|
| 25 |
# )
|
| 26 |
+
model_file = hf_hub_download(
|
| 27 |
+
repo_id='Eugeoter/artiwaifu-diffusion-1.0',
|
| 28 |
+
filename='artiwaifu-diffusion-v1.safetensors',
|
| 29 |
+
cache_dir=CACHE_DIR,
|
| 30 |
+
)
|
| 31 |
unet_file = hf_hub_download(
|
| 32 |
repo_id=REPO_ID,
|
| 33 |
filename=UNET_FILENAME,
|
|
|
|
| 40 |
)
|
| 41 |
|
| 42 |
pipeline = tools.get_pipeline(
|
| 43 |
+
pretrained_model_name_or_path=model_file,
|
| 44 |
unet_model_name_or_path=unet_file,
|
| 45 |
controlnet_model_name_or_path=controlnet_file,
|
| 46 |
vae_model_name_or_path=VAE_PATH,
|
|
|
|
| 48 |
load_weight_increasement=True,
|
| 49 |
device=device,
|
| 50 |
hf_cache_dir=CACHE_DIR,
|
| 51 |
+
use_safetensors=True,
|
|
|
|
| 52 |
)
|
| 53 |
|
| 54 |
preprocessors = ['canny']
|