2023-02-26 02:19:48 +01:00
|
|
|
def test_load_model():
|
2023-03-22 05:57:18 +01:00
|
|
|
from lama_cleaner.plugins import InteractiveSeg
|
2023-02-26 02:19:48 +01:00
|
|
|
from lama_cleaner.model_manager import ModelManager
|
|
|
|
|
2023-12-28 03:48:52 +01:00
|
|
|
interactive_seg_model = InteractiveSeg("vit_l", "cpu")
|
2023-02-26 02:19:48 +01:00
|
|
|
|
2023-12-28 03:48:52 +01:00
|
|
|
models = ["lama", "ldm", "zits", "mat", "fcf", "manga", "migan"]
|
2023-02-26 02:19:48 +01:00
|
|
|
for m in models:
|
|
|
|
ModelManager(
|
|
|
|
name=m,
|
|
|
|
device="cpu",
|
|
|
|
no_half=False,
|
|
|
|
disable_nsfw=False,
|
|
|
|
sd_cpu_textencoder=True,
|
|
|
|
cpu_offload=True,
|
|
|
|
)
|