valhalla commited on
Commit
336be84
1 Parent(s): 2f10c4a
Files changed (1) hide show
  1. model.py +3 -1
model.py CHANGED
@@ -202,6 +202,8 @@ class Model:
202
  variant="fp16",
203
  ).to(self.device)
204
  self.pipe.enable_xformers_memory_efficient_attention()
 
 
205
  else:
206
  self.preprocessor = None # type: ignore
207
  self.pipe = None
@@ -278,7 +280,7 @@ class Model:
278
  image=image,
279
  num_inference_steps=num_inference_steps,
280
  adapter_conditioning_scale=adapter_conditioning_scale,
281
- cond_tau=cond_tau,
282
  generator=generator,
283
  guidance_scale=guidance_scale,
284
  ).images[0]
 
202
  variant="fp16",
203
  ).to(self.device)
204
  self.pipe.enable_xformers_memory_efficient_attention()
205
+ self.pipe.load_lora_weights("stabilityai/stable-diffusion-xl-base-1.0", weight_name="sd_xl_offset_example-lora_1.0.safetensors")
206
+ pipe.fuse_lora(lora_scale=0.4)
207
  else:
208
  self.preprocessor = None # type: ignore
209
  self.pipe = None
 
280
  image=image,
281
  num_inference_steps=num_inference_steps,
282
  adapter_conditioning_scale=adapter_conditioning_scale,
283
+ adapter_conditioning_factor=cond_tau,
284
  generator=generator,
285
  guidance_scale=guidance_scale,
286
  ).images[0]