Buckets:
HeliosScheduler
HeliosScheduler مبني على أخذ العينات المطابق للتدفق الهرمي الذي تم تقديمه في Helios.
HeliosScheduler[[diffusers.HeliosScheduler]]
diffusers.HeliosScheduler[[diffusers.HeliosScheduler]]
diffusers.HeliosScheduler(num_train_timesteps: int = 1000, shift: float = 1.0, stages: int = 3, stage_range: list = [0, 0.3333333333333333, 0.6666666666666666, 1], gamma: float = 0.3333333333333333, thresholding: bool = False, prediction_type: str = 'flow_prediction', solver_order: int = 2, predict_x0: bool = True, solver_type: str = 'bh2', lower_order_final: bool = True, disable_corrector: list[int] = [], solver_p: SchedulerMixin = None, use_flow_sigmas: bool = True, scheduler_type: str = 'unipc', use_dynamic_shifting: bool = False, time_shift_type: typing.Literal['exponential', 'linear'] = 'exponential')
convert_model_output[[diffusers.HeliosScheduler.convert_model_output]]
convert_model_output(model_output: Tensor, *args, sample: Tensor = None, sigma: Tensor = None, **kwargs)
المعاملات:
model_output (torch.Tensor) : المخرجات المباشرة من نموذج الانتشار المُتعلَّم.
timestep (int) : الخطوة الزمنية المنفصلة الحالية في سلسلة الانتشار.
sample (torch.Tensor) : نسخة حالية من عينة تم إنشاؤها بواسطة عملية الانتشار.
sigma (torch.Tensor، اختياري) : قيمة sigma للخطوة الحالية في جدول الضوضاء.
يعيد: torch.Tensor
مخرجات النموذج المحوّل.
حوّل مخرجات النموذج إلى النوع المقابل الذي يحتاجه خوارزمية UniPC.
init_sigmas[[diffusers.HeliosScheduler.init_sigmas]]
init_sigmas()
تهيئة الخطوات الزمنية العالمية والقيم السيجما
init_sigmas_for_each_stage[[diffusers.HeliosScheduler.init_sigmas_for_each_stage]]
init_sigmas_for_each_stage()
تهيئة خطوات الزمن لكل مرحلة
multistep_uni_c_bh_update[[diffusers.HeliosScheduler.multistep_uni_c_bh_update]]
multistep_uni_c_bh_update(this_model_output: Tensor, *args, last_sample: Tensor = None, this_sample: Tensor = None, order: int = None, sigma_before: Tensor = None, sigma: Tensor = None, **kwargs)
المعاملات:
this_model_output (torch.Tensor) : مخرجات النموذج عند x_t.
this_timestep (int) : خطوة الزمن الحالية t.
last_sample (torch.Tensor) : العينة المولّدة قبل المتنبئ الأخير x_{t-1}.
this_sample (torch.Tensor) : العينة المولّدة بعد آخر متنبئ x_{t}.
order (int) : قيمة p الخاصة بـ UniC-p في هذه الخطوة. يجب أن يكون ترتيب الدقة الفعّال order + 1.
sigma_before (torch.Tensor، اختياري) : قيمة سيجما (sigma) للخطوة السابقة في جدول الضوضاء.
sigma (torch.Tensor، اختياري) : قيمة sigma للخطوة الحالية في جدول الضوضاء.
يعيد: torch.Tensor
المصفوفة العينة المُصحَّحة عند خطوة الزمن الحالية.
خطوة واحدة لنموذج UniC (نسخة B(h)).
multistep_uni_p_bh_update[[diffusers.HeliosScheduler.multistep_uni_p_bh_update]]
multistep_uni_p_bh_update(model_output: Tensor, *args, sample: Tensor = None, order: int = None, sigma: Tensor = None, sigma_next: Tensor = None, **kwargs)
المعاملات:
model_output (torch.Tensor) : المخرجات المباشرة من نموذج الانتشار المُتعلَّم عند خطوة الزمن الحالية.
prev_timestep (int) : الخطوة الزمنية المنفصلة السابقة في سلسلة الانتشار.
sample (torch.Tensor) : نسخة حالية من عينة تم إنشاؤها بواسطة عملية الانتشار.
order (int) : ترتيب UniP في خطوة الزمن هذه (يتوافق مع p في UniPC-p).
sigma (torch.Tensor، اختياري) : قيمة sigma للخطوة الحالية في جدول الضوضاء.
sigma_next (torch.Tensor، اختياري) : قيمة سيجما للخطوة التالية في جدول الضوضاء.
يعيد: torch.Tensor
المصفوفة العينة عند خطوة الزمن السابقة.
خطوة واحدة لنموذج UniP (نسخة B(h)). أو يُستخدم self.solver_p إذا تم تحديد ذلك.
set_begin_index[[diffusers.HeliosScheduler.set_begin_index]]
set_begin_index(begin_index: int = 0)
المعاملات:
begin_index (int) : فهرس البداية للمجدول.
يحدد الفهرس الابتدائي للمجدول. يجب تشغيل هذه الدالة من خط الأنابيب قبل الاستدلال.
set_timesteps[[diffusers.HeliosScheduler.set_timesteps]]
set_timesteps(num_inference_steps: int, stage_index: int | None = None, device: typing.Union[str, torch.device] = None, sigmas: bool | None = None, mu: bool | None = None, is_amplify_first_chunk: bool = False)
ضبط خطوات الزمن والقيم السيجما لكل مرحلة
time_shift[[diffusers.HeliosScheduler.time_shift]]
time_shift(mu: float, sigma: float, t: Tensor)
المعاملات:
mu (float) : معامل mu الخاص بإزاحة الوقت.
sigma (float) : معامل سيجما الخاص بإزاحة الوقت.
t (torch.Tensor) : خطوات الزمن المدخلة.
يعيد: torch.Tensor
خطوات الزمن المُزاحة.
طبّق إزاحةً زمنية على قيم sigmas.
scheduling_helios
Xet Storage Details
- Size:
- 6.99 kB
- Xet hash:
- 305c49218045ba66081b685d2df30eb8172bed1429cd71fb8e872b2465183b75
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.