Yaron Koresh commited on
Commit
205077f
·
verified ·
1 Parent(s): 7c22786

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -47,7 +47,10 @@ root.addHandler(handler2)
47
  # constant data
48
 
49
  dtype = torch.float16
50
- device = torch.cuda.is_available() if "cuda" else "cpu"
 
 
 
51
  base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
52
  adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3", torch_dtype=dtype, device=device)
53
 
@@ -123,8 +126,6 @@ pipe.scheduler = DDIMScheduler(
123
  pipe.load_ip_adapter("h94/IP-Adapter", subfolder="models", weight_name="ip-adapter-plus_sd15.bin")
124
  pipe.enable_free_init(method="butterworth", use_fast_sampling=fast)
125
 
126
- #pipe_flux = FluxPipeline.from_pretrained("black-forest-labs/#FLUX.1-dev", torch_dtype=torch.bfloat16, token=os.getenv("hf_token")).to(device,dtype=dtype)
127
-
128
  # functionality
129
 
130
  def run(cmd):
 
47
  # constant data
48
 
49
  dtype = torch.float16
50
+ if torch.cuda.is_available():
51
+ device = "cuda"
52
+ else:
53
+ device = "cpu"
54
  base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
55
  adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3", torch_dtype=dtype, device=device)
56
 
 
126
  pipe.load_ip_adapter("h94/IP-Adapter", subfolder="models", weight_name="ip-adapter-plus_sd15.bin")
127
  pipe.enable_free_init(method="butterworth", use_fast_sampling=fast)
128
 
 
 
129
  # functionality
130
 
131
  def run(cmd):