Skip to content

Commit

Permalink
Add Load LoRA
Browse files Browse the repository at this point in the history
  • Loading branch information
teftef6220 committed Dec 23, 2023
1 parent a9030ee commit ac3b404
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demo/realtime-txt2img/server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class Config:
mode: Literal["txt2img", "img2img"] = "txt2img"
# SD1.x variant model
model_id_or_path: str = "KBlueLeaf/kohaku-v2.1"
# LoRA dictionary write like field(default_factory=lambda: {'E:/stable-diffusion-webui/models/Lora_1.safetensors' : 1.0 , 'E:/stable-diffusion-webui/models/Lora_2.safetensors' : 0.2})
lora_dict: dict = None
# LCM-LORA model
lcm_lora_id: str = "latent-consistency/lcm-lora-sdv1-5"
# TinyVAE model
Expand Down
1 change: 1 addition & 0 deletions demo/realtime-txt2img/server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __init__(self, config: Config) -> None:
self.stream_diffusion = StreamDiffusionWrapper(
mode=config.mode,
model_id_or_path=config.model_id_or_path,
lora_dict = config.lora_dict,
lcm_lora_id=config.lcm_lora_id,
vae_id=config.vae_id,
device=config.device,
Expand Down

0 comments on commit ac3b404

Please sign in to comment.