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

Minimal txt2img example #60

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

akx
Copy link
Contributor

@akx akx commented Jul 25, 2023


This PR adds a simple, minimal txt2img command line example tool that also works on Apple Silicon.

By running env SGM_DEFAULT_DEVICE=mps python txt2img.py on this branch you'll eventually get a familiar sight in outputs/:
1690298028-0001

It also adds the minimal set of dependencies I identified to be enough to run the demo (as originally discussed in #17).

@bghira
Copy link

bghira commented Jul 26, 2023

can you please ensure you test a batch size greater than 1 through the base and refiner?

@akx
Copy link
Contributor Author

akx commented Jul 26, 2023

@bghira I'm holding off on this PR until the 1.0 stuff stabilizes. This PR will probably be reworked to use the new higher-level helper APIs from #57 (which are essentially a superset of what I had already written here).

I did test with a batch size of 2, that did work fine.

@bghira
Copy link

bghira commented Jul 26, 2023

@akx the batch size issue is prompt-dependent, eg. happy child flying a kite on a sunny day introduces many watermark artifacts with batch_size > 1, but not at batch_size = 1. and the default astronaut prompt, does not cause any issues.

the reason so far as I can tell is due to some issue in the stride used for the refiner steps. but i've mostly managed to reproduce the issue, not identify the actual cause or solution other than refining images separately.

edit: and the issue is independent of MPS or CUDA being used.

This was referenced Jul 27, 2023
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