Skip to content

proposed cleanups/refactoring #206

@bakkot

Description

@bakkot

I've been messing around with the code for a while now, and there's a few pain points I'd like to address. Before I do a bunch of work on this I want to get confirmation that these changes would be merged:

  • remove batch_size, per Is anyone actually using --batch_size? #204
  • refactor pngwriter to not take an "upscaled" parameter, since that's not really related to what it does
  • reify the parameters (at least sampler, seed, steps, cfg_scale, prompt) into an object
    • and make that object responsible for serialization/deserialization to both prompts and png metadata
    • ideally also changing the format of metadata stored in images; png metadata can be key-value pairs, so we don't need to stick it all into a single string

These need to be done in order - it will be a lot easier to refactor pngwriter after removing batch_size, for example.

I'd really like to work on getting interpolation working, but for that code to be of acceptable quality I really need to make the above changes first. (I actually started doing it and then kept getting distracted by all of the above stuff.)

@lstein if I send a PR with all of these changes, would you be up for merging them? I can split it into seperate PRs if necessary, but if each one needs to get through review in order it's going to take a lot longer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions