Skip to content

Commit

Permalink
fix qr code without background image
Browse files Browse the repository at this point in the history
  • Loading branch information
dkackman committed Feb 11, 2024
1 parent 9585459 commit c176e0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions swarm/job_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ async def format_img2img_args(args, parameters, size, device_identifier):
args, parameters, start_image, size, device_identifier
)
if "pipeline_type" not in parameters:
# TODO don't rely on large_model flag for this
if parameters.get("large_model", False):
parameters[
"pipeline_type"
Expand All @@ -272,7 +271,6 @@ async def format_img2img_args(args, parameters, size, device_identifier):
parameters["pipeline_type"] = "StableDiffusionControlNetImg2ImgPipeline"

elif "pipeline_type" not in parameters:
# TODO don't rely on large_model flag for this
if parameters.get("large_model", False):
parameters["pipeline_type"] = "StableDiffusionXLImg2ImgPipeline"
else:
Expand All @@ -289,6 +287,10 @@ async def format_img2img_args(args, parameters, size, device_identifier):
# image_guidance_scale has a range of 1-5 instead 0-1
args["image_guidance_scale"] = args.pop("strength", 0.6) * 5

# if we don't have a start image but do have a control image
if start_image is None and args["control_image"] is not None:
start_image = args["control_image"]

if start_image is None:
raise ValueError("Workflow requires an input image. None provided")

Expand Down

0 comments on commit c176e0c

Please sign in to comment.