Spaces:
Running
on
Zero
Running
on
Zero
AlekseyCalvin
commited on
Update pipeline.py
Browse files- pipeline.py +28 -2
pipeline.py
CHANGED
@@ -79,7 +79,20 @@ class FluxWithCFGPipeline(StableDiffusion3Pipeline):
|
|
79 |
tokenizer_3 = None,
|
80 |
text_encoder_2 = T5EncoderModel,
|
81 |
text_encoder_3 = None,
|
82 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
self.vae_scale_factor = (
|
84 |
2 ** (len(self.vae.config.block_out_channels) - 1) if hasattr(self, "vae") and self.vae is not None else 16
|
85 |
)
|
@@ -252,7 +265,20 @@ class FluxWithCFGPipeline(StableDiffusion3Pipeline):
|
|
252 |
tokenizer_3: None,
|
253 |
text_encoder_2: T5EncoderModel,
|
254 |
text_encoder_3: None,
|
255 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
self.vae_scale_factor = (
|
257 |
2 ** (len(self.vae.config.block_out_channels) - 1) if hasattr(self, "vae") and self.vae is not None else 16
|
258 |
)
|
|
|
79 |
tokenizer_3 = None,
|
80 |
text_encoder_2 = T5EncoderModel,
|
81 |
text_encoder_3 = None,
|
82 |
+
):
|
83 |
+
super().__init__()
|
84 |
+
|
85 |
+
self.register_modules(
|
86 |
+
vae=vae,
|
87 |
+
text_encoder=text_encoder,
|
88 |
+
text_encoder_2=text_encoder_2,
|
89 |
+
text_encoder_3=text_encoder_3,
|
90 |
+
tokenizer=tokenizer,
|
91 |
+
tokenizer_2=tokenizer_2,
|
92 |
+
tokenizer_3=tokenizer_3,
|
93 |
+
transformer=transformer,
|
94 |
+
scheduler=scheduler,
|
95 |
+
)
|
96 |
self.vae_scale_factor = (
|
97 |
2 ** (len(self.vae.config.block_out_channels) - 1) if hasattr(self, "vae") and self.vae is not None else 16
|
98 |
)
|
|
|
265 |
tokenizer_3: None,
|
266 |
text_encoder_2: T5EncoderModel,
|
267 |
text_encoder_3: None,
|
268 |
+
):
|
269 |
+
super().__init__()
|
270 |
+
|
271 |
+
self.register_modules(
|
272 |
+
vae=vae,
|
273 |
+
text_encoder=text_encoder,
|
274 |
+
text_encoder_2=text_encoder_2,
|
275 |
+
text_encoder_3=text_encoder_3,
|
276 |
+
tokenizer=tokenizer,
|
277 |
+
tokenizer_2=tokenizer_2,
|
278 |
+
tokenizer_3=tokenizer_3,
|
279 |
+
transformer=transformer,
|
280 |
+
scheduler=scheduler,
|
281 |
+
)
|
282 |
self.vae_scale_factor = (
|
283 |
2 ** (len(self.vae.config.block_out_channels) - 1) if hasattr(self, "vae") and self.vae is not None else 16
|
284 |
)
|