AlekseyCalvin commited on
Commit
820759e
·
verified ·
1 Parent(s): fbdebbe

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +3 -3
pipeline.py CHANGED
@@ -1,7 +1,7 @@
1
  import torch
2
  import numpy as np
3
  from diffusers import FlowMatchEulerDiscreteScheduler
4
- from diffusers import FluxPipeline
5
  from diffusers.pipelines.flux.pipeline_output import FluxPipelineOutput
6
  from typing import Any, Callable, Dict, List, Optional, Union
7
  from PIL import Image
@@ -55,14 +55,14 @@ def prepare_timesteps(
55
  return timesteps, num_inference_steps
56
 
57
  # FLUX pipeline function
58
- class FluxWithCFGPipeline(FluxPipeline):
59
  def __call__(
60
  self,
61
  prompt: Union[str, List[str]] = None,
62
  prompt_2: Optional[Union[str, List[str]]] = None,
63
  height: Optional[int] = None,
64
  width: Optional[int] = None,
65
- negative_prompt: Optional[Union[str, List[str]]] = None,
66
  negative_prompt_2: Optional[Union[str, List[str]]] = None,
67
  num_inference_steps: int = 4,
68
  timesteps: List[int] = None,
 
1
  import torch
2
  import numpy as np
3
  from diffusers import FlowMatchEulerDiscreteScheduler
4
+ from diffusers import StableDiffusion3Pipeline
5
  from diffusers.pipelines.flux.pipeline_output import FluxPipelineOutput
6
  from typing import Any, Callable, Dict, List, Optional, Union
7
  from PIL import Image
 
55
  return timesteps, num_inference_steps
56
 
57
  # FLUX pipeline function
58
+ class FluxWithCFGPipeline(StableDiffusion3Pipeline):
59
  def __call__(
60
  self,
61
  prompt: Union[str, List[str]] = None,
62
  prompt_2: Optional[Union[str, List[str]]] = None,
63
  height: Optional[int] = None,
64
  width: Optional[int] = None,
65
+ negative_prompt: Union[str, List[str]] = None,
66
  negative_prompt_2: Optional[Union[str, List[str]]] = None,
67
  num_inference_steps: int = 4,
68
  timesteps: List[int] = None,