Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,11 +33,10 @@ else:
|
|
33 |
refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True)
|
34 |
refiner = refiner.to(device)
|
35 |
refiner.unet = torch.compile(refiner.unet, mode="reduce-overhead", fullgraph=True)
|
36 |
-
|
37 |
-
n_steps = 40
|
38 |
-
high_noise_frac = 0.8
|
39 |
-
|
40 |
def genie (prompt, negative_prompt, height, width, scale, steps, seed, upscaling, prompt_2, negative_prompt_2):
|
|
|
|
|
41 |
generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
|
42 |
int_image = pipe(prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, num_inference_steps=steps, height=height, width=width, guidance_scale=scale, num_images_per_prompt=1, generator=generator, output_type="latent").images
|
43 |
if upscaling == 'Yes':
|
|
|
33 |
refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True)
|
34 |
refiner = refiner.to(device)
|
35 |
refiner.unet = torch.compile(refiner.unet, mode="reduce-overhead", fullgraph=True)
|
36 |
+
|
|
|
|
|
|
|
37 |
def genie (prompt, negative_prompt, height, width, scale, steps, seed, upscaling, prompt_2, negative_prompt_2):
|
38 |
+
n_steps = 40
|
39 |
+
high_noise_frac = 0.8
|
40 |
generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
|
41 |
int_image = pipe(prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, num_inference_steps=steps, height=height, width=width, guidance_scale=scale, num_images_per_prompt=1, generator=generator, output_type="latent").images
|
42 |
if upscaling == 'Yes':
|