halimbahae commited on
Commit
4c21da3
·
verified ·
1 Parent(s): 95da0b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -40,6 +40,9 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
40
  generator=generator
41
  ).images[0]
42
 
 
 
 
43
  # Convert the image to PIL format for overlaying the watermark
44
  pil_image = Image.fromarray(image)
45
 
@@ -60,6 +63,7 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
60
 
61
 
62
 
 
63
  examples = [
64
  "Sunset over the Atlas Mountains",
65
  "Traditional Amazigh jewelry under the moonlight",
 
40
  generator=generator
41
  ).images[0]
42
 
43
+ # Ensure image is in uint8 format
44
+ image = (255 * np.clip(image, 0, 1)).astype(np.uint8)
45
+
46
  # Convert the image to PIL format for overlaying the watermark
47
  pil_image = Image.fromarray(image)
48
 
 
63
 
64
 
65
 
66
+
67
  examples = [
68
  "Sunset over the Atlas Mountains",
69
  "Traditional Amazigh jewelry under the moonlight",