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

import gradio as gr how to fix it? #78

Open
6 tasks
Pasha0606 opened this issue Dec 6, 2024 · 3 comments
Open
6 tasks

import gradio as gr how to fix it? #78

Pasha0606 opened this issue Dec 6, 2024 · 3 comments

Comments

@Pasha0606
Copy link

PLEASE READ BEFORE SUBMITTING AN ISSUE

MagicQuill is not a commercial software but a research project. While we strive to improve and maintain it, support is provided on a best-effort basis. Please be patient and respectful in your communications.
To help us respond faster and better, please ensure the following:

  1. Search Existing Resources: Have you looked through the documentation (e.g., hardware requirement and setup steps), and searched online for potential solutions?
  2. Avoid Duplication: Check if a similar issue already exists.

If the issue persists, fill out the details below.


Checklist

  • I have searched the documentation and FAQs.
  • I have searched for similar issues but couldn’t find a solution.
  • I have provided clear and detailed information about the issue.

Issue/Feature Request Description

Type of Issue:

  • Bug
  • Feature Request
  • Question

Summary:


Steps to Reproduce (For Bugs Only)

Expected Behavior:

Actual Behavior:


Additional Context/Details


Environment

  • OS:
  • Version:
  • Any Relevant Dependencies:

Feature Request Specifics (If Applicable)

  • What problem does this solve?:
  • How will this feature improve the project?:
@Pasha0606
Copy link
Author

import gradio as gr
ModuleNotFoundError: No module named 'gradio' how to fix it?

@rtx3060laptop
Copy link

conda deactivate

conda remove -n MagicQuill --all -y

conda create -n MagicQuill python=3.10 -y

conda activate MagicQuill

and continue the steps from the original installation page.

@Pasha0606
Copy link
Author

İ GOT THİS ERROR NOW :( how to fix that

Traceback (most recent call last):
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\diffusers\utils\import_utils.py", line 853, in get_module
return importlib.import_module("." + module_name, self.name)
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in load_unlocked
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\diffusers\loaders\unet.py", line 46, in
from .lora_pipeline import LORA_WEIGHT_NAME, LORA_WEIGHT_NAME_SAFE, TEXT_ENCODER_NAME, UNET_NAME
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\diffusers\loaders\lora_pipeline.py", line 36, in
from .lora_base import LoraBaseMixin
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\diffusers\loaders\lora_base.py", line 47, in
from peft.tuners.tuners_utils import BaseTunerLayer
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\peft_init
.py", line 22, in
from .auto import (
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\peft\auto.py", line 32, in
from .mapping import MODEL_TYPE_TO_PEFT_MODEL_MAPPING
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\peft\mapping.py", line 25, in
from .mixed_model import PeftMixedModel
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\peft\mixed_model.py", line 29, in
from .peft_model import PeftModel
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\peft\peft_model.py", line 37, in
from transformers import Cache, DynamicCache, EncoderDecoderCache, PreTrainedModel
ImportError: cannot import name 'EncoderDecoderCache' from 'transformers' (C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\transformers_init
.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\Magic\MagicQuill\gradio_run.py", line 17, in
from MagicQuill.scribble_color_edit import ScribbleColorEditModel
File "E:\Magic\MagicQuill\MagicQuill\scribble_color_edit.py", line 9, in
from .brushnet_nodes import BrushNetLoader, BrushNet, BlendInpaint, get_files_with_extension
File "E:\Magic\MagicQuill\MagicQuill\brushnet_nodes.py", line 21, in
from .brushnet.brushnet import BrushNetModel
File "E:\Magic\MagicQuill\MagicQuill\brushnet\brushnet.py", line 20, in
from .unet_2d_blocks import (
File "E:\Magic\MagicQuill\MagicQuill\brushnet\unet_2d_blocks.py", line 36, in
from diffusers.models.transformers.dual_transformer_2d import DualTransformer2DModel
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\diffusers\models\transformers_init_.py", line 13, in
from .prior_transformer import PriorTransformer
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\diffusers\models\transformers\prior_transformer.py", line 9, in
from ...loaders import PeftAdapterMixin, UNet2DConditionLoadersMixin
File "", line 1075, in _handle_fromlist
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\diffusers\utils\import_utils.py", line 843, in getattr
module = self._get_module(self._class_to_module[name])
File "C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\diffusers\utils\import_utils.py", line 855, in get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.loaders.unet because of the following error (look up to see its traceback):
cannot import name 'EncoderDecoderCache' from 'transformers' (C:\Users\Pasha.conda\envs\MagicQuill\lib\site-packages\transformers_init
.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants