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

Architext Alpha #27

Merged
merged 1 commit into from
Oct 12, 2022
Merged

Architext Alpha #27

merged 1 commit into from
Oct 12, 2022

Conversation

ehavener
Copy link
Collaborator

@ehavener ehavener commented Oct 5, 2022

Details

This PR introduces preliminary support for Architext. The user interface is launched by running python -m examples.architext.architext_test. Temporary credentials output by this command are used to sign in. You may need to obtain a copy of the fine tuned gptj-162M model and load it locally before running.

The collected preferences are: prompt, creativity, result, feedback, and score. The result with selected rooms removed is also collected as a diff of the result dict and room selections.

Screenshots

Prompt input
127 0 0 1_7861_(iPad Mini)

Model output
127 0 0 1_7861_(iPad Mini) (1)

Preference collection
127 0 0 1_7861_(iPad Mini) (2)

@ehavener ehavener requested a review from shahbuland October 5, 2022 19:36
class ArchitextBatchElement(BatchElement):
prompt : str = ""
creativity : str = None # Low, Medium, High
result : Dict = None # { image: PIL.Image.Image, layout: str, layout_after_removed: str }
Copy link
Collaborator

Choose a reason for hiding this comment

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

While not an immediate concern: If possible, I'd recommend finding some way to get the user the image without explicitly sending it to them. Would it be possible to take model outputted text and convert it into an image client side? If so, it might save on network traffic substantially.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Serving text would work well for architext given that our image is just a vector and we can easily draw it on a canvas. However, I don't think that rendering text as an image on the client side is possible without rolling a custom frontend. It appears gradio serves images as a base64 encoded .png and a typical architext generation is around ~10kb. This should be manageable for architext, but generally, this may become a concern if one wants to use an image model in an online flow. In this case one would want to upload the generated image to a cdn and serve that link instead.

Copy link
Collaborator

@shahbuland shahbuland left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@ehavener ehavener force-pushed the architext-alpha branch 2 times, most recently from 7e47292 to 260366b Compare October 12, 2022 19:14
@ehavener ehavener merged commit bcb7a07 into main Oct 12, 2022
@ehavener ehavener deleted the architext-alpha branch October 30, 2022 02:59
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