fffiloni commited on
Commit
1c5960f
1 Parent(s): 6d03b8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -108,7 +108,6 @@ def process_brightness(
108
 
109
  def infer(video_in, trim_value, prompt,
110
  negative_prompt,
111
- conditioning_image,
112
  num_inference_steps=30,
113
  size=768,
114
  guidance_scale=7.0,
@@ -132,9 +131,9 @@ def infer(video_in, trim_value, prompt,
132
 
133
  for i, image in enumerate(frames_list[0:int(n_frame)]):
134
 
135
- image = Image.open(image).convert("RGB")
136
- image = np.array(image)
137
- output_frame = process_brightness(image,
138
  prompt,
139
  negative_prompt,
140
  conditioning_image,
@@ -219,7 +218,7 @@ with gr.Blocks() as demo:
219
  submit_btn.click(
220
  fn=infer,
221
  inputs=[
222
- video_in, prompt, trim_in, negative_prompt, conditioning_image, num_inference_steps, size, guidance_scale, seed
223
  ],
224
  outputs=output
225
  )
 
108
 
109
  def infer(video_in, trim_value, prompt,
110
  negative_prompt,
 
111
  num_inference_steps=30,
112
  size=768,
113
  guidance_scale=7.0,
 
131
 
132
  for i, image in enumerate(frames_list[0:int(n_frame)]):
133
 
134
+ conditioning_image = Image.open(image).convert("L") #convert to greyscale
135
+ conditioning_image = np.array(image)
136
+ output_frame = process_brightness(
137
  prompt,
138
  negative_prompt,
139
  conditioning_image,
 
218
  submit_btn.click(
219
  fn=infer,
220
  inputs=[
221
+ video_in, prompt, trim_in, negative_prompt, num_inference_steps, size, guidance_scale, seed
222
  ],
223
  outputs=output
224
  )