tugot17 commited on
Commit
a8c442e
1 Parent(s): 6fdaf65

Upload img_gen_v2.py

Browse files
Files changed (1) hide show
  1. img_gen_v2.py +2 -3
img_gen_v2.py CHANGED
@@ -47,12 +47,12 @@ def get_image_to_image_model(path=None, device=None):
47
 
48
  def gen_initial_img(int_prompt):
49
  model = get_the_model(None)
50
- image = model(int_prompt, num_inference_steps=10).images[0]
51
 
52
  return image
53
 
54
 
55
- def generate_story(int_prompt, steps, iterations=10):
56
  image_dic = {}
57
  init_img = gen_initial_img(int_prompt)
58
  img2img_model = get_image_to_image_model()
@@ -66,6 +66,5 @@ def generate_story(int_prompt, steps, iterations=10):
66
  "prompt": step
67
  }
68
  img = image
69
- break
70
 
71
  return init_img, image_dic
 
47
 
48
  def gen_initial_img(int_prompt):
49
  model = get_the_model(None)
50
+ image = model(int_prompt, num_inference_steps=25).images[0]
51
 
52
  return image
53
 
54
 
55
+ def generate_story(int_prompt, steps, iterations=25):
56
  image_dic = {}
57
  init_img = gen_initial_img(int_prompt)
58
  img2img_model = get_image_to_image_model()
 
66
  "prompt": step
67
  }
68
  img = image
 
69
 
70
  return init_img, image_dic