Spaces:
Running
on
A10G
Running
on
A10G
Warning:bad idea
Browse filesIdk how to code, so please undo this if this doesn’t work. I don’t want this to be unusable.
app.py
CHANGED
@@ -10,7 +10,7 @@ pipe.enable_model_cpu_offload()
|
|
10 |
|
11 |
def infer(prompt):
|
12 |
negative_prompt = "text, watermark, copyright, blurry, nsfw"
|
13 |
-
video_frames = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=
|
14 |
video_path = export_to_video(video_frames)
|
15 |
print(video_path)
|
16 |
return video_path, gr.Group.update(visible=True)
|
@@ -120,8 +120,8 @@ with gr.Blocks(css=css) as demo:
|
|
120 |
)
|
121 |
|
122 |
prompt_in = gr.Textbox(label="Prompt", placeholder="Darth Vader is surfing on waves", elem_id="prompt-in")
|
123 |
-
|
124 |
-
|
125 |
submit_btn = gr.Button("Submit")
|
126 |
video_result = gr.Video(label="Video Output", elem_id="video-output")
|
127 |
|
|
|
10 |
|
11 |
def infer(prompt):
|
12 |
negative_prompt = "text, watermark, copyright, blurry, nsfw"
|
13 |
+
video_frames = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=50, height=500, width=1000, num_frames=50).frames
|
14 |
video_path = export_to_video(video_frames)
|
15 |
print(video_path)
|
16 |
return video_path, gr.Group.update(visible=True)
|
|
|
120 |
)
|
121 |
|
122 |
prompt_in = gr.Textbox(label="Prompt", placeholder="Darth Vader is surfing on waves", elem_id="prompt-in")
|
123 |
+
neg_prompt = gr.Textbox(label="Negative prompt", placeholder="text, watermark, copyright, blurry, nsfw", elem_id="neg-prompt-in")
|
124 |
+
inference_steps = gr.Slider(label="Inference Steps", minimum=10, maximum=100, step=1, value=40, interactive=False)
|
125 |
submit_btn = gr.Button("Submit")
|
126 |
video_result = gr.Video(label="Video Output", elem_id="video-output")
|
127 |
|