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

AttributeError: 'Row' object has no attribute 'style' #61

Open
ruoxuer opened this issue Jan 28, 2024 · 4 comments
Open

AttributeError: 'Row' object has no attribute 'style' #61

ruoxuer opened this issue Jan 28, 2024 · 4 comments

Comments

@ruoxuer
Copy link

ruoxuer commented Jan 28, 2024

1706435066496

当我运行python gradio_app.py时,提示错误:AttributeError: 'Row' object has no attribute 'style'
gradio库是最新版本,里面没有style属性,555,求助,。

@ruoxuer
Copy link
Author

ruoxuer commented Jan 28, 2024

已经解决了。降了gradio的版本到3.50.0就可以了。已成功部署好。

@joe-wojniak
Copy link

joe-wojniak commented Jan 30, 2024

i am also getting the AttributeError: 'Row' object has no attribute 'style' when running the gradio demo:
~/VideoCrafter$ python gradio_app.py
model.ckpt: 100%|███████████████████████████| 7.40G/7.40G [01:08<00:00, 108MB/s]
AE working on z of shape (1, 4, 64, 64) = 16384 dimensions.

model checkpoint loaded.
Traceback (most recent call last):
File "gradio_app.py", line 55, in
videocrafter_iface = videocrafter_demo(result_dir)
File "gradio_app.py", line 26, in
with gr.Row().style(equal_height=False):
AttributeError: 'Row' object has no attribute 'style'

lines 23 to 55 of gradio_app.py:
#######t2v#######
with gr.Tab(label="Text2Video"):
with gr.Column():
with gr.Row().style(equal_height=False):
with gr.Column():
input_text = gr.Text(label='Prompts')
with gr.Row():
steps = gr.Slider(minimum=1, maximum=60, step=1, elem_id=f"steps", label="Sampling steps", value=50)
eta = gr.Slider(minimum=0.0, maximum=1.0, step=0.1, label='ETA', value=1.0, elem_id="eta")
with gr.Row():
cfg_scale = gr.Slider(minimum=1.0, maximum=30.0, step=0.5, label='CFG Scale', value=12.0, elem_id="cfg_scale")
fps = gr.Slider(minimum=4, maximum=32, step=1, label='fps', value=16, elem_id="fps")
send_btn = gr.Button("Send")
with gr.Tab(label='result'):
with gr.Row():
output_video_1 = gr.Video().style(width=512)
gr.Examples(examples=t2v_examples,
inputs=[input_text,steps,cfg_scale,eta],
outputs=[output_video_1],
fn=text2video.get_prompt,
cache_examples=False)
#cache_examples=os.getenv('SYSTEM') == 'spaces')
send_btn.click(
fn=text2video.get_prompt,
inputs=[input_text,steps,cfg_scale,eta,fps],
outputs=[output_video_1],
)

return videocrafter_iface

if name == "main":
result_dir = os.path.join('./', 'results')
videocrafter_iface = videocrafter_demo(result_dir)
videocrafter_iface.queue(concurrency_count=1, max_size=10)

@joe-wojniak
Copy link

the "sh scripts/run_image2video.sh" script had errors-- i don't have a large GPU. i will need to see if i can refactor the code to use torch for cpu.

script error:
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 1.95 GiB total capacity; 1.41 GiB already allocated; 19.25 MiB free; 1.49 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

@momognu
Copy link

momognu commented May 2, 2024

就是降级3.50解决了

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

3 participants