Spaces:
Runtime error
Runtime error
| # live_preview_helpers.py | |
| import torch | |
| from typing import Iterator | |
| # live_preview_helpers.py | |
| def flux_pipe_call_that_returns_an_iterable_of_images( | |
| self, | |
| prompt, | |
| guidance_scale=7.5, | |
| num_inference_steps=20, | |
| width=512, | |
| height=512, | |
| generator=None, | |
| output_type="pil", | |
| good_vae=None | |
| ): | |
| """ | |
| For StableDiffusion: yields a single image for now. | |
| """ | |
| image = self( | |
| prompt=prompt, | |
| guidance_scale=guidance_scale, | |
| num_inference_steps=num_inference_steps, | |
| width=width, | |
| height=height, | |
| generator=generator, | |
| output_type=output_type, | |
| ).images[0] | |
| yield image | |