Spaces:
Runtime error
Runtime error
Commit ·
426e0c2
1
Parent(s): 87800f7
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,8 @@ def infer(source_img, prompt, negative_prompt, height, width, guide, steps, seed
|
|
| 12 |
generator = torch.Generator(device).manual_seed(seed)
|
| 13 |
source_image = resize(height, width, source_img)
|
| 14 |
source_image.save('source.png')
|
| 15 |
-
model_url = "
|
| 16 |
-
pipe = DiffusionPipeline.from_pretrained(model_url, torch_dtype=torch.float16) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("
|
| 17 |
pipe = pipe.to(device)
|
| 18 |
image = pipe(prompt, negative_prompt=negative_prompt, image=source_image, strength=strength, guidance_scale=guide, num_inference_steps=steps).images[0]
|
| 19 |
return image
|
|
|
|
| 12 |
generator = torch.Generator(device).manual_seed(seed)
|
| 13 |
source_image = resize(height, width, source_img)
|
| 14 |
source_image.save('source.png')
|
| 15 |
+
model_url = "stabilityai/stable-diffusion-xl-base-1.0"
|
| 16 |
+
pipe = DiffusionPipeline.from_pretrained(model_url, torch_dtype=torch.float16) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0")
|
| 17 |
pipe = pipe.to(device)
|
| 18 |
image = pipe(prompt, negative_prompt=negative_prompt, image=source_image, strength=strength, guidance_scale=guide, num_inference_steps=steps).images[0]
|
| 19 |
return image
|