Update README.md
Browse files
README.md
CHANGED
|
@@ -30,7 +30,7 @@ def load_pipeline(four_bit=False):
|
|
| 30 |
"sayakpaul/FLUX.1-Fill-dev-nf4", subfolder="text_encoder_2", torch_dtype=torch.bfloat16
|
| 31 |
)
|
| 32 |
pipeline = FluxFillPipeline.from_pipe(
|
| 33 |
-
orig_pipeline,
|
| 34 |
)
|
| 35 |
else:
|
| 36 |
transformer = FluxTransformer2DModel.from_pretrained(
|
|
@@ -51,8 +51,9 @@ def load_conditions():
|
|
| 51 |
return image, mask
|
| 52 |
|
| 53 |
|
| 54 |
-
def main(
|
| 55 |
-
pipe = load_pipeline(
|
|
|
|
| 56 |
image, mask = load_conditions()
|
| 57 |
image = pipe(
|
| 58 |
prompt="a white paper cup",
|
|
|
|
| 30 |
"sayakpaul/FLUX.1-Fill-dev-nf4", subfolder="text_encoder_2", torch_dtype=torch.bfloat16
|
| 31 |
)
|
| 32 |
pipeline = FluxFillPipeline.from_pipe(
|
| 33 |
+
orig_pipeline, transformer=transformer, text_encoder_2=text_encoder_2, torch_dtype=torch.bfloat16
|
| 34 |
)
|
| 35 |
else:
|
| 36 |
transformer = FluxTransformer2DModel.from_pretrained(
|
|
|
|
| 51 |
return image, mask
|
| 52 |
|
| 53 |
|
| 54 |
+
def main(four_bit: bool = False):
|
| 55 |
+
pipe = load_pipeline(four_bit=four_bit)
|
| 56 |
+
ckpt_id = "sayakpaul/FLUX.1-Fill-dev-nf4"
|
| 57 |
image, mask = load_conditions()
|
| 58 |
image = pipe(
|
| 59 |
prompt="a white paper cup",
|