bo.l commited on
Commit
b8c039a
·
1 Parent(s): 0f3e6bf

pipe update

Browse files
Files changed (1) hide show
  1. app.py +0 -8
app.py CHANGED
@@ -42,14 +42,6 @@ def resize_by_bucket(images_pil, resolution=512):
42
 
43
  device = "cuda" if torch.cuda.is_available() else "cpu"
44
 
45
- if torch.cuda.is_available():
46
- torch_dtype = torch.float16
47
- else:
48
- torch_dtype = torch.float32
49
-
50
- pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
51
- pipe = pipe.to(device)
52
-
53
  flux_pipeline = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev")
54
  flux_pipeline.scheduler = FlowMatchEulerDiscreteScheduler.from_config(flux_pipeline.scheduler.config)
55
  flux_pipeline.vae.to(device).to(torch.bfloat16)
 
42
 
43
  device = "cuda" if torch.cuda.is_available() else "cpu"
44
 
 
 
 
 
 
 
 
 
45
  flux_pipeline = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev")
46
  flux_pipeline.scheduler = FlowMatchEulerDiscreteScheduler.from_config(flux_pipeline.scheduler.config)
47
  flux_pipeline.vae.to(device).to(torch.bfloat16)