suvadityamuk HF Staff commited on
Commit
30e4ae1
·
verified ·
1 Parent(s): b2eccb8

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -128,7 +128,9 @@ def generate_panorama(prompt, crop_width, num_inference_steps, guidance_scale, s
128
  crop_width = int(crop_width)
129
  num_inference_steps = int(num_inference_steps)
130
  guidance_scale = float(guidance_scale)
131
- seed = int(seed)
 
 
132
 
133
  t_start = time.perf_counter()
134
 
 
128
  crop_width = int(crop_width)
129
  num_inference_steps = int(num_inference_steps)
130
  guidance_scale = float(guidance_scale)
131
+ # Clamp into uint32 range: the tiled noise seeds a np.uint32 SeedSequence, so a
132
+ # negative or oversized seed would overflow and crash the request.
133
+ seed = int(seed) % (2**32)
134
 
135
  t_start = time.perf_counter()
136