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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,11 +32,11 @@ def pil_image_to_data_uri(img, format='PNG'):
32
  def run(image, item_name):
33
  print("sketch updated")
34
  print(image)
35
- if image["composite"] is None:
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["composite"].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()
 
32
  def run(image, item_name):
33
  print("sketch updated")
34
  print(image)
35
+ if image["layers"][0] is None:
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()