Spaces:
Sleeping
Sleeping
File size: 698 Bytes
1975737 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import torch
from diffusers import DiffusionPipeline
import config
def initialize_diffusion_model():
pretrained_model_name_or_path = config.STABLE_DIFFUSION_MODEL
pipe = DiffusionPipeline.from_pretrained(pretrained_model_name_or_path,
torch_dtype=torch.float16).to(config.DEVICE)
pipe.load_textual_inversion("sd-concepts-library/dreams")
pipe.load_textual_inversion("sd-concepts-library/midjourney-style")
pipe.load_textual_inversion("sd-concepts-library/moebius")
pipe.load_textual_inversion("sd-concepts-library/style-of-marc-allante")
pipe.load_textual_inversion("sd-concepts-library/wlop-style")
return pipe |