Skip to content

[Testnet] Two new t2i generators: DeepFloyd-IF I-XL-v1.0 + II-L-v1.0 multistage pipeline and Janus Pro 7B#147

Merged
aliang322 merged 14 commits intotestnetfrom
t2i/deepfloyed-if-and-janus-pro
Feb 3, 2025
Merged

[Testnet] Two new t2i generators: DeepFloyd-IF I-XL-v1.0 + II-L-v1.0 multistage pipeline and Janus Pro 7B#147
aliang322 merged 14 commits intotestnetfrom
t2i/deepfloyed-if-and-janus-pro

Conversation

@aliang322
Copy link
Contributor

@aliang322 aliang322 commented Jan 30, 2025

TLDR; Added support for two new text-to-image (t2i) models in validator challenges

This expands our total t2i generator pool from 6 to 8 unique synthetic sources (excluding image-to-image). We predict this will raise the challenge difficulty for miners, as models must generalize to a wider variety of generation methods to stay performant.

Action Required for Validators: Both components of the DeepFloyd pipeline are gated on HuggingFace and require that validators visit the model repos to gain access. A new install requirement is also needed to run Janus image generation without errors.

Supporting groundwork includes:

  • Sequential multistage pipeline loading and inference
    • pipeline_stages structure in bitmind/validator/config.py with stage-specific pipeline_cls and from_pretrained_args
    • utils to create config-dependent generate functions for multistage pipelines, and handle multistage tokenizers
  • Custom JanusWrapper class extending DiffusionPipeline for generator compatibility
    • Wrapper and loading utils in model_utils.py, consistent with previously added custom load functions for Hunyuan Video and Animate Diff

Misc.

  • Improved args for testing individual modalities and models in run_data_generator.py and run_cache_updater.py

@aliang322 aliang322 requested a review from dylanuys January 30, 2025 23:43
raise NotImplementedError(f"Unsupported prompt type: {self.prompt_type}")
return prompt

def create_pipeline_generator(self, model_config: Dict[str, Any], model: Any) -> callable:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: This looks like it might belong in a model_utils.py or a similar file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree! Moved to model utils

self.model[stage_name].set_progress_bar_config(disable=True)

# Apply CPU offloading if enabled
if model_config.get('enable_model_cpu_offload', False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Pull out enabling cpu offload, vae tiling, etc. into its own utility function like:

def enable_optimizations(model, cpu_offload: bool, vae_tiling: bool, etc...)

and use this for both single and multistage pipeline setup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree here as well, moved to model utils to keep synthetic_data_generator lean

Copy link
Contributor

@dylanuys dylanuys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aliang322 aliang322 merged commit 1e0bbc3 into testnet Feb 3, 2025
1 check passed
@dylanuys dylanuys changed the title Two new t2i generators: DeepFloyd-IF I-XL-v1.0 + II-L-v1.0 multistage pipeline and Janus Pro 7B [Testnet] Two new t2i generators: DeepFloyd-IF I-XL-v1.0 + II-L-v1.0 multistage pipeline and Janus Pro 7B Feb 12, 2025
@dylanuys dylanuys deleted the t2i/deepfloyed-if-and-janus-pro branch March 13, 2025 05:22
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.

2 participants