imagine_image_files()
Generates and saves image files based on given prompts, with options for animations and videos.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| prompts | list[ImaginePrompt] | ImaginePrompt | A prompt or list of prompts for image generation. | required | 
| outdir | str | Directory path where the generated images and other files will be saved. | required | 
| precision | str | Precision mode for image generation, defaults to 'autocast'. | 'autocast' | 
| record_step_images | bool | If True, saves step-by-step images of the generation process, defaults to False. | False | 
| output_file_extension | str | File extension for output images, must be 'jpg' or 'png', defaults to 'jpg'. | 'jpg' | 
| print_caption | bool | If True, prints captions on the generated images, defaults to False. | False | 
| make_gif | bool | If True, creates a GIF from the generation steps, defaults to False. | False | 
| make_compare_gif | bool | If True, creates a comparison GIF with initial and generated images, defaults to False. | False | 
| return_filename_type | str | Type of filenames to return, defaults to 'generated'. | 'generated' | 
| videogen | bool | If True, generates a video from the generated images, defaults to False. | False | 
Returns:
| Type | Description | 
|---|---|
| list[str]: A list of filenames of the generated images. | 
Raises:
| Type | Description | 
|---|---|
| ValueError | If the output file extension is not 'jpg' or 'png'. | 
Source code in imaginairy/api/generate.py
              | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |  |