Skip to content

Commit 191670e

Browse files
committed
add copied froms
1 parent 3a00b2d commit 191670e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/diffusers/pipelines/flux/pipeline_flux_kontext.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
>>> from diffusers.utils import load_image
6262
6363
>>> pipe = FluxKontextPipeline.from_pretrained(
64-
... "black-forest-labs/FLUX.1-kontext", transformer=transformer, torch_dtype=torch.bfloat16
64+
... "black-forest-labs/FLUX.1-kontext", torch_dtype=torch.bfloat16
6565
... )
6666
>>> pipe.to("cuda")
6767
@@ -257,6 +257,7 @@ def __init__(
257257
)
258258
self.default_sample_size = 128
259259

260+
# Copied from diffusers.pipelines.flux.pipeline_flux.FluxPipeline._get_t5_prompt_embeds
260261
def _get_t5_prompt_embeds(
261262
self,
262263
prompt: Union[str, List[str]] = None,
@@ -306,6 +307,7 @@ def _get_t5_prompt_embeds(
306307

307308
return prompt_embeds
308309

310+
# Copied from diffusers.pipelines.flux.pipeline_flux.FluxPipeline._get_clip_prompt_embeds
309311
def _get_clip_prompt_embeds(
310312
self,
311313
prompt: Union[str, List[str]],
@@ -350,6 +352,7 @@ def _get_clip_prompt_embeds(
350352

351353
return prompt_embeds
352354

355+
# Copied from diffusers.pipelines.flux.pipeline_flux.FluxPipeline.encode_prompt
353356
def encode_prompt(
354357
self,
355358
prompt: Union[str, List[str]],
@@ -429,6 +432,7 @@ def encode_prompt(
429432

430433
return prompt_embeds, pooled_prompt_embeds, text_ids
431434

435+
# Copied from diffusers.pipelines.flux.pipeline_flux.FluxPipeline.encode_image
432436
def encode_image(self, image, device, num_images_per_prompt):
433437
dtype = next(self.image_encoder.parameters()).dtype
434438

@@ -440,6 +444,7 @@ def encode_image(self, image, device, num_images_per_prompt):
440444
image_embeds = image_embeds.repeat_interleave(num_images_per_prompt, dim=0)
441445
return image_embeds
442446

447+
# Copied from diffusers.pipelines.flux.pipeline_flux.FluxPipeline.prepare_ip_adapter_image_embeds
443448
def prepare_ip_adapter_image_embeds(
444449
self, ip_adapter_image, ip_adapter_image_embeds, device, num_images_per_prompt
445450
):
@@ -476,6 +481,7 @@ def prepare_ip_adapter_image_embeds(
476481

477482
return ip_adapter_image_embeds
478483

484+
# Copied from diffusers.pipelines.flux.pipeline_flux.FluxPipeline.check_inputs
479485
def check_inputs(
480486
self,
481487
prompt,

0 commit comments

Comments
 (0)