emirhanno commited on
Commit
8f7fc72
1 Parent(s): 208a670

zerogpu initialization

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -105,6 +105,7 @@ def get_negative_prompt(gender):
105
  else: # Random
106
  return "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation"
107
 
 
108
  def generate_image(face_image_1, face_image_2, prompt, gender, width, height, num_inference_steps, seed):
109
  if seed is None:
110
  seed = int.from_bytes(os.urandom(4), "big")
@@ -116,7 +117,6 @@ def generate_image(face_image_1, face_image_2, prompt, gender, width, height, nu
116
 
117
  baby_image_path = morph_faces(face_image_1.name, face_image_2.name)
118
 
119
- @spaces.GPU(duration=30)
120
  def generate_images(faceid_embeds, num_outputs=1):
121
  images = ip_model.generate(
122
  prompt=prompt,
 
105
  else: # Random
106
  return "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation"
107
 
108
+ @spaces.GPU(duration=40)
109
  def generate_image(face_image_1, face_image_2, prompt, gender, width, height, num_inference_steps, seed):
110
  if seed is None:
111
  seed = int.from_bytes(os.urandom(4), "big")
 
117
 
118
  baby_image_path = morph_faces(face_image_1.name, face_image_2.name)
119
 
 
120
  def generate_images(faceid_embeds, num_outputs=1):
121
  images = ip_model.generate(
122
  prompt=prompt,