mirror of
https://github.com/huggingface/diffusers.git
synced 2026-05-28 00:39:35 +08:00
Make prompt_2 optional in Flux Pipelines (#12073)
Some checks are pending
Build documentation / build (push) Waiting to run
Run dependency tests / check_dependencies (push) Waiting to run
Run Flax dependency tests / check_flax_dependencies (push) Waiting to run
Run Torch dependency tests / check_torch_dependencies (push) Waiting to run
Fast GPU Tests on main / Setup Torch Pipelines CUDA Slow Tests Matrix (push) Waiting to run
Fast GPU Tests on main / Torch Pipelines CUDA Tests (push) Blocked by required conditions
Fast GPU Tests on main / Torch CUDA Tests (lora) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (models) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (others) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (schedulers) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (single_file) (push) Waiting to run
Fast GPU Tests on main / PyTorch Compile CUDA tests (push) Waiting to run
Fast GPU Tests on main / PyTorch xformers CUDA tests (push) Waiting to run
Fast GPU Tests on main / Examples PyTorch CUDA tests on Ubuntu (push) Waiting to run
Fast tests on main / ${{ matrix.config.name }} (map[framework:pytorch image:diffusers/diffusers-pytorch-cpu name:Fast PyTorch CPU tests on Ubuntu report:torch_cpu runner:aws-general-8-plus]) (push) Waiting to run
Fast tests on main / ${{ matrix.config.name }} (map[framework:pytorch_examples image:diffusers/diffusers-pytorch-cpu name:PyTorch Example CPU tests on Ubuntu report:torch_example_cpu runner:aws-general-8-plus]) (push) Waiting to run
Secret Leaks / trufflehog (push) Waiting to run
Update Diffusers metadata / update_metadata (push) Waiting to run
Some checks are pending
Build documentation / build (push) Waiting to run
Run dependency tests / check_dependencies (push) Waiting to run
Run Flax dependency tests / check_flax_dependencies (push) Waiting to run
Run Torch dependency tests / check_torch_dependencies (push) Waiting to run
Fast GPU Tests on main / Setup Torch Pipelines CUDA Slow Tests Matrix (push) Waiting to run
Fast GPU Tests on main / Torch Pipelines CUDA Tests (push) Blocked by required conditions
Fast GPU Tests on main / Torch CUDA Tests (lora) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (models) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (others) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (schedulers) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (single_file) (push) Waiting to run
Fast GPU Tests on main / PyTorch Compile CUDA tests (push) Waiting to run
Fast GPU Tests on main / PyTorch xformers CUDA tests (push) Waiting to run
Fast GPU Tests on main / Examples PyTorch CUDA tests on Ubuntu (push) Waiting to run
Fast tests on main / ${{ matrix.config.name }} (map[framework:pytorch image:diffusers/diffusers-pytorch-cpu name:Fast PyTorch CPU tests on Ubuntu report:torch_cpu runner:aws-general-8-plus]) (push) Waiting to run
Fast tests on main / ${{ matrix.config.name }} (map[framework:pytorch_examples image:diffusers/diffusers-pytorch-cpu name:PyTorch Example CPU tests on Ubuntu report:torch_example_cpu runner:aws-general-8-plus]) (push) Waiting to run
Secret Leaks / trufflehog (push) Waiting to run
Update Diffusers metadata / update_metadata (push) Waiting to run
* update * update
This commit is contained in:
@@ -310,7 +310,7 @@ class FluxPipeline(
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -324,7 +324,7 @@ class FluxControlPipeline(
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -335,7 +335,7 @@ class FluxControlImg2ImgPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSin
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -374,7 +374,7 @@ class FluxControlInpaintPipeline(
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -341,7 +341,7 @@ class FluxControlNetPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleF
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -335,7 +335,7 @@ class FluxControlNetImg2ImgPipeline(DiffusionPipeline, FluxLoraLoaderMixin, From
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -346,7 +346,7 @@ class FluxControlNetInpaintPipeline(DiffusionPipeline, FluxLoraLoaderMixin, From
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -419,7 +419,7 @@ class FluxFillPipeline(
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -333,7 +333,7 @@ class FluxImg2ImgPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFile
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -337,7 +337,7 @@ class FluxInpaintPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FluxIPAdapterM
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -358,7 +358,7 @@ class FluxKontextPipeline(
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -391,7 +391,7 @@ class FluxKontextInpaintPipeline(
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
@@ -292,7 +292,7 @@ class FluxPriorReduxPipeline(DiffusionPipeline):
|
||||
def encode_prompt(
|
||||
self,
|
||||
prompt: Union[str, List[str]],
|
||||
prompt_2: Union[str, List[str]],
|
||||
prompt_2: Optional[Union[str, List[str]]] = None,
|
||||
device: Optional[torch.device] = None,
|
||||
num_images_per_prompt: int = 1,
|
||||
prompt_embeds: Optional[torch.FloatTensor] = None,
|
||||
|
||||
Reference in New Issue
Block a user