Spaces:
Runtime error
Runtime error
Update app.py
Browse files17 unmodified lines181920212223242517 unmodified linespipe = StableDiffusionXLPipeline.from_pretrained(base, unet=unet, torch_dtype=torch.float16, variant="fp16").to("cuda")# Ensure sampler uses "trailing" timesteps and "sample" prediction type.pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample")image = pipe(prompt, num_inference_steps=1, guidance_scale=0).images[0].save("output.png")return image# Ensure using the same inference steps as the loaded model and CFG set to 0.# @spaces.GPU17 unmodified lines181920212223242517 unmodified linespipe = StableDiffusionXLPipeline.from_pretrained(base, unet=unet, torch_dtype=torch.float16, variant="fp16").to("cuda")# Ensure sampler uses "trailing" timesteps and "sample" prediction type.pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample")return image = pipe(prompt, num_inference_steps=1, guidance_scale=0)# return image# Ensure using the same inference steps as the loaded model and CFG set to 0.# @spaces.GPU
app.py+2-2