AlekseyCalvin commited on
Commit
88e80d4
1 Parent(s): 50e501e

Update custom_pipeline.py

Browse files
Files changed (1) hide show
  1. custom_pipeline.py +1 -1
custom_pipeline.py CHANGED
@@ -88,7 +88,7 @@ class FluxWithCFGPipeline(FluxPipeline):
88
 
89
  # 2. Define call parameters
90
  batch_size = 1 if isinstance(prompt, str) else len(prompt)
91
- device = self._execution_device
92
 
93
  # 3. Encode prompt
94
  lora_scale = joint_attention_kwargs.get("scale", None) if joint_attention_kwargs is not None else None
 
88
 
89
  # 2. Define call parameters
90
  batch_size = 1 if isinstance(prompt, str) else len(prompt)
91
+ device = "cuda" if torch.cuda.is_available() else "cpu"
92
 
93
  # 3. Encode prompt
94
  lora_scale = joint_attention_kwargs.get("scale", None) if joint_attention_kwargs is not None else None