linoyts HF staff commited on
Commit
7c81d9d
1 Parent(s): 2d30f4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -42,15 +42,15 @@ def generate(slider_x, slider_y, prompt, iterations, steps,
42
 
43
  @spaces.GPU
44
  def update_x(x,y,prompt, steps, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2):
45
- avg_diff = [avg_diff_x_1.cuda(), avg_diff_x_2.cuda()]
46
- avg_diff_2nd = [avg_diff_y_1.cuda(), avg_diff_y_2.cuda()]
47
  image = clip_slider.generate(prompt, scale=x, scale_2nd=y, num_inference_steps=steps, avg_diff=avg_diff,avg_diff_2nd=avg_diff_2nd)
48
  return image
49
 
50
  @spaces.GPU
51
  def update_y(x,y,prompt, steps, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2):
52
- avg_diff = [avg_diff_x_1.cuda(), avg_diff_x_2.cuda()]
53
- avg_diff_2nd = [avg_diff_y_1.cuda(), avg_diff_y_2.cuda()]
54
  image = clip_slider.generate(prompt, scale=x, scale_2nd=y, num_inference_steps=steps, avg_diff=avg_diff,avg_diff_2nd=avg_diff_2nd)
55
  return image
56
 
 
42
 
43
  @spaces.GPU
44
  def update_x(x,y,prompt, steps, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2):
45
+ avg_diff = (avg_diff_x_1.cuda(), avg_diff_x_2.cuda())
46
+ avg_diff_2nd = (avg_diff_y_1.cuda(), avg_diff_y_2.cuda())
47
  image = clip_slider.generate(prompt, scale=x, scale_2nd=y, num_inference_steps=steps, avg_diff=avg_diff,avg_diff_2nd=avg_diff_2nd)
48
  return image
49
 
50
  @spaces.GPU
51
  def update_y(x,y,prompt, steps, avg_diff_x_1, avg_diff_x_2, avg_diff_y_1, avg_diff_y_2):
52
+ avg_diff = (avg_diff_x_1.cuda(), avg_diff_x_2.cuda())
53
+ avg_diff_2nd = (avg_diff_y_1.cuda(), avg_diff_y_2.cuda())
54
  image = clip_slider.generate(prompt, scale=x, scale_2nd=y, num_inference_steps=steps, avg_diff=avg_diff,avg_diff_2nd=avg_diff_2nd)
55
  return image
56