Skip to content

The Modular Diffusers #9672

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

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

The Modular Diffusers #9672

wants to merge 150 commits into from

Conversation

yiyixuxu
Copy link
Collaborator

@yiyixuxu yiyixuxu commented Oct 14, 2024

TO-DOs before merge

  • We overrode changes in this PR https://github.com/huggingface/diffusers/pull/11652/files, need to make sure the updated code works for this case
  • PAG needs to be a guider on its own
  • One more guide on how to write a PipelineBlock; and how to assemble SequentialPipelineBlocks and AutoPipelineBlocks
  • a simple test case: slow case for now

TO-DOs

  • guider needs to be a ConfigMixin
  • ModularPipelineBlocks.from_pretrained needs to work with official blocks
  • Merge the concept of ModularLoader into ModularPipeline
  • Flux/Wan/ITX
  • API docs

Documentations

  • Documentations are live here

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@yoland68
Copy link

Very cool!

@oozzy77
Copy link

oozzy77 commented Oct 30, 2024

hi this is very interesting! I'm making a Python pipeline flow visual scripting tool, that can auto-convert functions to visual nodes for fast and modular UI blocks demo. Itself is a pip package: https://pypi.org/project/nozyio/

I wanted to integrate diffusers with my flow nodes UI project but found its not very modular. But this PR may change that! Looking forward to see how this evolves.

github: https://github.com/oozzy77/nozyio happy to connect!

@yiyixuxu
Copy link
Collaborator Author

@oozzy77 thanks!
do you want to join a slack channel with me? if you want to experiment building something with this PR I'm eager to hear your feedback and iterate base on that

@oozzy77
Copy link

oozzy77 commented Oct 31, 2024 via email

@yiyixuxu
Copy link
Collaborator Author

@oozzy77 I sent an invite!

@yiyixuxu yiyixuxu added the roadmap Add to current release roadmap label Dec 4, 2024
@hlky hlky mentioned this pull request Dec 5, 2024
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@DN6 @sayakpaul
I merged in this part of code without reviewing it (I need the save_pretrained() code and it works fine)
can you let me know if you want to keep it in here when we merge this PR or remove &convert it into a new PR

from . import BaseDiffusersCLICommand


EXPECTED_PARENT_CLASSES = ["PipelineBlock"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
EXPECTED_PARENT_CLASSES = ["PipelineBlock"]
EXPECTED_PARENT_CLASSES = ["ModularPipelineBlocks"]


GuiderType = Union[
AdaptiveProjectedGuidance,
AutoGuidance,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@a-r-r-o-w can we make sure PAG has its own class before we merge?

@@ -154,33 +159,87 @@ def check_imports(filename):
return get_relative_imports(filename)


def get_class_in_module(class_name, module_path, pretrained_model_name_or_path=None):
def _raise_timeout_error(signum, frame):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@DN6 is there a test we can run for remote code? want to make sure we don't break anything here

@yiyixuxu yiyixuxu requested review from stevhliu, a-r-r-o-w and asomoza and removed request for stevhliu July 1, 2025 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
roadmap Add to current release roadmap
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.