davidberenstein1957 commited on
Commit
410c2ea
·
verified ·
1 Parent(s): 562ab67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -10,7 +10,7 @@ from pruna import PrunaModel, smash, SmashConfig
10
  dtype = torch.bfloat16
11
  device = "cuda" if torch.cuda.is_available() else "CPU"
12
 
13
- pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", dtype=dtype).to(device)
14
  smash_config = SmashConfig()
15
  smash_config["factorizer"] = "qkv_diffusers"
16
  smash_config["cacher"] = "fora"
@@ -22,6 +22,8 @@ pipe = smash(
22
  model=pipe,
23
  smash_config=smash_config,
24
  )
 
 
25
 
26
  MAX_SEED = np.iinfo(np.int32).max
27
  MAX_IMAGE_SIZE = 2048
 
10
  dtype = torch.bfloat16
11
  device = "cuda" if torch.cuda.is_available() else "CPU"
12
 
13
+ pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", dtype=dtype).to("cpu")
14
  smash_config = SmashConfig()
15
  smash_config["factorizer"] = "qkv_diffusers"
16
  smash_config["cacher"] = "fora"
 
22
  model=pipe,
23
  smash_config=smash_config,
24
  )
25
+ pipe.move_to_device(device)
26
+
27
 
28
  MAX_SEED = np.iinfo(np.int32).max
29
  MAX_IMAGE_SIZE = 2048