Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import spaces
|
|
| 6 |
from OmniGen import OmniGenPipeline
|
| 7 |
|
| 8 |
pipe = OmniGenPipeline.from_pretrained(
|
| 9 |
-
"
|
| 10 |
)
|
| 11 |
|
| 12 |
@spaces.GPU(duratio=120)
|
|
@@ -46,6 +46,17 @@ def generate_image(text, img1, img2, img3, height, width, guidance_scale, infere
|
|
| 46 |
|
| 47 |
def get_example():
|
| 48 |
case = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
[
|
| 50 |
"A woman holds a bouquet of flowers and faces the camera. Thw woman is the one in <img><|image_1|></img>.",
|
| 51 |
"./imgs/test_cases/liuyifei.png",
|
|
@@ -77,7 +88,7 @@ def run_for_examples(text, img1, img2, img3, height, width, guidance_scale, infe
|
|
| 77 |
|
| 78 |
# Gradio 接口
|
| 79 |
with gr.Blocks() as demo:
|
| 80 |
-
gr.Markdown("# OmniGen: Unified Image Generation")
|
| 81 |
with gr.Row():
|
| 82 |
with gr.Column():
|
| 83 |
# 文本输入框
|
|
|
|
| 6 |
from OmniGen import OmniGenPipeline
|
| 7 |
|
| 8 |
pipe = OmniGenPipeline.from_pretrained(
|
| 9 |
+
"Shitao/OmniGen-v1"
|
| 10 |
)
|
| 11 |
|
| 12 |
@spaces.GPU(duratio=120)
|
|
|
|
| 46 |
|
| 47 |
def get_example():
|
| 48 |
case = [
|
| 49 |
+
[
|
| 50 |
+
"A woman holds a bouquet of flowers and faces the camera.",
|
| 51 |
+
None,
|
| 52 |
+
None,
|
| 53 |
+
None,
|
| 54 |
+
1024,
|
| 55 |
+
1024,
|
| 56 |
+
3.0,
|
| 57 |
+
50,
|
| 58 |
+
42,
|
| 59 |
+
],
|
| 60 |
[
|
| 61 |
"A woman holds a bouquet of flowers and faces the camera. Thw woman is the one in <img><|image_1|></img>.",
|
| 62 |
"./imgs/test_cases/liuyifei.png",
|
|
|
|
| 88 |
|
| 89 |
# Gradio 接口
|
| 90 |
with gr.Blocks() as demo:
|
| 91 |
+
gr.Markdown("# OmniGen: Unified Image Generation [paper](https://arxiv.org/abs/2409.11340) [code](https://github.com/VectorSpaceLab/OmniGen)")
|
| 92 |
with gr.Row():
|
| 93 |
with gr.Column():
|
| 94 |
# 文本输入框
|