Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error in qwen2vl_modify_modeling_qwen2_vl.py #4

@wei-kris

Description

@wei-kris

Indentation Error in qwen2vl_modify_modeling_qwen2_vl.py

Problem Description

When running the design2garmentcode-impl project, I encountered an IndentationError in the file:
lmm_utils/Qwen/qwen2vl_lora_mlp/qwen2vl_modify_modeling_qwen2_vl.py

The specific error occurs at line 154:

Error Details

The problematic code section (lines 140-160) shows inconsistent indentation:

        rope_kwargs = getattr(self, 'rope_kwargs', {}) or {}
        # Backwards-compat shim: some rope init functions don't accept 'rope_type'
        if 'rope_type' in rope_kwargs:
            rope_kwargs = {k:v for k,v in rope_kwargs.items() if k != 'rope_type'}
        inv_freq, self.attention_scaling = self.rope_init_fn(self.config, device, **rope_kwargs)
self.register_buffer("inv_freq", inv_freq, persistent=False)  # ← This line has no indentation
        self.original_inv_freq = self.inv_freq  # ← This line has unexpected indentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions