Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
43275a6
1
Parent(s):
c9aabad
modified: app.py
Browse files- app.py +3 -3
- src/flux/__pycache__/__init__.cpython-310.pyc +0 -0
- src/flux/__pycache__/_version.cpython-310.pyc +0 -0
- src/flux/__pycache__/math.cpython-310.pyc +0 -0
- src/flux/__pycache__/model.cpython-310.pyc +0 -0
- src/flux/__pycache__/sampling.cpython-310.pyc +0 -0
- src/flux/__pycache__/util.cpython-310.pyc +0 -0
- src/flux/modules/__pycache__/autoencoder.cpython-310.pyc +0 -0
- src/flux/modules/__pycache__/conditioner.cpython-310.pyc +0 -0
- src/flux/modules/__pycache__/layers.cpython-310.pyc +0 -0
app.py
CHANGED
|
@@ -138,7 +138,7 @@ class FluxEditor:
|
|
| 138 |
):
|
| 139 |
|
| 140 |
if seed is None:
|
| 141 |
-
g_seed = torch.Generator(device="cpu").seed()
|
| 142 |
print(f"Generating '{prompt}' with seed {g_seed}")
|
| 143 |
t0 = time.perf_counter()
|
| 144 |
|
|
@@ -283,7 +283,7 @@ class FluxEditor:
|
|
| 283 |
init_image_2 = np.array(init_image_2_pil) # Convert back to NumPy (if needed)
|
| 284 |
init_image_2 = encode(init_image_2, self.device, self.ae)
|
| 285 |
|
| 286 |
-
rng = torch.Generator(device="cpu")
|
| 287 |
opts = SamplingOptions(
|
| 288 |
source_prompt=source_prompt,
|
| 289 |
target_prompt=target_prompt,
|
|
@@ -294,7 +294,7 @@ class FluxEditor:
|
|
| 294 |
seed=seed,
|
| 295 |
)
|
| 296 |
if opts.seed is None:
|
| 297 |
-
opts.seed = torch.Generator(device="cpu").seed()
|
| 298 |
|
| 299 |
print(f"Editing with prompt:\n{opts.source_prompt}")
|
| 300 |
t0 = time.perf_counter()
|
|
|
|
| 138 |
):
|
| 139 |
|
| 140 |
if seed is None:
|
| 141 |
+
g_seed = torch.Generator(device=torch.device("cpu")).seed()
|
| 142 |
print(f"Generating '{prompt}' with seed {g_seed}")
|
| 143 |
t0 = time.perf_counter()
|
| 144 |
|
|
|
|
| 283 |
init_image_2 = np.array(init_image_2_pil) # Convert back to NumPy (if needed)
|
| 284 |
init_image_2 = encode(init_image_2, self.device, self.ae)
|
| 285 |
|
| 286 |
+
rng = torch.Generator(device=torch.device("cpu"))
|
| 287 |
opts = SamplingOptions(
|
| 288 |
source_prompt=source_prompt,
|
| 289 |
target_prompt=target_prompt,
|
|
|
|
| 294 |
seed=seed,
|
| 295 |
)
|
| 296 |
if opts.seed is None:
|
| 297 |
+
opts.seed = torch.Generator(device=torch.device("cpu")).seed()
|
| 298 |
|
| 299 |
print(f"Editing with prompt:\n{opts.source_prompt}")
|
| 300 |
t0 = time.perf_counter()
|
src/flux/__pycache__/__init__.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/__init__.cpython-310.pyc and b/src/flux/__pycache__/__init__.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/_version.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/_version.cpython-310.pyc and b/src/flux/__pycache__/_version.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/math.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/math.cpython-310.pyc and b/src/flux/__pycache__/math.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/model.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/model.cpython-310.pyc and b/src/flux/__pycache__/model.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/sampling.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/sampling.cpython-310.pyc and b/src/flux/__pycache__/sampling.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/util.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/util.cpython-310.pyc and b/src/flux/__pycache__/util.cpython-310.pyc differ
|
|
|
src/flux/modules/__pycache__/autoencoder.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/modules/__pycache__/autoencoder.cpython-310.pyc and b/src/flux/modules/__pycache__/autoencoder.cpython-310.pyc differ
|
|
|
src/flux/modules/__pycache__/conditioner.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/modules/__pycache__/conditioner.cpython-310.pyc and b/src/flux/modules/__pycache__/conditioner.cpython-310.pyc differ
|
|
|
src/flux/modules/__pycache__/layers.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/modules/__pycache__/layers.cpython-310.pyc and b/src/flux/modules/__pycache__/layers.cpython-310.pyc differ
|
|
|