lixiang46 commited on
Commit
8004741
1 Parent(s): 2225ed3
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -51,7 +51,7 @@ if hasattr(pipe_i2i.unet, 'encoder_hid_proj'):
51
  pipe_i2i.load_ip_adapter(f'{ckpt_IPA_dir}' , subfolder="", weight_name=["ip_adapter_plus_general.bin"])
52
 
53
  MAX_SEED = np.iinfo(np.int32).max
54
- MAX_IMAGE_SIZE = 2048
55
 
56
  @spaces.GPU
57
  def infer(prompt,
@@ -103,7 +103,7 @@ examples = [
103
  ["一张瓢虫的照片,微距,变焦,高质量,电影,拿着一个牌子,写着“可图”", None, None],
104
  ["3D anime style, hyperrealistic oil painting, dolphin leaping out of the water", None, None],
105
  ["穿着黑色T恤衫,上面中文绿色大字写着“可图”", "image/test_ip.jpg", 0.5],
106
- ["A cute dog is running.", "image/test_ip2.png", 0.5]
107
  ]
108
 
109
  css="""
@@ -120,13 +120,7 @@ css="""
120
  }
121
  """
122
 
123
- with gr.Blocks(css=css) as demo:
124
- with gr.Row():
125
- with gr.Column(elem_id='title'):
126
- gr.Markdown(f"""
127
- # Kolors
128
- """)
129
-
130
  with gr.Row():
131
  with gr.Column(elem_id="col-left"):
132
  with gr.Row():
@@ -210,4 +204,4 @@ with gr.Blocks(css=css) as demo:
210
  outputs = [result]
211
  )
212
 
213
- demo.queue().launch(debug=True)
 
51
  pipe_i2i.load_ip_adapter(f'{ckpt_IPA_dir}' , subfolder="", weight_name=["ip_adapter_plus_general.bin"])
52
 
53
  MAX_SEED = np.iinfo(np.int32).max
54
+ MAX_IMAGE_SIZE = 1024
55
 
56
  @spaces.GPU
57
  def infer(prompt,
 
103
  ["一张瓢虫的照片,微距,变焦,高质量,电影,拿着一个牌子,写着“可图”", None, None],
104
  ["3D anime style, hyperrealistic oil painting, dolphin leaping out of the water", None, None],
105
  ["穿着黑色T恤衫,上面中文绿色大字写着“可图”", "image/test_ip.jpg", 0.5],
106
+ ["A cute dog is running", "image/test_ip2.png", 0.5]
107
  ]
108
 
109
  css="""
 
120
  }
121
  """
122
 
123
+ with gr.Blocks(css=css, title="Kolors") as Kolors:
 
 
 
 
 
 
124
  with gr.Row():
125
  with gr.Column(elem_id="col-left"):
126
  with gr.Row():
 
204
  outputs = [result]
205
  )
206
 
207
+ Kolors.queue().launch(debug=True)