Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def genie (prompt, negative_prompt, scale, steps, seed):
|
|
23 |
int_image = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=steps, guidance_scale=scale, num_images_per_prompt=1, generator=generator, ).images
|
24 |
torch.cuda.empty_cache()
|
25 |
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
26 |
-
pipe =
|
27 |
pipe.enable_xformers_memory_efficient_attention()
|
28 |
torch.cuda.empty_cache()
|
29 |
image = pipe(prompt=prompt, image=int_image).images[0]
|
|
|
23 |
int_image = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=steps, guidance_scale=scale, num_images_per_prompt=1, generator=generator, ).images
|
24 |
torch.cuda.empty_cache()
|
25 |
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
26 |
+
pipe = pipe.to(device)
|
27 |
pipe.enable_xformers_memory_efficient_attention()
|
28 |
torch.cuda.empty_cache()
|
29 |
image = pipe(prompt=prompt, image=int_image).images[0]
|