lllyasviel / Fooocus

Focus on prompting and generating
GNU General Public License v3.0
38.65k stars 5.2k forks source link

[Feature Request]: Weights & Biases integration with Fooocus #290

Open soumik12345 opened 10 months ago

soumik12345 commented 10 months ago

Being a user of both Fooocus and Weights & Biases, I decided to prototype an integration of Fooocus with Weights & Biases. The prototype for this integration currently resides in the development branch of my fork of Fooocus.

Instructions for using the W&B integration with Fooocus 👇

# Clone Fooocus (currently it is the development branch of my fork of Fooocus)
git clone https://github.com/soumik12345/fooocus -b feat/wandb-integration
cd Fooocus

# Install dependencies for Fooocus
conda env create -f environment.yaml
conda activate fooocus
pip install -r requirements_versions.txt

# Install Weights & Biases
pip install wandb

# Login to your W&B account or create one
wandb login

# Set your project and entity name
export WANDB_PROJECT="my-awesome-project"
export WANDB_ENTITY="my-team-or-username"

# Launch Fooocus
python launch.py --listen

The integration of W&B with Foocus consists of the following features 👇

Never miss another one of your past generations

The W&B integration with Fooocus automatically adds a History tab to the UI that keeps track of all your generations in a project by syncing it with Weights & Biases. Effortlessly, you can keep track of all of your past generations and your configs, without having to leave the Fooocus UI itself. You can also open up the W&B project and explore individual runs from the UI as well!

https://github.com/lllyasviel/Fooocus/assets/19887676/f8c227bf-4fa3-4780-93c7-8b09d53c23e8

A system of records for all your Artwork

Artworks logged into a W&B Table with the prompts and negative prompts. Users can also explore the respective Fooocus configs to generate the artwork by using the weave expression row.run.config["config-name"] to query them right in the table itself.

https://github.com/lllyasviel/Fooocus/assets/19887676/3b40b648-d1a9-49d2-91fa-1f5c2c0ee7ed

A shareable Art Gallery

Artworks are also automatically logged into a W&B media panel that enables us to share with our friends and colleagues in the form of a shareable art gallery.

https://github.com/lllyasviel/Fooocus/assets/19887676/a9c40471-7f4b-4f9e-b215-76761fa77ac6

Weave your artworks Effortlessly into W&B reports

Share your artistic experiments with your friends and colleagues, convert them into blog posts, or weave them together to tell your own story, using W&B reports.

https://github.com/lllyasviel/Fooocus/assets/19887676/e2619bfa-1b38-43bb-bb06-1c9c3bb98560

Note

soumik12345 commented 10 months ago

@lllyasviel I would love to contribute this feature to Fooocus.

mratanusarkar commented 10 months ago

I tried creating a few generations using the WandB integration with Fooocus based on the stories from Aesop's Fables.

Here is a story in particular that I attempted: The Fox & the Grapes, and here is the project and the runs: aesops-fables Take a look at the images and generations guys and feel free to drop some feedback.

Will keep adding more generations soon! (as of now, exhausted my free colab limit)

mashb1t commented 6 months ago

Quite a few things changed since you reported the issue. Please check again with the latest vesion of Fooocus and feel free to close the issue if this is still relevant.