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)