Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,8 +29,9 @@ def create_image(image_pil,
|
|
| 29 |
seed,
|
| 30 |
target="Load only style blocks",
|
| 31 |
):
|
| 32 |
-
|
| 33 |
torch.cuda.set_device(device)
|
|
|
|
| 34 |
if target !="Load original IP-Adapter":
|
| 35 |
if target=="Load only style blocks":
|
| 36 |
scale = {
|
|
@@ -47,11 +48,13 @@ def create_image(image_pil,
|
|
| 47 |
}
|
| 48 |
pipeline.set_ip_adapter_scale(scale)
|
| 49 |
|
| 50 |
-
print(
|
| 51 |
|
| 52 |
style_image = load_image(image_pil)
|
| 53 |
|
|
|
|
| 54 |
generator = torch.Generator().manual_seed(randomize_seed_fn(seed, False))
|
|
|
|
| 55 |
image = pipeline(
|
| 56 |
prompt=prompt,
|
| 57 |
ip_adapter_image=style_image,
|
|
|
|
| 29 |
seed,
|
| 30 |
target="Load only style blocks",
|
| 31 |
):
|
| 32 |
+
print('start')
|
| 33 |
torch.cuda.set_device(device)
|
| 34 |
+
print('torch device set')
|
| 35 |
if target !="Load original IP-Adapter":
|
| 36 |
if target=="Load only style blocks":
|
| 37 |
scale = {
|
|
|
|
| 48 |
}
|
| 49 |
pipeline.set_ip_adapter_scale(scale)
|
| 50 |
|
| 51 |
+
print('ipscale set')
|
| 52 |
|
| 53 |
style_image = load_image(image_pil)
|
| 54 |
|
| 55 |
+
print('image loaded')
|
| 56 |
generator = torch.Generator().manual_seed(randomize_seed_fn(seed, False))
|
| 57 |
+
print('generator loaded')
|
| 58 |
image = pipeline(
|
| 59 |
prompt=prompt,
|
| 60 |
ip_adapter_image=style_image,
|