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

Add cog.yaml and predict.py for usage with Replicate and Docker #39

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

Conversation

voodoohop
Copy link

@voodoohop voodoohop commented Dec 1, 2024

I'm not totally sure if you want to have this in your repository but I figured I'd make a pull request anyway.

This PR adds the necessary configuration and code to deploy the model on Replicate:

  • Added cog.yaml with CUDA 12.4 and Python 3.11 setup
  • Added predict.py with Replicate-compatible inference code
  • Enhanced example.py with batch processing support

The implementation supports configurable image dimensions, inference steps, and seeds. Sequential CPU offloading is enabled by default for better memory management.

Let me know if you need any clarification or changes.

It is deployed here: https://replicate.com/pollinations/flux-schnell-svdquant

Thomas Haferlach added 2 commits December 1, 2024 01:14
- Add time tracking for image generation
- Save multiple images from a list of prompts
- Calculate and display average time per image
- Improve code readability and organization
@lmxyy
Copy link
Collaborator

lmxyy commented Dec 2, 2024

That is amazing. I will review your pr to see if it is appropriate in this repo. Thanks for your contributions!

Thomas Haferlach added 4 commits December 8, 2024 21:06
- Implement login and logout functionality
- Enhance security with password hashing
- Address issue mit-han-lab#42 for user access control
- Include safety_checker module for NSFW detection
- Adjust server.py to use safety checker with adjustable sensitivity
- Modify Dockerfile to copy safety_checker directory
- Update server command to use module syntax
@voodoohop
Copy link
Author

I have now modified the branch to work directly with Docker. If you are interested in the Docker stuff without the replicate/cog things I could clean this PR up.

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