Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flux.1 #1331

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Flux.1 #1331

wants to merge 5 commits into from

Conversation

KimBioInfoStudio
Copy link
Contributor

What does this PR do?

adaption of diffuser.pipelines.FluxPipeline

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@KimBioInfoStudio
Copy link
Contributor Author

KimBioInfoStudio commented Sep 18, 2024

Run following cmd on a 225H KVM with 1.17.0

python text_to_image_generation.py \                  
    --model_name_or_path black-forest-labs/FLUX.1-schnell \
    --prompts "A cat holding a sign that says hello world" \
    --num_images_per_prompt 1 \
    --batch_size 1 \
    --num_inference_steps 28 \
    --image_save_dir /tmp/flux_1_images \
    --scheduler flow_match_euler_discrete\
    --use_habana \
    --use_hpu_graphs \
    --gaudi_config Habana/stable-diffusion \
    --bf16

got output as following:

------------------------------------------------------------------------------
[INFO|pipeline_flux.py:341] 2024-09-18 08:58:01,797 >> 1 prompt(s) received, 1 generation(s) per prompt, 1 sample(s) per batch, 1 total batch(es).
[WARNING|pipeline_flux.py:346] 2024-09-18 08:58:01,797 >> The first two iterations are slower so it is recommended to feed more batches.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [07:17<00:00, 14.80s/it][INFO|pipeline_flux.py:415] 2024-09-18 09:05:19,217 >> Speed metrics: {'generation_runtime': 437.4197, 'generation_samples_per_second': 0.002, 'generation_steps_per_second': 0.065}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [07:17<00:00, 15.62s/it]
09/18/2024 09:05:32 - INFO - __main__ - Saving images in /tmp/flux_1_images...

output image:
flux_image_1

@KimBioInfoStudio KimBioInfoStudio marked this pull request as ready for review September 18, 2024 08:59
@KimBioInfoStudio KimBioInfoStudio changed the title Flux Flux。1 Sep 18, 2024
@KimBioInfoStudio KimBioInfoStudio changed the title Flux。1 Flux.1 Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant