Oysiyl commited on
Commit
8736bbd
1 Parent(s): 8ea0e38

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +4 -5
handler.py CHANGED
@@ -21,11 +21,10 @@ class EndpointHandler():
21
  # Load StableDiffusionPipeline
22
  self.stable_diffusion_id = "runwayml/stable-diffusion-v1-5"
23
  self.pipe = AutoPipelineForText2Image.from_pretrained(self.stable_diffusion_id,
24
- torch_dtype=dtype,
25
- safety_checker=None)
26
- pipe.load_lora_weights("pytorch_lora_weights.safetensors")
27
- pipe.enable_xformers_memory_efficient_attention()
28
- pipe = pipe.to(device)
29
  self.seed = 42
30
  # Define Generator with seed
31
  self.generator = torch.Generator(device="cpu").manual_seed(self.seed)
 
21
  # Load StableDiffusionPipeline
22
  self.stable_diffusion_id = "runwayml/stable-diffusion-v1-5"
23
  self.pipe = AutoPipelineForText2Image.from_pretrained(self.stable_diffusion_id,
24
+ torch_dtype=dtype)
25
+ self.pipe.load_lora_weights("pytorch_lora_weights.safetensors")
26
+ self.pipe.enable_xformers_memory_efficient_attention()
27
+ self.pipe = self.pipe.to(device)
 
28
  self.seed = 42
29
  # Define Generator with seed
30
  self.generator = torch.Generator(device="cpu").manual_seed(self.seed)