Anwar786 commited on
Commit
c0859e3
1 Parent(s): a4ab2c2

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -44,7 +44,7 @@ class EndpointHandler():
44
  height = data.get("height", None)
45
  num_inference_steps = data.get("steps", 30)
46
  guidance_scale = data.get("cfg_scale", 7)
47
- sampler_index = data.get("sampler_index", "DPM++ 2M Karras") # Default to "DPM++ 2M Karras" if not provided
48
 
49
 
50
  # Extract controlnet configuration from payload
@@ -61,7 +61,7 @@ class EndpointHandler():
61
  width=width,
62
  controlnet_conditioning_scale=1.0,
63
  generator=self.generator,
64
- sampler_index=sampler_index # Pass the sampler_index to the stable diffusion process
65
  )
66
 
67
  # Get the generated image
 
44
  height = data.get("height", None)
45
  num_inference_steps = data.get("steps", 30)
46
  guidance_scale = data.get("cfg_scale", 7)
47
+
48
 
49
 
50
  # Extract controlnet configuration from payload
 
61
  width=width,
62
  controlnet_conditioning_scale=1.0,
63
  generator=self.generator,
64
+
65
  )
66
 
67
  # Get the generated image