fix bug strength value should be float

This commit is contained in:
HappyZ 2023-04-30 21:13:00 -07:00
parent 725896ecc0
commit c3fa0334de
2 changed files with 3 additions and 6 deletions

View File

@ -437,7 +437,7 @@
if (isNaN(heightVal)) {
heightVal = 512;
}
var strengthVal = parseInt($('#inputStrength').val());
var strengthVal = parseFloat($('#inputStrength').val());
if (isNaN(strengthVal)) {
strengthVal = 0.5;
}

View File

@ -60,11 +60,8 @@ class Img2Img:
self.__logger.info("current seed: {}".format(seed))
if isinstance(reference_image, str):
reference_image = (
base64_to_image(reference_image)
.thumbnail((config.get_width(), config.get_height()))
.convert("RGB")
)
reference_image = base64_to_image(reference_image).convert("RGB")
reference_image.thumbnail((config.get_width(), config.get_height()))
result = self.model.img2img_pipeline(
prompt=prompt,