francescoKrnl commited on
Commit
e222991
1 Parent(s): 482d0e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -36,7 +36,8 @@ def run(image, item_name):
36
  ones = Image.new("L", (512, 512), 255)
37
  return ones
38
  prompt = item_name + " professional 3d model. octane render, highly detailed, volumetric, dramatic lighting"
39
- image = image["layers"][0].convert("RGB")
 
40
  image_t = TF.to_tensor(image) > 0.5
41
  with torch.no_grad():
42
  c_t = image_t.unsqueeze(0).cuda().float()
 
36
  ones = Image.new("L", (512, 512), 255)
37
  return ones
38
  prompt = item_name + " professional 3d model. octane render, highly detailed, volumetric, dramatic lighting"
39
+ inverted_image = PIL.ImageOps.invert(image["layers"][0])
40
+ image = inverted_image.convert("RGB")
41
  image_t = TF.to_tensor(image) > 0.5
42
  with torch.no_grad():
43
  c_t = image_t.unsqueeze(0).cuda().float()