sitcom_simulator.image.image_generator¶
Functions
|
Given a script, returns the same script but with the image paths filled in. |
|
Generates and returns a list of image paths for the given script. |
- sitcom_simulator.image.image_generator.generate_images(script, orientation='portrait', on_image_generated=None, engine='stability')¶
Generates and returns a list of image paths for the given script.
More procedural in nature than add_images.
- Parameters:
script (
Script
) – The script to generate images fororientation (
Literal
['landscape'
,'portrait'
,'square'
]) – The orientation of the images to generateon_image_generated (
Optional
[Callable
[[int
,str
],None
]]) – A callback to call after each image is generated which takes the clip index and path to the generated imageengine (
Literal
['stability'
,'pillow'
]) – The engine to use for generating images
- sitcom_simulator.image.image_generator.add_images(script, orientation='portrait', on_image_generated=None, engine='stability')¶
Given a script, returns the same script but with the image paths filled in.
More functional in nature than generate_images.
- Parameters:
script (
Script
) – The script to add images toorientation (
Literal
['landscape'
,'portrait'
,'square'
]) – The orientation of the images to generateon_image_generated (
Optional
[Callable
[[int
,str
],None
]]) – A callback to call after each image is generated which takes the clip index and path to the generated imageengine (
Literal
['stability'
,'pillow'
]) – The engine to use for generating images
- Return type: