multimodalart HF staff commited on
Commit
ff46702
β€’
1 Parent(s): a3d2317

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -30,10 +30,6 @@ device = "cuda"
30
 
31
  #hf_hub_download(repo_id="stabilityai/stable-video-diffusion-img2vid-xt", filename="svd_xt.safetensors", local_dir="checkpoints", token=os.getenv("HF_TOKEN"))
32
 
33
- css = '''
34
- .gradio-container{max-width:850px !important}
35
- '''
36
-
37
  def sample(
38
  input_path: str,
39
  num_frames: Optional[int] = 25,
@@ -46,6 +42,7 @@ def sample(
46
  decoding_t: int = 7, # Number of frames decoded at a time! This eats most VRAM. Reduce if necessary.
47
  ):
48
  output_folder = str(uuid.uuid4())
 
49
  sample(input_path, version, output_folder, decoding_t)
50
  return f"{output_folder}/000000.mp4"
51
 
@@ -126,6 +123,10 @@ def resize_image(image_path, output_size=(1024, 576)):
126
 
127
  return cropped_image
128
 
 
 
 
 
129
  with gr.Blocks(css=css) as demo:
130
  gr.Markdown('''# Stable Video Diffusion - Image2Video - XT
131
  Generate 25 frames of video from a single image with SDV-XT. [Join the waitlist](https://stability.ai/contact) for the text-to-video web experience
 
30
 
31
  #hf_hub_download(repo_id="stabilityai/stable-video-diffusion-img2vid-xt", filename="svd_xt.safetensors", local_dir="checkpoints", token=os.getenv("HF_TOKEN"))
32
 
 
 
 
 
33
  def sample(
34
  input_path: str,
35
  num_frames: Optional[int] = 25,
 
42
  decoding_t: int = 7, # Number of frames decoded at a time! This eats most VRAM. Reduce if necessary.
43
  ):
44
  output_folder = str(uuid.uuid4())
45
+ print(output_folder)
46
  sample(input_path, version, output_folder, decoding_t)
47
  return f"{output_folder}/000000.mp4"
48
 
 
123
 
124
  return cropped_image
125
 
126
+ css = '''
127
+ .gradio-container{max-width:850px !important}
128
+ '''
129
+
130
  with gr.Blocks(css=css) as demo:
131
  gr.Markdown('''# Stable Video Diffusion - Image2Video - XT
132
  Generate 25 frames of video from a single image with SDV-XT. [Join the waitlist](https://stability.ai/contact) for the text-to-video web experience