kael558 commited on
Commit
d6cae6c
·
1 Parent(s): 230b8f0

set half-precision off

Browse files
Files changed (1) hide show
  1. sd.py +3 -3
sd.py CHANGED
@@ -47,7 +47,7 @@ from ldm.models.diffusion.ddim import DDIMSampler
47
  from ldm.models.diffusion.plms import PLMSSampler
48
 
49
  # 2. Set model download config
50
- def load_model_from_config(config, ckpt, verbose=False, half_precision=True):
51
  map_location = "cuda" if torch.cuda.is_available() else "cpu"
52
  print(f"Loading model from {ckpt}")
53
  pl_sd = torch.load(ckpt, map_location=map_location)
@@ -233,8 +233,8 @@ def warpMatrix(W, H, theta, phi, gamma, scale, fV):
233
  d = np.sqrt(W * W + H * H)
234
  sideLength = scale * d / np.cos(fVhalf)
235
  h = d / (2.0 * np.sin(fVhalf))
236
- n = h - (d / 2.0);
237
- f = h + (d / 2.0);
238
 
239
  # Translation along Z-axis by -h
240
  T = np.eye(4, 4)
 
47
  from ldm.models.diffusion.plms import PLMSSampler
48
 
49
  # 2. Set model download config
50
+ def load_model_from_config(config, ckpt, verbose=False, half_precision=False):
51
  map_location = "cuda" if torch.cuda.is_available() else "cpu"
52
  print(f"Loading model from {ckpt}")
53
  pl_sd = torch.load(ckpt, map_location=map_location)
 
233
  d = np.sqrt(W * W + H * H)
234
  sideLength = scale * d / np.cos(fVhalf)
235
  h = d / (2.0 * np.sin(fVhalf))
236
+ n = h - (d / 2.0)
237
+ f = h + (d / 2.0)
238
 
239
  # Translation along Z-axis by -h
240
  T = np.eye(4, 4)