ford442 commited on
Commit
4c41b0f
·
verified ·
1 Parent(s): 658cb19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -666,7 +666,8 @@ def generate(prompt, negative_prompt, clips_list, input_image_filepath, input_vi
666
  print("Using image file as input.")
667
  media_tensor = load_image_to_tensor_with_resize_and_crop(input_image_filepath, actual_height, actual_width)
668
  call_kwargs["conditioning_items"] = [ConditioningItem(torch.nn.functional.pad(media_tensor, padding_values).to(target_inference_device), 0, 1.0)]
669
-
 
670
  elif mode == "video-to-video":
671
  print("Using video file as input.")
672
  call_kwargs["media_items"] = load_media_file(media_path=input_video_filepath, height=actual_height, width=actual_width, max_frames=int(ui_frames_to_use), padding=padding_values).to(target_inference_device)
 
666
  print("Using image file as input.")
667
  media_tensor = load_image_to_tensor_with_resize_and_crop(input_image_filepath, actual_height, actual_width)
668
  call_kwargs["conditioning_items"] = [ConditioningItem(torch.nn.functional.pad(media_tensor, padding_values).to(target_inference_device), 0, 1.0)]
669
+ call_kwargs["image_cond_noise_scale"] = 0.05 # A small value like 0.02 to 0.1 is usually good
670
+
671
  elif mode == "video-to-video":
672
  print("Using video file as input.")
673
  call_kwargs["media_items"] = load_media_file(media_path=input_video_filepath, height=actual_height, width=actual_width, max_frames=int(ui_frames_to_use), padding=padding_values).to(target_inference_device)