davidberenstein1957 commited on
Commit
53e269a
·
verified ·
1 Parent(s): 81bef56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -13
app.py CHANGED
@@ -10,20 +10,9 @@ 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("cpu")
14
- smash_config = SmashConfig(device="cpu")
15
- smash_config["factorizer"] = "qkv_diffusers"
16
- smash_config["cacher"] = "fora"
17
- smash_config["fora_interval"] = 2
18
- smash_config["quantizer"] = "torchao"
19
- smash_config["torchao_quant_type"] = "fp8dq"
20
- smash_config["torchao_excluded_modules"] = "norm+embedding"
21
- pipe = smash(
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
 
10
  dtype = torch.bfloat16
11
  device = "cuda" if torch.cuda.is_available() else "CPU"
12
 
13
+ pipe = PrunaModel.from_hub(
14
+ "PrunaAI/Segmind-Vega-smashed"
 
 
 
 
 
 
 
 
 
15
  )
 
 
16
 
17
  MAX_SEED = np.iinfo(np.int32).max
18
  MAX_IMAGE_SIZE = 2048