Skip to content

Commit df016a3

Browse files
committed
lora_scales and removed single score + haslib imported
1 parent 676700c commit df016a3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

predict.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from hashlib import sha512
12
import json
23
import os
34
import requests
@@ -365,11 +366,9 @@ def predict(
365366
description="List of urls for safetensors of lora models, seperated with | .",
366367
default="",
367368
),
368-
lora_scale: float = Input(
369-
description="LoRA additive scale. Only applicable on trained models.",
370-
ge=0.0,
371-
le=1.0,
372-
default=0.6,
369+
lora_scales: str = Input(
370+
description="List of scales for safetensors of lora models, seperated with | ",
371+
default="0.5",
373372
),
374373
) -> List[Path]:
375374
"""Run a single prediction on the model"""
@@ -436,8 +435,8 @@ def predict(
436435
"num_inference_steps": num_inference_steps,
437436
}
438437

439-
if self.is_lora:
440-
sdxl_kwargs["cross_attention_kwargs"] = {"scale": lora_scale}
438+
# if self.is_lora:
439+
# sdxl_kwargs["cross_attention_kwargs"] = {"scale": lora_scale}
441440

442441
output = pipe(**common_args, **sdxl_kwargs)
443442

0 commit comments

Comments
 (0)