smartdigitalnetworks commited on
Commit
97984e6
·
verified ·
1 Parent(s): a1e1b0f

Update app_diffusers.py

Browse files
Files changed (1) hide show
  1. app_diffusers.py +5 -6
app_diffusers.py CHANGED
@@ -27,7 +27,7 @@ pipe = OvisImagePipeline.from_pretrained(
27
  pipe.to(device)
28
 
29
  # @spaces.GPU(duration=75)
30
- def generate(prompt, img_height=1024, img_width=1024, seed=42, steps=50):
31
  print(f'inference with prompt : {prompt}, size: {img_height}x{img_width}, seed : {seed}, step : {steps}')
32
  generator = torch.Generator().manual_seed(seed)
33
  image = pipe(
@@ -41,8 +41,7 @@ def generate(prompt, img_height=1024, img_width=1024, seed=42, steps=50):
41
  return image
42
 
43
  examples = [
44
- "Child lying on bed with balloons, streamers, and plush toys, surreal dreamlike scene. Close-up, centered on the child and surrounding objects. Soft, diffused lighting.",
45
- "A trendy, playful 3D render of the text \"OVIS-IMAGE\" designed as glossy, inflated balloon letters. The typography is bubbly and rounded. The material is a shiny, reflective plastic in vibrant Alibaba Orange. The text is floating in a bright, clean white studio space with soft pastel lighting. There are subtle reflections of the studio softboxes on the curves of the balloons. High-fashion retail aesthetic, pop art style, C4D render, cute and energetic.",
46
  "一张写实风格的现代化教室场景摄影图。画面焦点集中在前方墙壁正中央的一块洁白明亮的白板上,白板上用清晰、工整的黑色马克笔手写体写着多行文字:最上方是巨大的英文标题“OVIS-IMAGE”,紧接着下方依次分行写着中文说明:“7B文生图模型”、“无需专有模型即可实现双语渲染”、“可在消费级显卡部署”。白板下方的铝合金笔槽内摆放着几支直立或横躺的彩色白板笔(蓝、红、黄、绿)。前景是两位背对镜头的学生(呈虚化状态,营造景深感),坐在木质课桌前,右侧课桌上还放着一块折叠的棕色毛巾。左侧隐约可见部分绿色黑板,顶部有一盏明亮的长条日光灯提供照明。整体光线柔和自然,构图对称,对焦精准在白板文字上,营造出真实的教育和技术演示氛围。",
47
  "微距摄影,一只鲜艳的红色瓢虫停留在翠绿的叶子上,特写镜头。叶子表面分布着晶莹剔透的水珠(晨露),瓢虫红色的甲壳光滑如镜,反射着柔和的自然光,能够清晰看到瓢虫腿部和触角的细微纹理。背景是梦幻的绿色虚化(散景),突显主体,极度逼真,8k分辨率,高清晰度,电影级质感。",
48
  ]
@@ -85,7 +84,7 @@ Built upon [Ovis-U1](https://huggingface.co/spaces/AIDC-AI/Ovis-U1-3B), Ovis-Ima
85
  minimum=256,
86
  maximum=2048,
87
  step=32,
88
- value=1024,
89
  )
90
 
91
  img_width = gr.Slider(
@@ -93,7 +92,7 @@ Built upon [Ovis-U1](https://huggingface.co/spaces/AIDC-AI/Ovis-U1-3B), Ovis-Ima
93
  minimum=256,
94
  maximum=2048,
95
  step=32,
96
- value=1024,
97
  )
98
 
99
  with gr.Row():
@@ -103,7 +102,7 @@ Built upon [Ovis-U1](https://huggingface.co/spaces/AIDC-AI/Ovis-U1-3B), Ovis-Ima
103
  minimum=1,
104
  maximum=100,
105
  step=1,
106
- value=50,
107
  )
108
 
109
  seed = gr.Slider(
 
27
  pipe.to(device)
28
 
29
  # @spaces.GPU(duration=75)
30
+ def generate(prompt, img_height=256, img_width=256, seed=42, steps=13):
31
  print(f'inference with prompt : {prompt}, size: {img_height}x{img_width}, seed : {seed}, step : {steps}')
32
  generator = torch.Generator().manual_seed(seed)
33
  image = pipe(
 
41
  return image
42
 
43
  examples = [
44
+ "A trendy, playful 3D render of the text \"Smart Digital Networks\" designed as glossy, inflated balloon letters. The typography is bubbly and rounded. The material is a shiny, reflective plastic in vibrant Orange. The text is floating in a bright, clean white studio space with soft pastel lighting. There are subtle reflections of the studio softboxes on the curves of the balloons. High-fashion retail aesthetic, pop art style, C4D render, cute and energetic.",
 
45
  "一张写实风格的现代化教室场景摄影图。画面焦点集中在前方墙壁正中央的一块洁白明亮的白板上,白板上用清晰、工整的黑色马克笔手写体写着多行文字:最上方是巨大的英文标题“OVIS-IMAGE”,紧接着下方依次分行写着中文说明:“7B文生图模型”、“无需专有模型即可实现双语渲染”、“可在消费级显卡部署”。白板下方的铝合金笔槽内摆放着几支直立或横躺的彩色白板笔(蓝、红、黄、绿)。前景是两位背对镜头的学生(呈虚化状态,营造景深感),坐在木质课桌前,右侧课桌上还放着一块折叠的棕色毛巾。左侧隐约可见部分绿色黑板,顶部有一盏明亮的长条日光灯提供照明。整体光线柔和自然,构图对称,对焦精准在白板文字上,营造出真实的教育和技术演示氛围。",
46
  "微距摄影,一只鲜艳的红色瓢虫停留在翠绿的叶子上,特写镜头。叶子表面分布着晶莹剔透的水珠(晨露),瓢虫红色的甲壳光滑如镜,反射着柔和的自然光,能够清晰看到瓢虫腿部和触角的细微纹理。背景是梦幻的绿色虚化(散景),突显主体,极度逼真,8k分辨率,高清晰度,电影级质感。",
47
  ]
 
84
  minimum=256,
85
  maximum=2048,
86
  step=32,
87
+ value=256,
88
  )
89
 
90
  img_width = gr.Slider(
 
92
  minimum=256,
93
  maximum=2048,
94
  step=32,
95
+ value=256,
96
  )
97
 
98
  with gr.Row():
 
102
  minimum=1,
103
  maximum=100,
104
  step=1,
105
+ value=13,
106
  )
107
 
108
  seed = gr.Slider(