Spaces:
Running
on
Zero
Running
on
Zero
Update pipeline.py
Browse files- pipeline.py +3 -2
pipeline.py
CHANGED
@@ -702,6 +702,7 @@ class FluxWithCFGPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFile
|
|
702 |
timesteps: List[int] = None,
|
703 |
eta: Optional[float] = 0.0,
|
704 |
guidance_scale: float = 3.5,
|
|
|
705 |
num_images_per_prompt: Optional[int] = 1,
|
706 |
generator: Optional[Union[torch.Generator, List[torch.Generator]]] = None,
|
707 |
latents: Optional[torch.FloatTensor] = None,
|
@@ -737,6 +738,8 @@ class FluxWithCFGPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFile
|
|
737 |
self._joint_attention_kwargs = joint_attention_kwargs
|
738 |
self._interrupt = False
|
739 |
|
|
|
|
|
740 |
# 2. Define call parameters
|
741 |
if prompt is not None and isinstance(prompt, str):
|
742 |
batch_size = 1
|
@@ -745,8 +748,6 @@ class FluxWithCFGPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFile
|
|
745 |
else:
|
746 |
batch_size = prompt_embeds.shape[0]
|
747 |
|
748 |
-
device = self._execution_device
|
749 |
-
|
750 |
do_classifier_free_guidance = guidance_scale > 1.0
|
751 |
|
752 |
lora_scale = (
|
|
|
702 |
timesteps: List[int] = None,
|
703 |
eta: Optional[float] = 0.0,
|
704 |
guidance_scale: float = 3.5,
|
705 |
+
device: Optional[int] = None,
|
706 |
num_images_per_prompt: Optional[int] = 1,
|
707 |
generator: Optional[Union[torch.Generator, List[torch.Generator]]] = None,
|
708 |
latents: Optional[torch.FloatTensor] = None,
|
|
|
738 |
self._joint_attention_kwargs = joint_attention_kwargs
|
739 |
self._interrupt = False
|
740 |
|
741 |
+
device = self._execution_device
|
742 |
+
|
743 |
# 2. Define call parameters
|
744 |
if prompt is not None and isinstance(prompt, str):
|
745 |
batch_size = 1
|
|
|
748 |
else:
|
749 |
batch_size = prompt_embeds.shape[0]
|
750 |
|
|
|
|
|
751 |
do_classifier_free_guidance = guidance_scale > 1.0
|
752 |
|
753 |
lora_scale = (
|