Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
diffusers
Commits
4e74206b
You need to sign in or sign up before continuing.
Unverified
Commit
4e74206b
authored
Aug 23, 2024
by
Dhruv Nair
Committed by
GitHub
Aug 23, 2024
Browse files
[Single File] Add Flux Pipeline Support (#9244)
update
parent
255ac592
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/diffusers/pipelines/flux/pipeline_flux.py
src/diffusers/pipelines/flux/pipeline_flux.py
+2
-2
src/diffusers/pipelines/flux/pipeline_flux_controlnet.py
src/diffusers/pipelines/flux/pipeline_flux_controlnet.py
+2
-2
No files found.
src/diffusers/pipelines/flux/pipeline_flux.py
View file @
4e74206b
...
...
@@ -20,7 +20,7 @@ import torch
from
transformers
import
CLIPTextModel
,
CLIPTokenizer
,
T5EncoderModel
,
T5TokenizerFast
from
...image_processor
import
VaeImageProcessor
from
...loaders
import
FluxLoraLoaderMixin
from
...loaders
import
FluxLoraLoaderMixin
,
FromSingleFileMixin
from
...models.autoencoders
import
AutoencoderKL
from
...models.transformers
import
FluxTransformer2DModel
from
...schedulers
import
FlowMatchEulerDiscreteScheduler
...
...
@@ -137,7 +137,7 @@ def retrieve_timesteps(
return
timesteps
,
num_inference_steps
class
FluxPipeline
(
DiffusionPipeline
,
FluxLoraLoaderMixin
):
class
FluxPipeline
(
DiffusionPipeline
,
FluxLoraLoaderMixin
,
FromSingleFileMixin
):
r
"""
The Flux pipeline for text-to-image generation.
...
...
src/diffusers/pipelines/flux/pipeline_flux_controlnet.py
View file @
4e74206b
...
...
@@ -25,7 +25,7 @@ from transformers import (
)
from
...image_processor
import
PipelineImageInput
,
VaeImageProcessor
from
...loaders
import
FluxLoraLoaderMixin
from
...loaders
import
FluxLoraLoaderMixin
,
FromSingleFileMixin
from
...models.autoencoders
import
AutoencoderKL
from
...models.controlnet_flux
import
FluxControlNetModel
from
...models.transformers
import
FluxTransformer2DModel
...
...
@@ -155,7 +155,7 @@ def retrieve_timesteps(
return
timesteps
,
num_inference_steps
class
FluxControlNetPipeline
(
DiffusionPipeline
,
FluxLoraLoaderMixin
):
class
FluxControlNetPipeline
(
DiffusionPipeline
,
FluxLoraLoaderMixin
,
FromSingleFileMixin
):
r
"""
The Flux pipeline for text-to-image generation.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment