Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -18,54 +18,10 @@ default_steps = 30
|
|
18 |
|
19 |
|
20 |
GUIDANCE = """
|
21 |
-
|
22 |
### [π₯ New] πππ We release the <a href="https://github.com/lzyhha/diffusers/tree/main/src/diffusers/pipelines/visualcloze" target="_blank"><span style="color:rgb(253, 60, 94);"><em><strong>diffusers</strong></em></span></a> implementation that makes it easier to use the model through pipelines. See <a href="https://huggingface.co/VisualCloze/VisualClozePipeline-384" target="_blank">Model Card</a> for details.
|
23 |
-
|
24 |
-
## π Quick Start Guide:
|
25 |
-
1. Adjust **Number of In-context Examples**, 0 disables in-context learning.
|
26 |
-
2. Set **Task Columns**, the number of images involved in a task.
|
27 |
-
3. Upload Images. For in-context examples, upload all images. For the current query, upload images exclude the target.
|
28 |
-
4. Click **Generate** to create the images.
|
29 |
-
5. Parameters can be fine-tuned under **Advanced Options**.
|
30 |
-
|
31 |
-
## π₯ Task Examples:
|
32 |
-
Click the task button in the right bottom to acquire **examples** of various tasks.
|
33 |
-
Each click on a task may result in different examples.
|
34 |
-
**Make sure all images and prompts are loaded before clicking the generate button.**
|
35 |
-
|
36 |
-
|
37 |
-
## π» Runtime on the Zero GPU:
|
38 |
-
The runtime on the Zero GPU runtime depends on the size of the image grid.
|
39 |
-
When generating an image with the resoluation of 1024,
|
40 |
-
the runtime is approximately **[45s for a 2x2 grid], [55s for a 2x3 grid], [70s for a 3x3 grid], [90s for a 3x4 grid]**.
|
41 |
-
**Deploying locally with an 80G A100 can reduce the runtime by more than half.**
|
42 |
-
Disabling SDEdit upsampling by setting the upsampling noise to 1 or reducing the upsampling steps
|
43 |
-
can also save computation time, but it may lead to a decrease in generation quality.
|
44 |
-
|
45 |
-
### Note: For better quality, you can deploy the demo locally using the [model](https://huggingface.co/VisualCloze/VisualCloze/blob/main/visualcloze-512-lora.pth), which supports a higher resolution than this online demo, by following the instructions in the [GitHub repository](https://github.com/lzyhha/VisualCloze/tree/main?tab=readme-ov-file#2-web-demo-gradio).
|
46 |
-
"""
|
47 |
-
|
48 |
-
CITATION = r"""
|
49 |
-
If you find VisualCloze is helpful, please consider to star β the <a href='https://github.com/lzyhha/VisualCloze' target='_blank'>Github Repo</a>. Thanks!
|
50 |
-
---
|
51 |
-
π **Citation**
|
52 |
-
<br>
|
53 |
-
If our work is useful for your research, please consider citing:
|
54 |
-
```bibtex
|
55 |
-
@article{li2025visualcloze,
|
56 |
-
title={VisualCloze: A Universal Image Generation Framework via Visual In-Context Learning},
|
57 |
-
author={Li, Zhong-Yu and Du, ruoyi and Yan, Juncheng and Zhuo, Le and Li, Zhen and Gao, Peng and Ma, Zhanyu and Cheng, Ming-Ming},
|
58 |
-
journal={arXiv preprint arXiv:2504.07960},
|
59 |
-
year={2025}
|
60 |
-
}
|
61 |
-
```
|
62 |
π **License**
|
63 |
<br>
|
64 |
This project is licensed under apache-2.0.
|
65 |
-
|
66 |
-
π§ **Contact**
|
67 |
-
<br>
|
68 |
-
Need help or have questions? Contact us at: lizhongyu [AT] mail.nankai.edu.cn.
|
69 |
"""
|
70 |
|
71 |
NOTE = r"""
|
|
|
18 |
|
19 |
|
20 |
GUIDANCE = """
|
|
|
21 |
### [π₯ New] πππ We release the <a href="https://github.com/lzyhha/diffusers/tree/main/src/diffusers/pipelines/visualcloze" target="_blank"><span style="color:rgb(253, 60, 94);"><em><strong>diffusers</strong></em></span></a> implementation that makes it easier to use the model through pipelines. See <a href="https://huggingface.co/VisualCloze/VisualClozePipeline-384" target="_blank">Model Card</a> for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
π **License**
|
23 |
<br>
|
24 |
This project is licensed under apache-2.0.
|
|
|
|
|
|
|
|
|
25 |
"""
|
26 |
|
27 |
NOTE = r"""
|