Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ from huggingface_hub import login
|
|
| 12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 13 |
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0")
|
| 14 |
pipe = pipe.to(device)
|
| 15 |
-
|
| 16 |
def infer(prompt, source_image, negative_prompt, guide, steps, seed, Strength):
|
| 17 |
seed = int(seed)
|
| 18 |
generator = torch.Generator(device).manual_seed(seed)
|
|
|
|
| 12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 13 |
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0")
|
| 14 |
pipe = pipe.to(device)
|
| 15 |
+
# ok
|
| 16 |
def infer(prompt, source_image, negative_prompt, guide, steps, seed, Strength):
|
| 17 |
seed = int(seed)
|
| 18 |
generator = torch.Generator(device).manual_seed(seed)
|