Bump version to 0.11.2 and update uv version to 0.11.3
- Updated version in pyproject.toml and blender_manifest.toml to 0.11.2. - Enhanced uv executable path documentation in client.py. - Added inference_mode parameter to reconstruct_request function in client.py. - Implemented uv download functionality in install_env.py with improved error handling and checksum verification. - Modified install_uv function to download and extract uv binary instead of using bundled version. - Updated job progress handling in operators.py to track progress stages. - Improved download progress reporting in worker.py and adjusted related tests. - Refactored tests to accommodate changes in status reporting and model downloading. - Removed vendor.lock.toml as part of the cleanup process.
This commit is contained in:
@@ -108,6 +108,7 @@ class ActiveJob:
|
||||
started: bool = False
|
||||
start_error: str = ""
|
||||
start_thread: threading.Thread | None = None
|
||||
progress_stage: int | None = None
|
||||
|
||||
|
||||
_active_job = None
|
||||
@@ -520,6 +521,11 @@ class RunJob(bpy.types.Operator):
|
||||
and remove_background
|
||||
),
|
||||
device=self._task_device(settings),
|
||||
inference_mode=(
|
||||
"per_frame"
|
||||
if self.job_type in DA3_IMAGE_JOBS
|
||||
else "joint"
|
||||
),
|
||||
),
|
||||
paths,
|
||||
)
|
||||
@@ -612,10 +618,17 @@ class RunJob(bpy.types.Operator):
|
||||
reported_progress = float(
|
||||
status.get("progress", settings.progress)
|
||||
)
|
||||
settings.progress = max(
|
||||
settings.progress,
|
||||
min(max(reported_progress, 0.0), 1.0),
|
||||
)
|
||||
reported_progress = min(max(reported_progress, 0.0), 1.0)
|
||||
reported_stage = status.get("stage")
|
||||
if reported_stage is not None and reported_stage != getattr(
|
||||
job,
|
||||
"progress_stage",
|
||||
None,
|
||||
):
|
||||
job.progress_stage = reported_stage
|
||||
settings.progress = reported_progress
|
||||
else:
|
||||
settings.progress = max(settings.progress, reported_progress)
|
||||
settings.status = self._format_status(status, settings.status)
|
||||
self._redraw_ui(context, force=True)
|
||||
|
||||
@@ -624,38 +637,19 @@ class RunJob(bpy.types.Operator):
|
||||
stage = status.get("stage")
|
||||
stages = status.get("stages")
|
||||
stage_label = status.get("stage_label")
|
||||
parts = []
|
||||
if stage and stages:
|
||||
stage_text = f"{stage}/{stages}"
|
||||
prefix = f"{stage}/{stages}"
|
||||
normalized = str(message or "").strip()
|
||||
if normalized and normalized.lower() != str(
|
||||
stage_label or ""
|
||||
).lower():
|
||||
return f"{prefix} {normalized}"
|
||||
if stage_label:
|
||||
stage_text = f"{stage_text} {stage_label}"
|
||||
parts.append(stage_text)
|
||||
elif stage_label:
|
||||
parts.append(str(stage_label))
|
||||
return f"{prefix} {stage_label}"
|
||||
return prefix
|
||||
if message:
|
||||
normalized = str(message).strip()
|
||||
if normalized.lower() != str(stage_label or "").lower():
|
||||
parts.append(normalized)
|
||||
eta = self._format_eta(status.get("eta_seconds"))
|
||||
if eta:
|
||||
parts.append(eta)
|
||||
return " | ".join(parts) if parts else (message or fallback)
|
||||
|
||||
@staticmethod
|
||||
def _format_eta(seconds):
|
||||
if seconds is None:
|
||||
return ""
|
||||
seconds = max(float(seconds), 0.0)
|
||||
if seconds <= 10:
|
||||
return "A few seconds left"
|
||||
if seconds < 60:
|
||||
rounded = max(5, int((seconds + 2.5) // 5) * 5)
|
||||
return f"About {rounded} sec left"
|
||||
if seconds < 3600:
|
||||
minutes = int((seconds + 59) // 60)
|
||||
return f"About {minutes} min left"
|
||||
hours = int((seconds + 3599) // 3600)
|
||||
return f"About {hours} hr left"
|
||||
return str(message).strip()
|
||||
return str(stage_label or fallback)
|
||||
|
||||
def _finish(self, context, job, return_code):
|
||||
settings = context.scene.snapform_settings
|
||||
|
||||
Reference in New Issue
Block a user