Spaces:
Runtime error
Runtime error
import diffusers.schedulers | |
import os | |
from pathlib import Path | |
assets_directory = Path(__file__).parent / "ui_assets" | |
is_hfspace = "SPACE_REPO_NAME" in os.environ | |
scheduler_dict = { | |
k: v | |
for k, v in diffusers.schedulers.__dict__.items() | |
if "Scheduler" in k and "Flax" not in k | |
} | |
scheduler_dict.pop( | |
"VQDiffusionScheduler", None | |
) # requires unique parameter, unlike other schedulers | |
scheduler_names = list(scheduler_dict.keys()) | |
default_scheduler = "UniPCMultistepScheduler" | |
with open(assets_directory / "model_ids.txt", "r") as fp: | |
model_ids = fp.read().splitlines() | |
with open(assets_directory / "controlnet_ids.txt", "r") as fp: | |
controlnet_ids = fp.read().splitlines() | |