AIhgenerator commited on
Commit
b2cbe79
·
verified ·
1 Parent(s): 188cab1

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +15 -15
handler.py CHANGED
@@ -53,21 +53,21 @@ class EndpointHandler():
53
  ).images[0]
54
  print("image base latent")
55
 
56
- # image_base_latent = image_base_latent.to("cuda")
57
- # # Refine the image
58
- # image_refiner = self.pipe_refiner(
59
- # prompt=prompt,
60
- # prompt_2=prompt2,
61
- # negative_prompt=negative_prompt,
62
- # negative_prompt_2=negative_prompt2,
63
- # image=image_base_latent,
64
- # num_inference_steps=25,
65
- # height=1024,
66
- # width=1024,
67
- # strength=0.3,
68
- # denoising_start=0.8
69
- # ).images[0]
70
- # print("image refiner")
71
  # # Convert the image to a format that can be easily outputted
72
  # buffer = BytesIO()
73
  # image_refiner.save(buffer, format="JPEG")
 
53
  ).images[0]
54
  print("image base latent")
55
 
56
+ image_base_latent = image_base_latent.to("cuda")
57
+ # Refine the image
58
+ image_refiner = self.pipe_refiner(
59
+ prompt=prompt,
60
+ prompt_2=prompt2,
61
+ negative_prompt=negative_prompt,
62
+ negative_prompt_2=negative_prompt2,
63
+ image=image_base_latent,
64
+ num_inference_steps=25,
65
+ height=1024,
66
+ width=1024,
67
+ strength=0.3,
68
+ denoising_start=0.8
69
+ ).images[0]
70
+ print("image refiner")
71
  # # Convert the image to a format that can be easily outputted
72
  # buffer = BytesIO()
73
  # image_refiner.save(buffer, format="JPEG")