Spaces:
Running
Running
Commit
•
94d37e3
1
Parent(s):
5db56dd
app.py: fixed loras.
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import base64
|
|
7 |
from io import BytesIO
|
8 |
import PIL.Image
|
9 |
from typing import Tuple
|
10 |
-
from novita_client import NovitaClient,
|
11 |
from time import time
|
12 |
|
13 |
from style_template import styles
|
@@ -329,6 +329,10 @@ def generate_image (
|
|
329 |
prompt=prompt,
|
330 |
negative_prompt=negative_prompt,
|
331 |
controlnets=[CONTROLNET_DICT[name] for name in controlnet_selection if name in CONTROLNET_DICT],
|
|
|
|
|
|
|
|
|
332 |
steps=num_steps,
|
333 |
seed=seed,
|
334 |
guidance_scale=guidance_scale,
|
|
|
7 |
from io import BytesIO
|
8 |
import PIL.Image
|
9 |
from typing import Tuple
|
10 |
+
from novita_client import NovitaClient, InstantIDControlnetUnit, InstantIDLora
|
11 |
from time import time
|
12 |
|
13 |
from style_template import styles
|
|
|
329 |
prompt=prompt,
|
330 |
negative_prompt=negative_prompt,
|
331 |
controlnets=[CONTROLNET_DICT[name] for name in controlnet_selection if name in CONTROLNET_DICT],
|
332 |
+
loras=[InstantIDLora(
|
333 |
+
model_name=f'{name}.safetensors',
|
334 |
+
strength=1,
|
335 |
+
) for name in lora_selection],
|
336 |
steps=num_steps,
|
337 |
seed=seed,
|
338 |
guidance_scale=guidance_scale,
|