Spaces:
Running
on
Zero
Running
on
Zero
AlekseyCalvin
commited on
Commit
•
575de74
1
Parent(s):
1186e90
Update pipeline.py
Browse files- pipeline.py +3 -3
pipeline.py
CHANGED
@@ -100,7 +100,7 @@ class FluxWithCFGPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFile
|
|
100 |
)
|
101 |
self.image_processor = VaeImageProcessor(vae_scale_factor=self.vae_scale_factor)
|
102 |
self.tokenizer_max_length = (
|
103 |
-
self.tokenizer.model_max_length if hasattr(self, "tokenizer") and self.tokenizer is not None else
|
104 |
)
|
105 |
self.default_sample_size = 64
|
106 |
|
@@ -166,8 +166,8 @@ class FluxWithCFGPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFile
|
|
166 |
padding="max_length",
|
167 |
max_length=self.tokenizer_max_length,
|
168 |
truncation=True,
|
169 |
-
return_overflowing_tokens=
|
170 |
-
return_length=
|
171 |
return_tensors="pt",
|
172 |
)
|
173 |
|
|
|
100 |
)
|
101 |
self.image_processor = VaeImageProcessor(vae_scale_factor=self.vae_scale_factor)
|
102 |
self.tokenizer_max_length = (
|
103 |
+
self.tokenizer.model_max_length if hasattr(self, "tokenizer") and self.tokenizer is not None else 256
|
104 |
)
|
105 |
self.default_sample_size = 64
|
106 |
|
|
|
166 |
padding="max_length",
|
167 |
max_length=self.tokenizer_max_length,
|
168 |
truncation=True,
|
169 |
+
return_overflowing_tokens=True,
|
170 |
+
return_length=True,
|
171 |
return_tensors="pt",
|
172 |
)
|
173 |
|