Yw22 commited on
Commit
b8c6e09
·
1 Parent(s): dc79a5a
Files changed (1) hide show
  1. app.py +75 -34
app.py CHANGED
@@ -112,61 +112,89 @@ os.system(f'mv models/personalized/TUSUN.safetensors?download=true models/person
112
  image_examples = [
113
  ["__asset__/images/object/turtle-1.jpg",
114
  "a sea turtle gracefully swimming over a coral reef in the clear blue ocean.",
115
- "object",
116
- 11318446767408804497,
117
- "",
118
- json.load(open("__asset__/trajs/object/turtle-1.json")),
119
- "__asset__/images/object/turtle-1.jpg",
120
  ],
121
 
122
  ["__asset__/images/object/rose-1.jpg",
123
  "a red rose engulfed in flames.",
124
- "object",
125
- 6854275249656120509,
126
- "",
127
- json.load(open("__asset__/trajs/object/rose-1.json")),
128
- "__asset__/images/object/rose-1.jpg",
129
  ],
130
 
131
  ["__asset__/images/object/jellyfish-1.jpg",
132
  "intricate detailing,photorealism,hyperrealistic, glowing jellyfish mushroom, flying, starry sky, bokeh, golden ratio composition.",
133
- "object",
134
- 17966188172968903484,
135
- "HelloObject",
136
- json.load(open("__asset__/trajs/object/jellyfish-1.json")),
137
- "__asset__/images/object/jellyfish-1.jpg",
138
  ],
139
 
140
 
141
  ["__asset__/images/camera/lush-1.jpg",
142
  "detailed craftsmanship, photorealism, hyperrealistic, roaring waterfall, misty spray, lush greenery, vibrant rainbow, golden ratio composition.",
143
- "camera",
144
- 7970487946960948963,
145
- "HelloObject",
146
- json.load(open("__asset__/trajs/camera/lush-1.json")),
147
- "__asset__/images/camera/lush-1.jpg",
148
  ],
149
 
150
  ["__asset__/images/camera/tusun-1.jpg",
151
  "tusuncub with its mouth open, blurry, open mouth, fangs, photo background, looking at viewer, tongue, full body, solo, cute and lovely, Beautiful and realistic eye details, perfect anatomy, Nonsense, pure background, Centered-Shot, realistic photo, photograph, 4k, hyper detailed, DSLR, 24 Megapixels, 8mm Lens, Full Frame, film grain, Global Illumination, studio Lighting, Award Winning Photography, diffuse reflection, ray tracing.",
152
- "camera",
153
- 996953226890228361,
154
- "TUSUN",
155
- json.load(open("__asset__/trajs/camera/tusun-1.json")),
156
- "__asset__/images/camera/tusun-1.jpg",
157
  ],
158
 
159
  ["__asset__/images/camera/painting-1.jpg",
160
  "A oil painting.",
161
- "camera",
162
- 16867854766769816385,
163
- "",
164
- json.load(open("__asset__/trajs/camera/painting-1.json")),
165
- "__asset__/images/camera/painting-1.jpg",
166
  ],
167
 
168
  ]
169
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
  DREAM_BOOTH = {
172
  'HelloObject': 'models/personalized/helloobjects_V12c.safetensors',
@@ -568,15 +596,28 @@ with block as demo:
568
 
569
 
570
  with gr.Row():
571
- def process_example(input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path):
572
 
573
- return input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path
 
 
 
 
 
 
 
 
 
 
 
 
 
574
 
575
  example = gr.Examples(
576
  label="Input Example",
577
  examples=image_examples,
578
- inputs=[input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path],
579
- outputs=[input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path],
580
  fn=process_example,
581
  run_on_click=True,
582
  examples_per_page=10,
 
112
  image_examples = [
113
  ["__asset__/images/object/turtle-1.jpg",
114
  "a sea turtle gracefully swimming over a coral reef in the clear blue ocean.",
 
 
 
 
 
115
  ],
116
 
117
  ["__asset__/images/object/rose-1.jpg",
118
  "a red rose engulfed in flames.",
 
 
 
 
 
119
  ],
120
 
121
  ["__asset__/images/object/jellyfish-1.jpg",
122
  "intricate detailing,photorealism,hyperrealistic, glowing jellyfish mushroom, flying, starry sky, bokeh, golden ratio composition.",
 
 
 
 
 
123
  ],
124
 
125
 
126
  ["__asset__/images/camera/lush-1.jpg",
127
  "detailed craftsmanship, photorealism, hyperrealistic, roaring waterfall, misty spray, lush greenery, vibrant rainbow, golden ratio composition.",
 
 
 
 
 
128
  ],
129
 
130
  ["__asset__/images/camera/tusun-1.jpg",
131
  "tusuncub with its mouth open, blurry, open mouth, fangs, photo background, looking at viewer, tongue, full body, solo, cute and lovely, Beautiful and realistic eye details, perfect anatomy, Nonsense, pure background, Centered-Shot, realistic photo, photograph, 4k, hyper detailed, DSLR, 24 Megapixels, 8mm Lens, Full Frame, film grain, Global Illumination, studio Lighting, Award Winning Photography, diffuse reflection, ray tracing.",
 
 
 
 
 
132
  ],
133
 
134
  ["__asset__/images/camera/painting-1.jpg",
135
  "A oil painting.",
 
 
 
 
 
136
  ],
137
 
138
  ]
139
 
140
+ # image_examples = [
141
+ # ["__asset__/images/object/turtle-1.jpg",
142
+ # "a sea turtle gracefully swimming over a coral reef in the clear blue ocean.",
143
+ # "object",
144
+ # 11318446767408804497,
145
+ # "",
146
+ # json.load(open("__asset__/trajs/object/turtle-1.json")),
147
+ # "__asset__/images/object/turtle-1.jpg",
148
+ # ],
149
+
150
+ # ["__asset__/images/object/rose-1.jpg",
151
+ # "a red rose engulfed in flames.",
152
+ # "object",
153
+ # 6854275249656120509,
154
+ # "",
155
+ # json.load(open("__asset__/trajs/object/rose-1.json")),
156
+ # "__asset__/images/object/rose-1.jpg",
157
+ # ],
158
+
159
+ # ["__asset__/images/object/jellyfish-1.jpg",
160
+ # "intricate detailing,photorealism,hyperrealistic, glowing jellyfish mushroom, flying, starry sky, bokeh, golden ratio composition.",
161
+ # "object",
162
+ # 17966188172968903484,
163
+ # "HelloObject",
164
+ # json.load(open("__asset__/trajs/object/jellyfish-1.json")),
165
+ # "__asset__/images/object/jellyfish-1.jpg",
166
+ # ],
167
+
168
+
169
+ # ["__asset__/images/camera/lush-1.jpg",
170
+ # "detailed craftsmanship, photorealism, hyperrealistic, roaring waterfall, misty spray, lush greenery, vibrant rainbow, golden ratio composition.",
171
+ # "camera",
172
+ # 7970487946960948963,
173
+ # "HelloObject",
174
+ # json.load(open("__asset__/trajs/camera/lush-1.json")),
175
+ # "__asset__/images/camera/lush-1.jpg",
176
+ # ],
177
+
178
+ # ["__asset__/images/camera/tusun-1.jpg",
179
+ # "tusuncub with its mouth open, blurry, open mouth, fangs, photo background, looking at viewer, tongue, full body, solo, cute and lovely, Beautiful and realistic eye details, perfect anatomy, Nonsense, pure background, Centered-Shot, realistic photo, photograph, 4k, hyper detailed, DSLR, 24 Megapixels, 8mm Lens, Full Frame, film grain, Global Illumination, studio Lighting, Award Winning Photography, diffuse reflection, ray tracing.",
180
+ # "camera",
181
+ # 996953226890228361,
182
+ # "TUSUN",
183
+ # json.load(open("__asset__/trajs/camera/tusun-1.json")),
184
+ # "__asset__/images/camera/tusun-1.jpg",
185
+ # ],
186
+
187
+ # ["__asset__/images/camera/painting-1.jpg",
188
+ # "A oil painting.",
189
+ # "camera",
190
+ # 16867854766769816385,
191
+ # "",
192
+ # json.load(open("__asset__/trajs/camera/painting-1.json")),
193
+ # "__asset__/images/camera/painting-1.jpg",
194
+ # ],
195
+
196
+ # ]
197
+
198
 
199
  DREAM_BOOTH = {
200
  'HelloObject': 'models/personalized/helloobjects_V12c.safetensors',
 
596
 
597
 
598
  with gr.Row():
599
+ # def process_example(input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path):
600
 
601
+ # return input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path
602
+ def process_example(input_image, prompt):
603
+ return input_image, prompt
604
+
605
+ # example = gr.Examples(
606
+ # label="Input Example",
607
+ # examples=image_examples,
608
+ # inputs=[input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path],
609
+ # outputs=[input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path],
610
+ # fn=process_example,
611
+ # run_on_click=True,
612
+ # examples_per_page=10,
613
+ # cache_examples=False,
614
+ # )
615
 
616
  example = gr.Examples(
617
  label="Input Example",
618
  examples=image_examples,
619
+ inputs=[input_image, prompt],
620
+ outputs=[input_image, prompt],
621
  fn=process_example,
622
  run_on_click=True,
623
  examples_per_page=10,