sergeipetrov commited on
Commit
9c2101e
·
verified ·
1 Parent(s): 5db98e0

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +4 -1
handler.py CHANGED
@@ -14,6 +14,10 @@ logger.setLevel(logging.DEBUG)
14
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
15
  subprocess.run("nvidia-smi")
16
 
 
 
 
 
17
  logger.info(f"device: {device}")
18
 
19
  class EndpointHandler():
@@ -44,7 +48,6 @@ class EndpointHandler():
44
 
45
  parameters = data.pop("parameters", data)
46
  prompt = parameters['prompt']
47
- subprocess.run("nvidia-smi")
48
 
49
  images = self.pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images
50
 
 
14
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
15
  subprocess.run("nvidia-smi")
16
 
17
+ logger.info(f"torch version: {torch.__version__}")
18
+ logger.info(f"diffusers version: {diffusers.__version__}")
19
+ logger.info(f"transformers version: {transformers.__version__}")
20
+
21
  logger.info(f"device: {device}")
22
 
23
  class EndpointHandler():
 
48
 
49
  parameters = data.pop("parameters", data)
50
  prompt = parameters['prompt']
 
51
 
52
  images = self.pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images
53