Yaron Koresh commited on
Commit
76ec6ef
·
verified ·
1 Parent(s): 3bb3a4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -41,10 +41,10 @@ root.addHandler(handler)
41
 
42
  if torch.cuda.is_available():
43
  device = "cuda"
44
- dtype = torch.float32
45
  else:
46
  device = "cpu"
47
- dtype = torch.float32
48
 
49
  base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
50
  adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3", torch_dtype=dtype, device=device)
@@ -56,12 +56,12 @@ last_motion=""
56
  # precision data
57
 
58
  seq=512
59
- fast=False
60
- fps=25
61
  width=896
62
  height=896
63
- step=100
64
- accu=4.5
65
 
66
  # ui data
67
 
@@ -185,7 +185,7 @@ def pipe_generate(img,p1,p2,motion,time,title):
185
  num_inference_steps=step,
186
  max_sequence_length=seq,
187
  need_safetycheck=False,
188
- generator=torch.Generator(device).manual_seed(random.seed())
189
  ).images[0]
190
 
191
  if time == 0.0:
 
41
 
42
  if torch.cuda.is_available():
43
  device = "cuda"
44
+ dtype = torch.float16
45
  else:
46
  device = "cpu"
47
+ dtype = torch.float16
48
 
49
  base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
50
  adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3", torch_dtype=dtype, device=device)
 
56
  # precision data
57
 
58
  seq=512
59
+ fast=True
60
+ fps=30
61
  width=896
62
  height=896
63
+ step=200
64
+ accu=5.0
65
 
66
  # ui data
67
 
 
185
  num_inference_steps=step,
186
  max_sequence_length=seq,
187
  need_safetycheck=False,
188
+ generator=torch.Generator(device)
189
  ).images[0]
190
 
191
  if time == 0.0: