nsfwalex commited on
Commit
ee028b0
·
verified ·
1 Parent(s): d193d40

Update inference_manager.py

Browse files
Files changed (1) hide show
  1. inference_manager.py +3 -2
inference_manager.py CHANGED
@@ -25,6 +25,7 @@ from insightface.app import FaceAnalysis
25
  import cv2
26
  import re
27
  import gradio as gr
 
28
  from PIL import Image
29
  MAX_SEED = 12211231#np.iinfo(np.int32).max
30
  #from onediffx import compile_pipe, save_pipe, load_pipe
@@ -189,7 +190,7 @@ class InferenceManager:
189
  ckpt_dir,
190
  vae=vae,
191
  #unet=unet,
192
- torch_dtype=torch.bfloat16,
193
  use_safetensors=True,
194
  #variant="fp16",
195
  custom_pipeline = "lpw_stable_diffusion_xl",
@@ -202,7 +203,7 @@ class InferenceManager:
202
  load_time = round(time.time() - start, 2)
203
  print(f"Base model loaded in {load_time}s")
204
 
205
- if cfg.get("load_ip_adapter_faceid", False) and False:
206
  if model_version in ("pony", "xl"):
207
  ip_ckpt = self.ext_model_pathes.get("ip-adapter-faceid-sdxl", "")
208
  if ip_ckpt:
 
25
  import cv2
26
  import re
27
  import gradio as gr
28
+ import uuid
29
  from PIL import Image
30
  MAX_SEED = 12211231#np.iinfo(np.int32).max
31
  #from onediffx import compile_pipe, save_pipe, load_pipe
 
190
  ckpt_dir,
191
  vae=vae,
192
  #unet=unet,
193
+ torch_dtype=torch.float16,
194
  use_safetensors=True,
195
  #variant="fp16",
196
  custom_pipeline = "lpw_stable_diffusion_xl",
 
203
  load_time = round(time.time() - start, 2)
204
  print(f"Base model loaded in {load_time}s")
205
 
206
+ if cfg.get("load_ip_adapter_faceid", False):
207
  if model_version in ("pony", "xl"):
208
  ip_ckpt = self.ext_model_pathes.get("ip-adapter-faceid-sdxl", "")
209
  if ip_ckpt: