tight-inversion commited on
Commit
577e44b
·
1 Parent(s): 96fea2f
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -26,7 +26,6 @@ def get_models(name: str, device: torch.device, offload: bool, fp8: bool):
26
  model = load_flow_model(name, device="cpu" if offload else device)
27
  model.eval()
28
  ae = load_ae(name, device=device)
29
- ae.to(device=device, dtype=torch.bfloat16)
30
  return model, ae, t5, clip
31
 
32
 
@@ -66,7 +65,7 @@ class FluxGenerator:
66
  if self.offload:
67
  self.ae.encoder.to(self.device)
68
 
69
- x = x.to(self.device, dtype=torch.bfloat16)
70
 
71
  # 2) Encode with autocast
72
  with torch.autocast(device_type=self.device.type, dtype=torch.bfloat16):
 
26
  model = load_flow_model(name, device="cpu" if offload else device)
27
  model.eval()
28
  ae = load_ae(name, device=device)
 
29
  return model, ae, t5, clip
30
 
31
 
 
65
  if self.offload:
66
  self.ae.encoder.to(self.device)
67
 
68
+ x = x.to(self.device)
69
 
70
  # 2) Encode with autocast
71
  with torch.autocast(device_type=self.device.type, dtype=torch.bfloat16):