Spaces:
Runtime error
Runtime error
Testing Settings
#1
by
awacke1
- opened
Added a few setting changes to see max resolution, matching 1920x1080, increase steps from 25 to 50.
@spaces.GPU(enable_queue=True)
def generate(
prompt: str,
negative_prompt: str = "",
use_negative_prompt: bool = False,
seed: int = 0,
#width: int = 1024,
#height: int = 1024,
width: int = 1920,
height: int = 1080,
guidance_scale: float = 3,
randomize_seed: bool = True,
#randomize_seed: bool = False,
progress=gr.Progress(track_tqdm=True),
):
seed = int(randomize_seed_fn(seed, randomize_seed))
if not use_negative_prompt:
negative_prompt = "" # type: ignore
images = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
width=width,
height=height,
guidance_scale=guidance_scale,
num_inference_steps=50,
num_images_per_prompt=1,
cross_attention_kwargs={"scale": 2.00},
#cross_attention_kwargs={"scale": 0.65},
output_type="pil",
).images
image_paths = [save_image(img, prompt) for img in images]