Spaces:
Sleeping
Sleeping
bo.l
commited on
Commit
·
cab43e0
1
Parent(s):
058ae01
update multi3
Browse files
app.py
CHANGED
|
@@ -98,11 +98,10 @@ def infer(
|
|
| 98 |
generator = torch.Generator(device=device).manual_seed(int(seed))
|
| 99 |
|
| 100 |
# 参考图按桶缩放
|
| 101 |
-
|
| 102 |
-
raw_images = resize_by_bucket(refs, resolution=base_res)
|
| 103 |
|
| 104 |
if len(raw_images) == 2:
|
| 105 |
-
raw_images = [[raw_images[
|
| 106 |
|
| 107 |
# 推理
|
| 108 |
with torch.no_grad():
|
|
@@ -139,7 +138,7 @@ css = """
|
|
| 139 |
|
| 140 |
with gr.Blocks(css=css) as demo:
|
| 141 |
with gr.Column(elem_id="col-container"):
|
| 142 |
-
gr.Markdown("#
|
| 143 |
|
| 144 |
with gr.Row():
|
| 145 |
prompt = gr.Text(
|
|
|
|
| 98 |
generator = torch.Generator(device=device).manual_seed(int(seed))
|
| 99 |
|
| 100 |
# 参考图按桶缩放
|
| 101 |
+
raw_images = resize_by_bucket(refs, resolution=MAX_IMAGE_SIZE)
|
|
|
|
| 102 |
|
| 103 |
if len(raw_images) == 2:
|
| 104 |
+
raw_images = [[raw_images[1]],[raw_images[1]]]
|
| 105 |
|
| 106 |
# 推理
|
| 107 |
with torch.no_grad():
|
|
|
|
| 138 |
|
| 139 |
with gr.Blocks(css=css) as demo:
|
| 140 |
with gr.Column(elem_id="col-container"):
|
| 141 |
+
gr.Markdown("# Multi Ref Edit Demo")
|
| 142 |
|
| 143 |
with gr.Row():
|
| 144 |
prompt = gr.Text(
|