Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse filesForgot a thing
app.py
CHANGED
@@ -116,7 +116,7 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, up
|
|
116 |
torch.cuda.empty_cache()
|
117 |
|
118 |
if upscale == "Yes":
|
119 |
-
|
120 |
sdxl = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True, torch_dtype=torch.float16, variant="fp16") if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0")
|
121 |
sdxl.enable_xformers_memory_efficient_attention()
|
122 |
sdxl = sdxl.to(device)
|
|
|
116 |
torch.cuda.empty_cache()
|
117 |
|
118 |
if upscale == "Yes":
|
119 |
+
int_image = sdxl(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale, output_type="latent").images
|
120 |
sdxl = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True, torch_dtype=torch.float16, variant="fp16") if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0")
|
121 |
sdxl.enable_xformers_memory_efficient_attention()
|
122 |
sdxl = sdxl.to(device)
|