jonathanpark commited on
Commit
8dbd200
1 Parent(s): 103d66b

add strength parameter

Browse files
Files changed (1) hide show
  1. handler.py +2 -0
handler.py CHANGED
@@ -62,6 +62,7 @@ class EndpointHandler():
62
  guidance_scale = params.pop("guidance_scale", 7.5)
63
  negative_prompt = params.pop("negative_prompt", None)
64
  height = params.pop("height", None)
 
65
  width = params.pop("width", None)
66
  manual_seed = params.pop("manual_seed", -1)
67
 
@@ -72,6 +73,7 @@ class EndpointHandler():
72
  # run img2img pipeline
73
  out = self.imgPipe(prompt,
74
  image=init_image,
 
75
  num_inference_steps=num_inference_steps,
76
  guidance_scale=guidance_scale,
77
  num_images_per_prompt=1,
 
62
  guidance_scale = params.pop("guidance_scale", 7.5)
63
  negative_prompt = params.pop("negative_prompt", None)
64
  height = params.pop("height", None)
65
+ strength = params.pop("height", 0.8)
66
  width = params.pop("width", None)
67
  manual_seed = params.pop("manual_seed", -1)
68
 
 
73
  # run img2img pipeline
74
  out = self.imgPipe(prompt,
75
  image=init_image,
76
+ strength=strength,
77
  num_inference_steps=num_inference_steps,
78
  guidance_scale=guidance_scale,
79
  num_images_per_prompt=1,