Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,9 +30,6 @@ else:
|
|
30 |
refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True)
|
31 |
refiner = refiner.to(device)
|
32 |
|
33 |
-
torch.cuda.max_memory_allocated(device='cuda')
|
34 |
-
torch.cuda.empty_cache()
|
35 |
-
|
36 |
def genie (prompt, negative_prompt, height, width, scale, steps, seed, upscaler):
|
37 |
generator = torch.Generator(device=device).manual_seed(seed)
|
38 |
int_image = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=steps, height=height, width=width, guidance_scale=scale, num_images_per_prompt=1, generator=generator, output_type="latent").images
|
|
|
30 |
refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True)
|
31 |
refiner = refiner.to(device)
|
32 |
|
|
|
|
|
|
|
33 |
def genie (prompt, negative_prompt, height, width, scale, steps, seed, upscaler):
|
34 |
generator = torch.Generator(device=device).manual_seed(seed)
|
35 |
int_image = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=steps, height=height, width=width, guidance_scale=scale, num_images_per_prompt=1, generator=generator, output_type="latent").images
|