Commit
•
86c6ead
1
Parent(s):
55ca821
Update handler.py
Browse files- handler.py +3 -3
handler.py
CHANGED
@@ -42,13 +42,13 @@ class EndpointHandler():
|
|
42 |
#self.pipe = self.pipe.to(device)
|
43 |
|
44 |
self.pipe2 = AutoPipelineForInpainting.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
45 |
-
self.pipe2.enable_model_cpu_offload()
|
46 |
self.pipe2.enable_xformers_memory_efficient_attention()
|
47 |
|
48 |
-
|
49 |
|
50 |
self.pipe3 = AutoPipelineForImage2Image.from_pipe(self.pipe2)
|
51 |
-
self.pipe3.enable_model_cpu_offload()
|
52 |
self.pipe3.enable_xformers_memory_efficient_attention()
|
53 |
|
54 |
|
|
|
42 |
#self.pipe = self.pipe.to(device)
|
43 |
|
44 |
self.pipe2 = AutoPipelineForInpainting.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
45 |
+
#self.pipe2.enable_model_cpu_offload()
|
46 |
self.pipe2.enable_xformers_memory_efficient_attention()
|
47 |
|
48 |
+
self.pipe2.to("cuda")
|
49 |
|
50 |
self.pipe3 = AutoPipelineForImage2Image.from_pipe(self.pipe2)
|
51 |
+
#self.pipe3.enable_model_cpu_offload()
|
52 |
self.pipe3.enable_xformers_memory_efficient_attention()
|
53 |
|
54 |
|