Skip to content

Commit

Permalink
Merge pull request #136 from intel/controlnet_refonly_initimage_fix
Browse files Browse the repository at this point in the history
Controlnet refonly initimage fix
  • Loading branch information
gblong1 authored Sep 25, 2024
2 parents c136cde + fcbef37 commit 84bc480
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def handle_client_data(data, conn, engine, model_name, model_path, scheduler):
output = engine(
prompt=prompt,
negative_prompt=negative_prompt,
init_image=Image.open(init_image),
image=Image.open(init_image),
scheduler=scheduler,
num_inference_steps=num_infer_steps,
guidance_scale=guidance_scale,
Expand Down Expand Up @@ -368,7 +368,7 @@ def handle_client_data(data, conn, engine, model_name, model_path, scheduler):

image = "sd_cache.png"

if "controlnet" in model_name or model_name == "sd_1.5_square_lcm" or "sd_3.0" in model_name:
if ("controlnet" in model_name or model_name == "sd_1.5_square_lcm" or "sd_3.0" in model_name) and "referenceonly" not in model_name:
output.save(os.path.join(weight_path, "..", image))
src_width, src_height = output.size
else:
Expand Down

0 comments on commit 84bc480

Please sign in to comment.