Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

treating sampler types like lists via command line?

See original GitHub issue

just another suggestion… interesting testing with same prompt + seed with different sampler types led to a thought that having the option for ‘each’, or ‘series’ (ddim+plms), or ‘random’ options on --sampler-type might come in handy…

not sure what syntax would be consistent with command line options but maybe using {} or _option_ as per prompt syntaxes might work e.g.: _each_ = do 1 each of sampler types available (currently 10, thereby creating ten images) _random_ = choose 1 sampler randomly ‘+ syntax’ for ‘series’ thereby “–sampler-type ddim + plms + k_huen” = step through sampler series list thereby creating three images or maybe [] easier to parse, e.g. --sampler-type [ddim plms k_huen]

not sure, leave as whether a sensible/useful idea, and implementation details, for you to decide 😃

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

brycedrennancommented, Oct 25, 2022

This sounds like a more advanced use case then I’d want to support at the command line. I’d suggest just moving to the python interface at that point.

Untested code but you get the idea:

from imaginairy import ImaginePrompt, imagine_image_files
from imaginairy.samplers.base import SAMPLER_TYPE_OPTIONS

def main():
  prompt_text = "a dolphin"
  prompts = []
  for sampler_type in SAMPLER_TYPE_OPTIONS:
      prompt = ImaginePrompt(
          prompt_text, width=512, height=512, steps=20, seed=1, sampler_type=sampler_type
  imagine_image_files(prompts, outdir="output")

if __name__ == "__main__":
brycedrennancommented, Oct 25, 2022

yeah no worries - thanks for all the great feedback

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command-line syntax overview for System.CommandLine
An introduction to the command-line syntax that the System.CommandLine library recognizes by default. Mentions exceptions where syntax in ...
Read more >
Build Command-Line Interfaces With Python's argparse
Commands typically accept one or many arguments, which you can provide as a whitespace-separated or comma-separated list on your command line.
Read more >
Passing integer lists to python - command line - Stack Overflow
Either quote your lists ( "1 2 3 4 5" ) or comma-separate them ( 1,2,3,4,5 ) -- then argparse will treat them...
Read more >
Parameters / Arguments - Windows CMD -
How-to: Pass Command Line arguments (Parameters) to a Windows batch file. A command line argument (or parameter) is any value passed into a...
Read more >
argparse – Command line option and argument parsing.
The default action is to store the argument value. In this case, if a type is provided, the value is converted to that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found