Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding mac / windows specific tests for standalone command. #169

Merged
merged 15 commits into from
Aug 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
skip uv wheel when dehydrating standalone python on windows
  • Loading branch information
telamonian committed Aug 30, 2024
commit c31259c52bedc28e1a2f00c128feecbc2ef69ce6
4 changes: 3 additions & 1 deletion comfy_cli/standalone.py
Original file line number Diff line number Diff line change
@@ -155,7 +155,9 @@ def dehydrate_comfy_deps(
extraSpecs=extraSpecs,
)
self.dep_comp.compile_deps()
self.dep_comp.fetch_dep_wheels()

skip_uv = get_os() == OS.WINDOWS
self.dep_comp.fetch_dep_wheels(skip_uv=skip_uv)

def rehydrate_comfy_deps(self):
self.dep_comp = DependencyCompiler(
34 changes: 30 additions & 4 deletions comfy_cli/uv.py
Original file line number Diff line number Diff line change
@@ -496,22 +496,48 @@ def sync_core_plus_ext(self):
extraUrl=self.gpuUrl,
)

def fetch_dep_dists(self):
def fetch_dep_dists(self, skip_uv: bool = False):
if skip_uv:
reqFile = None
with open(self.out) as f:
reqs = [
line
for line in f.readlines()
if not line.strip().startswith("#") and not line.strip().startswith("uv==")
]
else:
reqFile = [self.out]
reqs = None

DependencyCompiler.Download(
cwd=self.cwd,
reqFile=[self.out],
executable=self.executable,
extraUrl=self.gpuUrl,
noDeps=True,
out=self.outDir / "dists",
reqFile=reqFile,
reqs=reqs,
)

def fetch_dep_wheels(self):
def fetch_dep_wheels(self, skip_uv: bool = False):
if skip_uv:
reqFile = None
with open(self.out) as f:
reqs = [
line
for line in f.readlines()
if not line.strip().startswith("#") and not line.strip().startswith("uv==")
]
else:
reqFile = [self.out]
reqs = None

DependencyCompiler.Wheel(
cwd=self.cwd,
reqFile=[self.out],
executable=self.executable,
extraUrl=self.gpuUrl,
noDeps=True,
out=self.outDir / "wheels",
reqFile=reqFile,
reqs=reqs,
)
Loading