a
    d$                     @   s  d dl mZ ddlmZmZmZmZmZ dgddgdZze sFe W n eyZ   Y n>0 g ded	< g d
ed< g ded< g ded< g ded< ze se W n ey   Y n0 g ded< g ded< ze se W n ey   Y n0 g ded< g ded< erXddl	m
Z
 ddlmZmZ ze sBe W n eyX   Y n0 ddlmZmZmZmZ dd
lmZmZmZmZ ddlmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ ddl0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6 ddlm7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZB ze sVe W n eyl   Y n~0 dd lCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZR dd!lSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_ ze se W n ey   Y nF0 ddl`maZambZbmcZcmdZdmeZemfZfmgZgmhZhmiZi dd"ljmkZkmlZlmmZmmnZn n$d d#loZoeepeq d$ eerd%eojsep< d#S )&    )TYPE_CHECKING   )OptionalDependencyNotAvailable_LazyModuleis_flax_availableis_tf_availableis_torch_availableGenerationConfigTextIteratorStreamerTextStreamer)configuration_utils	streamers)
ConstraintConstraintListStateDisjunctiveConstraintPhrasalConstraintbeam_constraints)BeamHypotheses
BeamScorerBeamSearchScorerConstrainedBeamSearchScorerbeam_search)EpsilonLogitsWarperEtaLogitsWarperForcedBOSTokenLogitsProcessorForcedEOSTokenLogitsProcessorHammingDiversityLogitsProcessorInfNanRemoveLogitsProcessorLogitsProcessorLogitsProcessorListLogitsWarperMinLengthLogitsProcessor!MinNewTokensLengthLogitsProcessorNoBadWordsLogitsProcessorNoRepeatNGramLogitsProcessor PrefixConstrainedLogitsProcessor RepetitionPenaltyLogitsProcessor'EncoderRepetitionPenaltyLogitsProcessorTemperatureLogitsWarperTopKLogitsWarperTopPLogitsWarperTypicalLogitsWarper#EncoderNoRepeatNGramLogitsProcessorExponentialDecayLengthPenaltyLogitNormalizationlogits_process)MaxNewTokensCriteriaMaxLengthCriteriaMaxTimeCriteriaStoppingCriteriaStoppingCriteriaListvalidate_stopping_criteriastopping_criteria)GenerationMixintop_k_top_p_filtering GreedySearchEncoderDecoderOutputGreedySearchDecoderOnlyOutputSampleEncoderDecoderOutputSampleDecoderOnlyOutputBeamSearchEncoderDecoderOutputBeamSearchDecoderOnlyOutputBeamSampleEncoderDecoderOutputBeamSampleDecoderOnlyOutput%ContrastiveSearchEncoderDecoderOutput"ContrastiveSearchDecoderOnlyOutpututils)TFForcedBOSTokenLogitsProcessorTFForcedEOSTokenLogitsProcessorTFLogitsProcessorTFLogitsProcessorListTFLogitsWarperTFMinLengthLogitsProcessorTFNoBadWordsLogitsProcessorTFNoRepeatNGramLogitsProcessor"TFRepetitionPenaltyLogitsProcessorTFTemperatureLogitsWarperTFTopKLogitsWarperTFTopPLogitsWarperTFForceTokensLogitsProcessor&TFSuppressTokensAtBeginLogitsProcessorTFSuppressTokensLogitsProcessortf_logits_process)TFGenerationMixintf_top_k_top_p_filteringTFGreedySearchDecoderOnlyOutput"TFGreedySearchEncoderDecoderOutputTFSampleEncoderDecoderOutputTFSampleDecoderOnlyOutput TFBeamSearchEncoderDecoderOutputTFBeamSearchDecoderOnlyOutput TFBeamSampleEncoderDecoderOutputTFBeamSampleDecoderOnlyOutput'TFContrastiveSearchEncoderDecoderOutput$TFContrastiveSearchDecoderOnlyOutputtf_utils)	!FlaxForcedBOSTokenLogitsProcessor!FlaxForcedEOSTokenLogitsProcessorFlaxLogitsProcessorFlaxLogitsProcessorListFlaxLogitsWarperFlaxMinLengthLogitsProcessorFlaxTemperatureLogitsWarperFlaxTopKLogitsWarperFlaxTopPLogitsWarperflax_logits_process)FlaxGenerationMixinFlaxGreedySearchOutputFlaxSampleOutputFlaxBeamSearchOutput
flax_utils   )r	   )r
   r   )r,   r'   r   r   r-   r   r   r   r   r.   r   r   r    r!   r"   r#   r$   r%   r&   r(   r)   r*   r+   )r1   r0   r2   r3   r4   r5   )r@   r?   r>   r=   rB   rA   r7   r:   r9   r<   r;   r8   )rD   rE   rP   rF   rG   rH   rI   rJ   rK   rL   rQ   rR   rM   rN   rO   )r]   r\   r[   rZ   r_   r^   rT   rV   rW   rY   rX   rU   )rn   rk   rl   rm   N__file__)Zmodule_spec)ttypingr   rC   r   r   r   r   r   Z_import_structurer   r	   r   r
   r   r   r   r   r   r   r   r   r   r   r   r/   r,   r'   r   r   r-   r   r   r   r   r.   r   r   r    r!   r"   r#   r$   r%   r&   r(   r)   r*   r+   r6   r1   r0   r2   r3   r4   r5   r@   r?   r>   r=   rB   rA   r7   r:   r9   r<   r;   r8   rS   rD   rE   rP   rF   rG   rH   rI   rJ   rK   rL   rQ   rR   rM   rN   rO   r`   r]   r\   r[   rZ   r_   r^   rT   rV   rW   rY   rX   rU   rj   ra   rb   rc   rd   re   rf   rg   rh   ri   ro   rn   rk   rl   rm   sys__name__globals__spec__modules rx   rx   i/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/transformers/generation/__init__.py<module>   sr   



d 8
D8
,