Spaces:
Sleeping
Sleeping
Anonymous
commited on
Commit
·
52b5268
1
Parent(s):
b1a8a7e
fix app
Browse files
app.py
CHANGED
@@ -140,10 +140,6 @@ def infer(prompt, output_size="256x256"):
|
|
140 |
grid = (grid + 1.0) / 2.0
|
141 |
grid = (grid * 255).to(torch.uint8).permute(0, 2, 3, 1)
|
142 |
|
143 |
-
print(grid.shape)
|
144 |
-
print(torch.max(grid))
|
145 |
-
print(torch.min(grid))
|
146 |
-
|
147 |
torchvision.io.write_video(
|
148 |
video_path,
|
149 |
grid,
|
@@ -155,11 +151,17 @@ def infer(prompt, output_size="256x256"):
|
|
155 |
print(video_path)
|
156 |
return video_path
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
examples = [
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
]
|
164 |
|
165 |
css = """
|
@@ -257,7 +259,6 @@ with gr.Blocks(css=css) as demo:
|
|
257 |
)
|
258 |
|
259 |
prompt_in = gr.Textbox(label="Prompt", placeholder="A chihuahua in astronaut suit floating in space, cinematic lighting, glow effect")
|
260 |
-
# output_size = gr.Dropdown(["576x1024", "256x256"], label="Output Size", info="576x1024 is watermark-free")
|
261 |
output_size = gr.Dropdown(["576x1024", "256x256"], value="256x256", label="Output Size", info="576x1024 is watermark-free")
|
262 |
submit_btn = gr.Button("Generate")
|
263 |
video_result = gr.Video(label="Video Output")
|
|
|
140 |
grid = (grid + 1.0) / 2.0
|
141 |
grid = (grid * 255).to(torch.uint8).permute(0, 2, 3, 1)
|
142 |
|
|
|
|
|
|
|
|
|
143 |
torchvision.io.write_video(
|
144 |
video_path,
|
145 |
grid,
|
|
|
151 |
print(video_path)
|
152 |
return video_path
|
153 |
|
154 |
+
# examples = [
|
155 |
+
# ["A chihuahua in astronaut suit floating in space, cinematic lighting, glow effect",],
|
156 |
+
# ["Campfire at night in a snowy forest with starry sky in the background",],
|
157 |
+
# ["A corgi is swimming quickly",],
|
158 |
+
# ["A panda is surfing in the universe",],
|
159 |
+
# ]
|
160 |
examples = [
|
161 |
+
"A chihuahua in astronaut suit floating in space, cinematic lighting, glow effect",
|
162 |
+
"Campfire at night in a snowy forest with starry sky in the background",
|
163 |
+
"A corgi is swimming quickly",
|
164 |
+
"A panda is surfing in the universe",
|
165 |
]
|
166 |
|
167 |
css = """
|
|
|
259 |
)
|
260 |
|
261 |
prompt_in = gr.Textbox(label="Prompt", placeholder="A chihuahua in astronaut suit floating in space, cinematic lighting, glow effect")
|
|
|
262 |
output_size = gr.Dropdown(["576x1024", "256x256"], value="256x256", label="Output Size", info="576x1024 is watermark-free")
|
263 |
submit_btn = gr.Button("Generate")
|
264 |
video_result = gr.Video(label="Video Output")
|