Spaces:
Running
on
Zero
Running
on
Zero
AlekseyCalvin
commited on
Update pipeline.py
Browse files- 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
|
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(
|
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:
|
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,
|