KingNish commited on
Commit
65e5cab
·
verified ·
1 Parent(s): 6934cc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -11,8 +11,8 @@ from diffusers.models.attention_processor import AttnProcessor2_0
11
  from custom_pipeline import FluxWithCFGPipeline
12
 
13
  # --- Torch Optimizations ---
14
- # torch.backends.cuda.matmul.allow_tf32 = True
15
- # torch.backends.cudnn.benchmark = True # Enable cuDNN benchmark for potentially faster convolutions
16
 
17
  # --- Constants ---
18
  MAX_SEED = np.iinfo(np.int32).max
@@ -36,7 +36,6 @@ pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtyp
36
  pipe.to(device)
37
 
38
  # Apply optimizations
39
- pipe.unet.set_attn_processor(AttnProcessor2_0())
40
  pipe.vae.set_attn_processor(AttnProcessor2_0()) # VAE might benefit too
41
 
42
  pipe.load_lora_weights('hugovntr/flux-schnell-realism', weight_name='schnell-realism_v2.3.safetensors', adapter_name="better")
 
11
  from custom_pipeline import FluxWithCFGPipeline
12
 
13
  # --- Torch Optimizations ---
14
+ torch.backends.cuda.matmul.allow_tf32 = True
15
+ torch.backends.cudnn.benchmark = True # Enable cuDNN benchmark for potentially faster convolutions
16
 
17
  # --- Constants ---
18
  MAX_SEED = np.iinfo(np.int32).max
 
36
  pipe.to(device)
37
 
38
  # Apply optimizations
 
39
  pipe.vae.set_attn_processor(AttnProcessor2_0()) # VAE might benefit too
40
 
41
  pipe.load_lora_weights('hugovntr/flux-schnell-realism', weight_name='schnell-realism_v2.3.safetensors', adapter_name="better")