L4Walk commited on
Commit
1f05215
·
1 Parent(s): 6f49b37

改为CPU推理

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -85,7 +85,8 @@ def inference(
85
 
86
  pipe.scheduler = SAMPLER_MAP[sampler](pipe.scheduler.config)
87
 
88
- generator = torch.manual_seed(seed) if seed != -1 else torch.Generator()
 
89
 
90
  if qr_code_content != "" or qrcode_image.size == (1, 1):
91
  #print("Generating QR Code from content")
 
85
 
86
  pipe.scheduler = SAMPLER_MAP[sampler](pipe.scheduler.config)
87
 
88
+ generator = torch.manual_seed(
89
+ seed) if seed != -1 else torch.Generator(device="cpu")
90
 
91
  if qr_code_content != "" or qrcode_image.size == (1, 1):
92
  #print("Generating QR Code from content")