pablo commited on
Commit
8603848
1 Parent(s): 30d519e

estaba puro weando

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -68,6 +68,8 @@ def predict(dict, depth, prompt="", negative_prompt="", guidance_scale=7.5, step
68
  negative_prompt = None
69
  scheduler_class_name = scheduler.split("-")[0]
70
 
 
 
71
  if (depth == None):
72
  depth_image = estimate_depth(image)
73
  else:
@@ -76,9 +78,8 @@ def predict(dict, depth, prompt="", negative_prompt="", guidance_scale=7.5, step
76
  scheduler = getattr(diffusers, scheduler_class_name)
77
  pipe.scheduler = scheduler.from_pretrained("Intel/ldm3d-4c", subfolder="scheduler")
78
 
79
- init_image = dict["image"].convert("RGB").resize((512, 512))
80
  mask = dict["mask"].convert("RGB").resize((512, 512))
81
- depth_image = depth.resize((512, 512))
82
 
83
  output = pipe(prompt = prompt, negative_prompt=negative_prompt, image=init_image, mask_image=mask, depth_image=depth_image, guidance_scale=guidance_scale, num_inference_steps=int(steps), strength=strength)
84
 
 
68
  negative_prompt = None
69
  scheduler_class_name = scheduler.split("-")[0]
70
 
71
+ init_image = dict["image"].convert("RGB").resize((512, 512))
72
+
73
  if (depth == None):
74
  depth_image = estimate_depth(image)
75
  else:
 
78
  scheduler = getattr(diffusers, scheduler_class_name)
79
  pipe.scheduler = scheduler.from_pretrained("Intel/ldm3d-4c", subfolder="scheduler")
80
 
 
81
  mask = dict["mask"].convert("RGB").resize((512, 512))
82
+ depth_image = depth_image.resize((512, 512))
83
 
84
  output = pipe(prompt = prompt, negative_prompt=negative_prompt, image=init_image, mask_image=mask, depth_image=depth_image, guidance_scale=guidance_scale, num_inference_steps=int(steps), strength=strength)
85